parent
74b7c1af2f
commit
0445d8c231
@ -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