remove uneeded commands

pull/262/head
yann300 5 years ago
parent 4d12181c52
commit c58503046a
  1. 15
      test-browser/commands/elementIsNotPresent.js
  2. 15
      test-browser/commands/elementIsPresent.js
  3. 8
      test-browser/tests/editor.test.js

@ -1,15 +0,0 @@
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

@ -1,15 +0,0 @@
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()
},

Loading…
Cancel
Save