mirror of
https://github.com/wassname/talk.git
synced 2026-07-08 10:08:00 +08:00
Updated tests
This commit is contained in:
@@ -48,7 +48,7 @@ module.exports = {
|
||||
iframe: `#${iframeId}`,
|
||||
commentsTabButton: '.talk-embed-stream-comments-tab > button',
|
||||
profileTabButton: '.talk-embed-stream-profile-tab > button',
|
||||
configTabButton: '.talk-embed-stream-profile-tab > button',
|
||||
configTabButton: '.talk-embed-stream-config-tab > button',
|
||||
banDialog: '.talk-ban-user-dialog',
|
||||
banDialogConfirmButton: '.talk-ban-user-dialog-button-confirm',
|
||||
},
|
||||
|
||||
@@ -96,20 +96,6 @@ module.exports = {
|
||||
profile.assert.equal(result.value, '1');
|
||||
});
|
||||
},
|
||||
'stream is closed, user won\'t be able to perform some actions: reply ': (client) => {
|
||||
|
||||
const embedStream = client.page.embedStream();
|
||||
|
||||
embedStream
|
||||
.waitForElementVisible('@firstComment')
|
||||
.waitForElementVisible('@replyButton')
|
||||
.goToProfileSection()
|
||||
.closeStream()
|
||||
.goToCommentsSection()
|
||||
.waitForElementVisible('@firstComment')
|
||||
.waitForElementNotVisible('@replyButton')
|
||||
.openStream();
|
||||
},
|
||||
'user logs out': (client) => {
|
||||
const embedStream = client.page.embedStream();
|
||||
const comments = embedStream.goToCommentsSection();
|
||||
@@ -124,4 +110,42 @@ module.exports = {
|
||||
profile
|
||||
.assert.visible('@notLoggedIn');
|
||||
},
|
||||
'admin logs in': (client) => {
|
||||
const {testData: {admin}} = client.globals;
|
||||
const embedStream = client.page.embedStream();
|
||||
|
||||
embedStream
|
||||
.navigate()
|
||||
.ready()
|
||||
.openLoginPopup((popup) => popup.login(admin));
|
||||
},
|
||||
'admin closes stream, users won\'t be able to perform some actions: reply ': (client) => {
|
||||
|
||||
const embedStream = client.page.embedStream();
|
||||
|
||||
embedStream
|
||||
.goToCommentsSection()
|
||||
.waitForElementVisible('@firstComment')
|
||||
.waitForElementVisible('@replyButton');
|
||||
|
||||
embedStream
|
||||
.goToConfigSection()
|
||||
.closeStream();
|
||||
|
||||
embedStream
|
||||
.goToCommentsSection()
|
||||
.waitForElementVisible('@firstComment')
|
||||
.waitForElementNotVisible('@replyButton');
|
||||
|
||||
embedStream
|
||||
.goToConfigSection()
|
||||
.openStream();
|
||||
},
|
||||
'adming logs out': (client) => {
|
||||
const embedStream = client.page.embedStream();
|
||||
const comments = embedStream.goToCommentsSection();
|
||||
|
||||
comments
|
||||
.logout();
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user