refactor: working tests

This commit is contained in:
Belen Curcio
2017-11-10 13:04:46 -03:00
parent 38148ad51c
commit 819b1c597c
2 changed files with 10 additions and 4 deletions
+1
View File
@@ -58,6 +58,7 @@ module.exports = {
suspendUserConfirmButton: '.talk-admin-suspend-user-dialog-confirm',
supendUserSendButton: '.talk-admin-suspend-user-dialog-send',
toast: '.toastify',
toastClose: '.toastify__close',
},
sections: {
moderate: {
+9 -4
View File
@@ -104,22 +104,27 @@ module.exports = {
.waitForElementVisible('@supendUserSendButton')
.click('@supendUserSendButton');
// Wating for animation to be over.
adminPage
.waitForElementVisible('@toast')
.waitForElementVisible('@settingsButton', 8000);
.waitForElementVisible('@toastClose')
.click('@toastClose');
},
'admin logs out': (client) => {
const comments = client.page.embedStream().section.comments;
const adminPage = client.page.admin();
comments
adminPage
.logout();
},
'user logs in (2)': (client) => {
const {testData: {user}} = client.globals;
const embedStream = client.page.embedStream();
const comments = client.page.embedStream().section.comments;
embedStream
.navigate()
.ready();
comments
.openLoginPopup((popup) => popup.login(user));
},