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
6cad4620
Commit
6cad4620
authored
Mar 25, 2020
by
ioedeveloper
Committed by
Aniket
Apr 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added data-attributes
parent
52a07786
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
test-tab.js
src/app/tabs/test-tab.js
+1
-1
solidityUnittests.js
test-browser/tests/solidityUnittests.js
+4
-6
No files found.
src/app/tabs/test-tab.js
View file @
6cad4620
...
...
@@ -239,7 +239,7 @@ module.exports = class TestTab extends ViewPlugin {
}
updateRunAction
(
currentFile
)
{
let
el
=
yo
`<button id="runTestsTabRunAction" class="
${
css
.
runButton
}
btn btn-primary" onclick="
${
this
.
runTests
.
bind
(
this
)}
">Run Tests</button>`
let
el
=
yo
`<button id="runTestsTabRunAction"
data-id="testTabRunTestsTabRunAction"
class="
${
css
.
runButton
}
btn btn-primary" onclick="
${
this
.
runTests
.
bind
(
this
)}
">Run Tests</button>`
const
isSolidityActive
=
this
.
appManager
.
actives
.
includes
(
'solidity'
)
if
(
!
currentFile
||
!
isSolidityActive
)
{
el
.
setAttribute
(
'disabled'
,
'disabled'
)
...
...
test-browser/tests/solidityUnittests.js
View file @
6cad4620
...
...
@@ -43,7 +43,7 @@ module.exports = {
.
waitForElementPresent
(
'*[data-id="testTabCheckAllTests"]'
)
.
click
(
'*[data-id="testTabCheckAllTests"]'
)
.
click
(
'.singleTestLabel:nth-of-type(2)'
)
.
scrollAndClick
(
'
#runTestsTabRunAction
'
)
.
scrollAndClick
(
'
*[data-id="testTabRunTestsTabRunAction"]
'
)
.
pause
(
10000
)
.
assert
.
containsText
(
'*[data-id="testTabSolidityUnitTestsOutput"]'
,
'browser/simple_storage_test.sol (MyTest)'
)
.
assert
.
containsText
(
'*[data-id="testTabSolidityUnitTestsOutput"]'
,
'✓ (Initial value should be100)'
)
...
...
@@ -58,7 +58,7 @@ module.exports = {
.
waitForElementPresent
(
'*[data-id="testTabCheckAllTests"]'
)
.
click
(
'*[data-id="testTabCheckAllTests"]'
)
.
click
(
'.singleTestLabel:nth-of-type(3)'
)
.
scrollAndClick
(
'
#runTestsTabRunAction
'
)
.
scrollAndClick
(
'
*[data-id="testTabRunTestsTabRunAction"]
'
)
.
pause
(
10000
)
.
assert
.
containsText
(
'*[data-id="testTabSolidityUnitTestsOutput"]'
,
'browser/ks2b_test.sol (kickstarterTest)'
)
.
assert
.
containsText
(
'*[data-id="testTabSolidityUnitTestsOutput"]'
,
'✓ (Check project exists)'
)
...
...
@@ -70,10 +70,8 @@ module.exports = {
.
clickLaunchIcon
(
'fileExplorers'
)
.
switchFile
(
'browser/3_Ballot.sol'
)
.
clickLaunchIcon
(
'solidityUnitTesting'
)
.
scrollAndClick
(
'#runTestsTabRunAction'
)
.
pause
(
5000
)
.
waitForElementPresent
(
'#solidityUnittestsOutput div[class^="testPass"]'
)
.
pause
(
20000
)
.
scrollAndClick
(
'*[data-id="testTabRunTestsTabRunAction"]'
)
.
pause
(
30000
)
.
assert
.
containsText
(
'*[data-id="testTabSolidityUnitTestsOutput"]'
,
'browser/4_Ballot_test.sol (BallotTest)'
)
.
assert
.
containsText
(
'*[data-id="testTabSolidityUnitTestsOutput"]'
,
'✓ (Check winning proposal)'
)
.
assert
.
containsText
(
'*[data-id="testTabSolidityUnitTestsOutput"]'
,
'✓ (Check winnin proposal with return value)'
)
...
...
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