Files
talk/tests/e2e/pages/adminPage.js
T
2016-12-18 19:07:31 -03:00

35 lines
737 B
JavaScript

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