[15 min fix] Flakey "change password" spec (#13979)
* wait for all sign in network requests to resolve * tweaks * add chat request
This commit is contained in:
parent
cbb385bf6d
commit
420e47675d
1 changed files with 15 additions and 0 deletions
|
|
@ -41,11 +41,26 @@ describe('User Change Password', () => {
|
|||
.type(newPassword);
|
||||
});
|
||||
|
||||
// We intercept these requests to make sure all async sign-in requests have completed before finishing the test.
|
||||
// This ensures async responses do not intefere with subsequent test setup
|
||||
cy.intercept('/notifications?i=i').as('notificationsRequest');
|
||||
cy.intercept('/notifications/counts').as('countsRequest');
|
||||
cy.intercept('/async_info/base_data').as('baseDataRequest');
|
||||
cy.intercept('/chat_channels**').as('chatRequest');
|
||||
|
||||
// Submit the form
|
||||
cy.get('@loginForm').findByText('Continue').click();
|
||||
|
||||
cy.wait([
|
||||
'@notificationsRequest',
|
||||
'@countsRequest',
|
||||
'@baseDataRequest',
|
||||
'@chatRequest',
|
||||
]);
|
||||
|
||||
const { baseUrl } = Cypress.config();
|
||||
cy.url().should('equal', `${baseUrl}settings/account?signin=true`);
|
||||
cy.findByRole('heading', { name: 'Set new password' });
|
||||
});
|
||||
|
||||
it('should give an error if the new password/confirm new password fields do not match when changing the password of a user', () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue