remix-project mirror
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
remix-project/test-browser/commands/notContainsText.js

18 lines
491 B

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