Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
4631d6e5
Commit
4631d6e5
authored
Aug 30, 2021
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
e2e test: unittesting with local compiler
parent
e90747a1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
20 deletions
+36
-20
config.yml
.circleci/config.yml
+2
-0
solidityUnittests.spec.ts
apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts
+34
-20
No files found.
.circleci/config.yml
View file @
4631d6e5
...
...
@@ -105,6 +105,7 @@ jobs:
steps
:
-
checkout
-
run
:
npm install
-
run
:
npm run downloadsolc_assets
-
run
:
npx nx build remix-ide --with-deps
-
run
:
name
:
Download Selenium
...
...
@@ -171,6 +172,7 @@ jobs:
steps
:
-
checkout
-
run
:
npm install
-
run
:
npm run downloadsolc_assets
-
run
:
npx nx build remix-ide --with-deps
-
run
:
name
:
Download Selenium
...
...
apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts
View file @
4631d6e5
...
...
@@ -166,27 +166,41 @@ module.exports = {
.
verify
.
attributeEquals
(
'*[data-id="uiPathInput"]'
,
'value'
,
'tests'
)
},
'Solidity Unittests'
:
function
(
browser
:
NightwatchBrowser
)
{
runTests
(
browser
)
}
}
'Solidity Unit tests Basic'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfilePanel"]'
)
.
clickLaunchIcon
(
'filePanel'
)
.
click
(
'*[data-id="treeViewLitreeViewItemcontracts"]'
)
.
openFile
(
'contracts/3_Ballot.sol'
)
.
clickLaunchIcon
(
'solidityUnitTesting'
)
.
pause
(
2000
)
.
verify
.
attributeEquals
(
'*[data-id="uiPathInput"]'
,
'value'
,
'tests'
)
.
scrollAndClick
(
'#runTestsTabRunAction'
)
.
waitForElementVisible
(
'*[data-id="testTabSolidityUnitTestsOutputheader"]'
,
120000
)
.
waitForElementPresent
(
'#solidityUnittestsOutput div[class^="testPass"]'
,
60000
)
.
waitForElementContainsText
(
'#solidityUnittestsOutput'
,
'/tests/4_Ballot_test.sol'
,
60000
)
.
waitForElementContainsText
(
'#solidityUnittestsOutput'
,
'✓ Check winning proposal'
,
60000
)
.
waitForElementContainsText
(
'#solidityUnittestsOutput'
,
'✓ Check winnin proposal with return value'
,
60000
)
},
function
runTests
(
browser
:
NightwatchBrowser
)
{
browser
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfilePanel"]'
)
.
clickLaunchIcon
(
'filePanel'
)
.
click
(
'*[data-id="treeViewLitreeViewItemcontracts"]'
)
.
openFile
(
'contracts/3_Ballot.sol'
)
.
clickLaunchIcon
(
'solidityUnitTesting'
)
.
pause
(
2000
)
.
verify
.
attributeEquals
(
'*[data-id="uiPathInput"]'
,
'value'
,
'tests'
)
.
scrollAndClick
(
'#runTestsTabRunAction'
)
.
waitForElementVisible
(
'*[data-id="testTabSolidityUnitTestsOutputheader"]'
,
120000
)
.
waitForElementPresent
(
'#solidityUnittestsOutput div[class^="testPass"]'
,
60000
)
.
waitForElementContainsText
(
'#solidityUnittestsOutput'
,
'/tests/4_Ballot_test.sol'
,
60000
)
.
waitForElementContainsText
(
'#solidityUnittestsOutput'
,
'✓ Check winning proposal'
,
60000
)
.
waitForElementContainsText
(
'#solidityUnittestsOutput'
,
'✓ Check winnin proposal with return value'
,
60000
)
.
end
()
'Solidity Unit tests Basic Basic with local compiler'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
.
clickLaunchIcon
(
'solidity'
)
.
setSolidityCompilerVersion
(
'builtin'
)
.
openFile
(
'contracts/3_Ballot.sol'
)
.
clickLaunchIcon
(
'pluginManager'
)
.
scrollAndClick
(
'[data-id="pluginManagerComponentDeactivateButtonsolidityUnitTesting"]'
)
.
pause
(
2000
)
.
scrollAndClick
(
'[data-id="pluginManagerComponentActivateButtonsolidityUnitTesting"]'
)
.
clickLaunchIcon
(
'solidityUnitTesting'
)
.
scrollAndClick
(
'#runTestsTabRunAction'
)
.
waitForElementVisible
(
'*[data-id="testTabSolidityUnitTestsOutputheader"]'
,
120000
)
.
waitForElementPresent
(
'#solidityUnittestsOutput div[class^="testPass"]'
,
60000
)
.
waitForElementContainsText
(
'#solidityUnittestsOutput'
,
'/tests/4_Ballot_test.sol'
,
60000
)
.
waitForElementContainsText
(
'#solidityUnittestsOutput'
,
'✓ Check winning proposal'
,
60000
)
.
waitForElementContainsText
(
'#solidityUnittestsOutput'
,
'✓ Check winnin proposal with return value'
,
60000
)
.
end
()
}
}
const
sources
=
[
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment