Files
talk/test/e2e/pages/adminPage.js
T
David Jay 31abe57cb2 Merge branch 'master' of github.com:coralproject/talk into moderate-bio
Integrating graphql, updating tests, and preserving transition to ModerationList from CommentList.
2017-01-25 17:15:12 -05:00

34 lines
750 B
JavaScript

const embedStreamCommands = {
url: function () {
return `${this.api.launchUrl}/admin`;
},
ready() {
return this
.waitForElementVisible('body', 2000);
},
approveComment() {
return this
.waitForElementVisible('@moderationList')
.waitForElementVisible('@approveButton')
.click('@approveButton');
}
};
module.exports = {
commands: [embedStreamCommands],
elements: {
moderationList: {
selector: '#moderationList'
},
banButton: {
selector: '#moderationList .actions:first-child .ban'
},
rejectButton: {
selector: '#moderationList .actions:first-child .reject'
},
approveButton: {
selector: '#moderationList .actions:first-child .approve'
}
}
};