mirror of
https://github.com/wassname/talk.git
synced 2026-08-08 11:28:12 +08:00
refactor: working tests
This commit is contained in:
@@ -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: {
|
||||
|
||||
@@ -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));
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user