diff --git a/client/coral-admin/src/routes/Community/components/Table.js b/client/coral-admin/src/routes/Community/components/Table.js index aa2db6ff6..89d59131e 100644 --- a/client/coral-admin/src/routes/Community/components/Table.js +++ b/client/coral-admin/src/routes/Community/components/Table.js @@ -52,7 +52,7 @@ const Table = ({users, setRole, onHeaderClickHandler, setCommenterStatus, viewUs setCommenterStatus(row.id, status)}> @@ -62,7 +62,7 @@ const Table = ({users, setRole, onHeaderClickHandler, setCommenterStatus, viewUs setRole(row.id, role)}> diff --git a/test/e2e/page_objects/adminCommunity.js b/test/e2e/page_objects/adminCommunity.js index 5bae03ae1..0e063915a 100644 --- a/test/e2e/page_objects/adminCommunity.js +++ b/test/e2e/page_objects/adminCommunity.js @@ -27,7 +27,7 @@ module.exports = { people: { selector: '.talk-admin-community-people-container', elements: { - row: '.talk-admin-community-people-row', + firstRow: '.talk-admin-community-people-row:first-child', dropdownStatus: '.talk-admin-community-people-dd-status', dropdownRole: '.talk-admin-community-people-dd-role', dropdownStatusActive: '.talk-admin-community-people-dd-status .dd-list-active', diff --git a/test/e2e/page_objects/embedStream.js b/test/e2e/page_objects/embedStream.js index 92c662d79..55bc6f91c 100644 --- a/test/e2e/page_objects/embedStream.js +++ b/test/e2e/page_objects/embedStream.js @@ -13,9 +13,8 @@ module.exports = { return this.section.embed; }, login(user = {}) { - const embedStream = this.page.embedStream(); - - const embed = embedStream + + const embed = this .navigate() .getEmbedSection(); @@ -23,15 +22,15 @@ module.exports = { .waitForElementVisible('@signInButton') .click('@signInButton'); - this.pause(3000); + this.api.pause(3000); // Focusing on the Login PopUp - this.windowHandles((result) => { + this.api.windowHandles((result) => { const handle = result.value[1]; - this.switchWindow(handle); + this.api.switchWindow(handle); }); - const login = this.page.login(); + const login = this.api.page.login(); login .setValue('@emailInput', user.email) @@ -41,15 +40,13 @@ module.exports = { .click('@loginButton'); // Focusing on the Embed Window - this.windowHandles((result) => { + this.api.windowHandles((result) => { const handle = result.value[0]; - this.switchWindow(handle); + this.api.switchWindow(handle); }); }, - logout() { - const embedStream = this.page.embedStream(); - - const embed = embedStream + logout() { + const embed = this .navigate() .getEmbedSection(); @@ -95,6 +92,8 @@ module.exports = { restrictedMessageBox: '.talk-restricted-message-box', suspendedAccountInput: '.talk-suspended-account-username-input', suspendedAccountSubmitButton: '.talk-suspended-account-submit-button', + banDialog: '.talk-ban-user-dialog', + banDialogConfirmButton: '.talk-ban-user-dialog-button-confirm', }, sections: { flag: { @@ -112,8 +111,6 @@ module.exports = { arrow: '.talk-plugin-moderation-actions-arrow', menu: '.talk-plugin-modetarion-actions-menu', banButton: '.talk-plugin-moderation-actions-ban', - banDialog: '.talk-ban-user-dialog', - banDialogbanButton: '.talk-ban-user-dialog-button-ban', }, }, profile: { diff --git a/test/e2e/specs/05_userStatus.js b/test/e2e/specs/04_userStatus.js similarity index 100% rename from test/e2e/specs/05_userStatus.js rename to test/e2e/specs/04_userStatus.js diff --git a/test/e2e/specs/04_banUser.js b/test/e2e/specs/05_banUser.js similarity index 89% rename from test/e2e/specs/04_banUser.js rename to test/e2e/specs/05_banUser.js index c7eab0c33..8e5e33cd0 100644 --- a/test/e2e/specs/04_banUser.js +++ b/test/e2e/specs/05_banUser.js @@ -14,6 +14,7 @@ module.exports = { .getEmbedSection(); }, 'admin bans user': (client) => { + const embed = client.page.embedStream().section.embed; const modSection = client.page.embedStream().section.embed.section.mod; modSection @@ -21,10 +22,12 @@ module.exports = { .click('@arrow') .waitForElementVisible('@menu') .waitForElementVisible('@banButton') - .click('@banButton') + .click('@banButton'); + + embed .waitForElementVisible('@banDialog') - .waitForElementVisible('@banDialogbanButton') - .click('@banDialogbanButton') + .waitForElementVisible('@banDialogConfirmButton') + .click('@banDialogConfirmButton') .waitForElementNotVisible('@banDialog'); }, 'admin logs out': (client) => { @@ -73,7 +76,7 @@ module.exports = { const modSection = client.page.adminCommunity().section.people; modSection - .waitForElementVisible('@row') + .waitForElementVisible('@firstRow') .waitForElementVisible('@dropdownStatus') .click('@dropdownStatus') .waitForElementVisible('@dropdownStatusActive')