diff --git a/test/e2e/page_objects/embedStream.js b/test/e2e/page_objects/embedStream.js index 4b1519740..410748970 100644 --- a/test/e2e/page_objects/embedStream.js +++ b/test/e2e/page_objects/embedStream.js @@ -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', }, diff --git a/test/e2e/specs/03_embedStream.js b/test/e2e/specs/03_embedStream.js index db3b8bcef..2e1f442df 100644 --- a/test/e2e/specs/03_embedStream.js +++ b/test/e2e/specs/03_embedStream.js @@ -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(); + }, };