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

Commit

Permalink
Possible fix for the failing long draft test in messaging (#6525) (#6533
Browse files Browse the repository at this point in the history
)

Automatic Merge
  • Loading branch information
mattermost-build committed Sep 23, 2020
1 parent 1399781 commit f2ef4e4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions e2e/cypress/integration/messaging/long_draft_spec.js
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: @messaging

import * as TIMEOUTS from '../../fixtures/timeouts';
Expand Down Expand Up @@ -45,11 +44,11 @@ describe('Messaging', () => {
writeLinesToPostTextBox(lines);

// # Visit a different channel and verify textbox
cy.get('#sidebarItem_off-topic').click({force: true}).wait(TIMEOUTS.HALF_SEC);
cy.get('#sidebarItem_off-topic').click({force: true}).wait(TIMEOUTS.THREE_SEC);
verifyPostTextbox('@initialHeight', '');

// # Return to the channel and verify textbox
cy.get('#sidebarItem_town-square').click({force: true}).wait(TIMEOUTS.HALF_SEC);
cy.get('#sidebarItem_town-square').click({force: true}).wait(TIMEOUTS.THREE_SEC);
verifyPostTextbox('@previousHeight', lines.join('\n'));

// # Clear the textbox
Expand All @@ -61,13 +60,13 @@ describe('Messaging', () => {
writeLinesToPostTextBox(lines);

// # Visit a different channel by URL and verify textbox
cy.visit(`/${testTeam.name}/channels/off-topic`).wait(TIMEOUTS.HALF_SEC);
cy.visit(`/${testTeam.name}/channels/off-topic`).wait(TIMEOUTS.THREE_SEC);
verifyPostTextbox('@initialHeight', '');

// # Should have returned to the channel by URL. However, Cypress is clearing storage for some reason.
// # Does not happened on actual user interaction.
// * Verify textbox
cy.get('#sidebarItem_town-square').click({force: true}).wait(TIMEOUTS.HALF_SEC);
cy.get('#sidebarItem_town-square').click({force: true}).wait(TIMEOUTS.THREE_SEC);
verifyPostTextbox('@previousHeight', lines.join('\n'));
});
});
Expand Down

0 comments on commit f2ef4e4

Please sign in to comment.