Commit c5850304 authored by yann300's avatar yann300

remove uneeded commands

parent 4d12181c
const EventEmitter = require('events')
class ElementIsPresent extends EventEmitter {
command (cssSelector) {
this.api.execute((cssSelector) => {
return !!document.querySelector(cssSelector)
}, [cssSelector], (result) => {
this.api.assert.equal(false, result.value, `${cssSelector} should not be present`)
this.emit('complete')
})
return this
}
}
module.exports = ElementIsPresent
const EventEmitter = require('events')
class ElementIsPresent extends EventEmitter {
command (cssSelector) {
this.api.execute((cssSelector) => {
return !!document.querySelector(cssSelector)
}, [cssSelector], (result) => {
this.api.assert.equal(true, result.value, `${cssSelector} should be present`)
this.emit('complete')
})
return this
}
}
module.exports = ElementIsPresent
......@@ -91,7 +91,7 @@ module.exports = {
.executeScript('remix.exeCurrent()')
.switchFile('browser/3_Ballot.sol')
.editorScroll('down', 60)
.elementIsNotPresent('.highlightLine32')
.waitForElementNotPresent('.highlightLine32')
.checkElementStyle('.highlightLine40', 'background-color', 'rgb(8, 108, 181)')
.checkElementStyle('.highlightLine50', 'background-color', 'rgb(8, 108, 181)')
},
......@@ -102,9 +102,9 @@ module.exports = {
.executeScript('remix.exeCurrent()')
.switchFile('browser/3_Ballot.sol')
.editorScroll('down', 60)
.elementIsNotPresent('.highlightLine32')
.elementIsNotPresent('.highlightLine40')
.elementIsNotPresent('.highlightLine50')
.waitForElementNotPresent('.highlightLine32')
.waitForElementNotPresent('.highlightLine40')
.waitForElementNotPresent('.highlightLine50')
.end()
},
......
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