Commit 07955c6f authored by ioedeveloper's avatar ioedeveloper

Assert that other tests did not run

parent d922807a
const EventEmitter = require('events')
class NotContainsText extends EventEmitter {
command (cssSelector, text) {
const browser = this.api
browser.getText(cssSelector, (result) => {
if (result.value.includes(text)) return this.api.assert.fail(`${cssSelector} contains ${text}.`)
else this.api.assert.ok(`${cssSelector} does not contains ${text}.`)
})
.perform(() => {
this.emit('complete')
})
return this
}
}
module.exports = NotContainsText
......@@ -80,11 +80,14 @@ module.exports = {
.clickElementAtPosition('.singleTestLabel', 0)
.clickElementAtPosition('.singleTestLabel', 1)
.scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]')
.pause(15000)
.pause(10000)
.click('*[data-id="testTabRunTestsTabStopAction"]')
.assert.containsText('*[data-id="testTabRunTestsTabStopAction"]', 'Stopping')
.pause(5000)
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'browser/ks2b_test.sol (kickstarterTest)')
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'browser/4_Ballot_test.sol (BallotTest)'))
.notContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'browser/4_Ballot_test.sol (BallotTest)')
.notContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'browser/simple_storage_test.sol (MyTest)')
.assert.containsText('*[data-id="testTabTestsExecutionStopped"]', 'The test execution has been stopped')
},
'Should fail on compilation': function (browser) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment