mirror of
https://github.com/wassname/talk.git
synced 2026-06-29 05:35:42 +08:00
39 lines
881 B
JavaScript
39 lines
881 B
JavaScript
const embedStreamCommands = {
|
|
url: function () {
|
|
return `${this.api.launchUrl}/admin`;
|
|
},
|
|
ready() {
|
|
return this
|
|
.waitForElementVisible('body', 2000);
|
|
},
|
|
approveComment() {
|
|
return this
|
|
.waitForElementVisible('@moderateNav')
|
|
.click('@moderateNav')
|
|
.waitForElementVisible('@moderationList')
|
|
.waitForElementVisible('@approveButton')
|
|
.click('@approveButton');
|
|
}
|
|
};
|
|
|
|
module.exports = {
|
|
commands: [embedStreamCommands],
|
|
elements: {
|
|
moderateNav: {
|
|
selector: '#moderateNav'
|
|
},
|
|
moderationList: {
|
|
selector: '#moderationList'
|
|
},
|
|
banButton: {
|
|
selector: '#moderationList .actions:first-child .ban'
|
|
},
|
|
rejectButton: {
|
|
selector: '#moderationList .actions:first-child .reject'
|
|
},
|
|
approveButton: {
|
|
selector: '#moderationList .actions:first-child .approve'
|
|
}
|
|
}
|
|
};
|