Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
Cypress/E2E: Try to fix timezone display mode flakiness (#5957)
Browse files Browse the repository at this point in the history
* Try to fix timezone display mode flakiness

* Removed prod
  • Loading branch information
Joseph Baylon committed Jul 21, 2020
1 parent 6ec26cc commit bb57d35
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// - Use element ID when selecting an element. Create one if none.
// ***************************************************************

// Stage: @prod
// Group: @account_setting

import moment from 'moment-timezone';
Expand Down Expand Up @@ -41,13 +40,15 @@ describe('Account Settings > Display > Timezone Mode', () => {
},
});

// # Create and visit new channel
cy.apiInitSetup({loginAfter: true}).then(({team, channel}) => {
cy.visit(`/${team.name}/channels/${channel.name}`);
// # Create and visit town-square
cy.apiInitSetup({loginAfter: true}).then(({team}) => {
cy.visit(`/${team.name}/channels/town-square`);

// # Post messages from the past
[date1, date2, date3, date4].forEach((createAt, index) => {
cy.postMessageAs({sender: sysadmin, message: `Hello from ${index}`, channelId: channel.id, createAt});
cy.getCurrentChannelId().then((channelId) => {
cy.postMessageAs({sender: sysadmin, message: `Hello from ${index}`, channelId, createAt});
});
});

// # Post messages from now
Expand Down

0 comments on commit bb57d35

Please sign in to comment.