Skip to content

Commit

Permalink
fix failing tests on at mentions, keyboard shortcuts and LDAP group (m…
Browse files Browse the repository at this point in the history
  • Loading branch information
saturninoabril authored Mar 18, 2020
1 parent 0668069 commit 788a3a1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
1 change: 1 addition & 0 deletions e2e/cypress/integration/at_mentions/at_mentions_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ describe('at-mention', () => {
before(() => {
// # Login as receiver and go to "/"
cy.apiLogin(receiver.username);
cy.apiSaveTeammateNameDisplayPreference('username');

// # Navigate to the channel we were mention to
// clear the notification gem and get the channelId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -667,5 +667,5 @@ function openMainMenuOptions(menu) {
function openChannelMainOptions(menu) {
cy.get('body').type('{esc}');
cy.findByLabelText('channel menu').click();
cy.findByText(menu).scrollIntoView().click();
cy.findByText(menu).scrollIntoView().should('be.visible').click();
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,26 +101,16 @@ describe('System Console', () => {
cy.wait(500); //eslint-disable-line cypress/no-unnecessary-waiting

cy.get('#team_and_channel_membership_table').then((el) => {
let name;

// * Ensure that the text in the roles column is Member as default text for each row
for (let i = 1; i < el[0].rows.length; i++) {
name = el[0].rows[i].cells[0].innerText;
cy.findByTestId(`${name}_current_role`).scrollIntoView().should('contain.text', 'Member');
}
const name = el[0].rows[1].cells[0].innerText;
cy.findByTestId(`${name}_current_role`).scrollIntoView().should('contain.text', 'Member');

// # Change the option to the admin roles (Channel Admin/Team Admin) for each row
for (let i = 1; i < el[0].rows.length; i++) {
name = el[0].rows[i].cells[0].innerText;
cy.wrap(el[0].rows[i]).findByTestId(`${name}_current_role`).scrollIntoView().click();
cy.wrap(el[0].rows[i]).findByTestId(`${name}_role_to_be`).scrollIntoView().click();
}
cy.findByTestId(`${name}_current_role`).scrollIntoView().click();
cy.findByTestId(`${name}_role_to_be`).scrollIntoView().click();

// * Ensure that each row roles have changed successfully (by making sure that the Member text is not existant anymore)
for (let i = 1; i < el[0].rows.length; i++) {
name = el[0].rows[i].cells[0].innerText;
cy.findByTestId(`${name}_current_role`).scrollIntoView().should('not.contain.text', 'Member');
}
// * Ensure that each row roles have changed successfully (by making sure that the Member text is not existent anymore)
cy.findByTestId(`${name}_current_role`).scrollIntoView().should('not.contain.text', 'Member');
});
});
});

0 comments on commit 788a3a1

Please sign in to comment.