parent
dc06097124
commit
69a954316f
@ -0,0 +1,17 @@ |
||||
const EventEmitter = require('events') |
||||
|
||||
class ModalFooterOKClick extends EventEmitter { |
||||
command () { |
||||
this.api.waitForElementVisible('#modal-footer-cancel').perform((client, done) => { |
||||
this.api.execute(function () { |
||||
document.querySelector('#modal-footer-cancel').click() |
||||
}, [], (result) => { |
||||
done() |
||||
this.emit('complete') |
||||
}) |
||||
}) |
||||
return this |
||||
} |
||||
} |
||||
|
||||
module.exports = ModalFooterOKClick |
@ -1,17 +0,0 @@ |
||||
const EventEmitter = require('events') |
||||
|
||||
class ModalFooterClick extends EventEmitter { |
||||
command (cssSelector) { |
||||
this.api.waitForElementVisible(cssSelector).perform((client, done) => { |
||||
this.api.execute(function () { |
||||
document.querySelector(cssSelector).click() |
||||
}, [], (result) => { |
||||
done() |
||||
this.emit('complete') |
||||
}) |
||||
}) |
||||
return this |
||||
} |
||||
} |
||||
|
||||
module.exports = ModalFooterClick |
@ -0,0 +1,17 @@ |
||||
const EventEmitter = require('events') |
||||
|
||||
class ModalFooterOKClick extends EventEmitter { |
||||
command () { |
||||
this.api.waitForElementVisible('#modal-footer-ok').perform((client, done) => { |
||||
this.api.execute(function () { |
||||
document.querySelector('#modal-footer-ok').click() |
||||
}, [], (result) => { |
||||
done() |
||||
this.emit('complete') |
||||
}) |
||||
}) |
||||
return this |
||||
} |
||||
} |
||||
|
||||
module.exports = ModalFooterOKClick |
Loading…
Reference in new issue