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
d922807a
Commit
d922807a
authored
Apr 27, 2020
by
ioedeveloper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop unit tests execution
parent
c4eaa6cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
test-tab.js
src/app/tabs/test-tab.js
+2
-2
solidityUnittests.js
test-browser/tests/solidityUnittests.js
+13
-0
No files found.
src/app/tabs/test-tab.js
View file @
d922807a
...
...
@@ -340,7 +340,7 @@ module.exports = class TestTab extends ViewPlugin {
updateStopAction
()
{
return
yo
`
<button id="runTestsTabStopAction" class="w-50 pl-2 ml-2 btn btn-secondary" disabled="disabled" title="Stop running tests" onclick=
${()
=>
this
.
stopTests
()}
">
<button id="runTestsTabStopAction"
data-id="testTabRunTestsTabStopAction"
class="w-50 pl-2 ml-2 btn btn-secondary" disabled="disabled" title="Stop running tests" onclick=
${()
=>
this
.
stopTests
()}
">
<span class="fas fa-stop ml-2"></span>
<label class="
${
css
.
labelOnBtn
}
btn btn-primary bg-transparent p-1 ml-2 m-0" id="runTestsTabStopActionLabel">Stop</label>
</button>
...
...
@@ -390,7 +390,7 @@ module.exports = class TestTab extends ViewPlugin {
this.onActivationInternal()
this.testsOutput = yo`
<
div
class
=
"${css.container} mx-3 border-top border-primary"
hidden
=
'true'
id
=
"solidityUnittestsOutput"
data
-
id
=
"testTabSolidityUnitTestsOutput"
><
/a>
`
this
.
testsSummary
=
yo
`<div class="
${
css
.
container
}
mx-3 pt-2 border-top border-primary" hidden='true' id="solidityUnittestsSummary" data-id="testTabSolidityUnitTestsSummary"></div>`
this
.
testsExecutionStopped
=
yo
`<label class="text-warning h6">The test execution has been stopped</label>`
this
.
testsExecutionStopped
=
yo
`<label class="text-warning h6"
data-id="testTabTestsExecutionStopped"
>The test execution has been stopped</label>`
this
.
testsExecutionStopped
.
hidden
=
true
this
.
resultStatistics
=
this
.
createResultLabel
()
this
.
resultStatistics
.
hidden
=
true
...
...
test-browser/tests/solidityUnittests.js
View file @
d922807a
...
...
@@ -74,6 +74,19 @@ module.exports = {
.
assert
.
containsText
(
'*[data-id="testTabSolidityUnitTestsSummary"]'
,
'wrong value'
)
},
'Should stop unit tests during test execution` '
:
function
(
browser
)
{
browser
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfileExplorers"]'
)
.
waitForElementPresent
(
'*[data-id="testTabRunTestsTabRunAction"]'
)
.
clickElementAtPosition
(
'.singleTestLabel'
,
0
)
.
clickElementAtPosition
(
'.singleTestLabel'
,
1
)
.
scrollAndClick
(
'*[data-id="testTabRunTestsTabRunAction"]'
)
.
pause
(
15000
)
.
click
(
'*[data-id="testTabRunTestsTabStopAction"]'
)
.
assert
.
containsText
(
'*[data-id="testTabRunTestsTabStopAction"]'
,
'Stopping'
)
.
assert
.
containsText
(
'*[data-id="testTabSolidityUnitTestsOutput"]'
,
'browser/ks2b_test.sol (kickstarterTest)'
)
.
assert
.
containsText
(
'*[data-id="testTabSolidityUnitTestsOutput"]'
,
'browser/4_Ballot_test.sol (BallotTest)'
))
},
'Should fail on compilation'
:
function
(
browser
)
{
browser
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfileExplorers"]'
)
.
addFile
(
'compilationError_test.sol'
,
sources
[
0
][
'browser/compilationError_test.sol'
])
...
...
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