Skip to content

Commit

Permalink
fix messaging and team flaky specs (mattermost#3070)
Browse files Browse the repository at this point in the history
  • Loading branch information
saturninoabril authored and sudheerDev committed Jul 8, 2019
1 parent f4eb2bc commit f4130ac
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
17 changes: 8 additions & 9 deletions e2e/cypress/integration/channel/message_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,17 @@ describe('Message', () => {
});

it('M14320 @here., @all. and @channel. (ending in a period) still highlight', () => {
// # Login as new user
cy.loginAsNewUser().then(() => {
// # Create new team and visit its URL
cy.apiCreateTeam('test-team', 'Test Team').then((response) => {
cy.visit(`/${response.body.name}`);
});
});

// # Post message
cy.postMessage('@here. @all. @channel.');

// * Check that confirm modal is displayed
cy.get('#confirmModal').should('be.visible');

// # Confirm multiple mentions
cy.get('#confirmModalButton').click();

// * Check that confirm modal is closed
cy.get('#confirmModal').should('not.be.visible');

cy.getLastPostId().then((postId) => {
const divPostId = `#postMessageText_${postId}`;

Expand Down
6 changes: 4 additions & 2 deletions e2e/cypress/integration/team/teams_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,11 @@ describe('Teams Suite', () => {

leaveAllTeams();

cy.get('a.signup-team-login').should('contain', 'Create a new team');
// * Check that it redirects into team selection page after leaving all teams
cy.url().should('include', '/select_team');

cy.logout();
// # Check that logout is visible and then click to logout
cy.get('#logout').should('be.visible').click();

// * Ensure user is logged out
cy.url({timeout: TIMEOUTS.LARGE}).should('include', 'login');
Expand Down

0 comments on commit f4130ac

Please sign in to comment.