Skip to content

Commit d506946

Browse files
committed
adjust password mismatch test
1 parent 2b5bdc2 commit d506946

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/platform-ui/cypress/e2e/user-registration.cy.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ describe('User Registration', () => {
5454
cy.get('input[name="password"]').type(password);
5555
cy.get('input[name="retypedPassword"]').type(differentPassword);
5656

57-
// Submit the form
58-
cy.contains('button', 'Create Account').click();
59-
60-
// Assert that we're still on the registration page
61-
cy.url().should('not.include', `/u/${username}`);
57+
// Assert that the Create Account button is disabled due to password mismatch
58+
cy.contains('button', 'Create Account').should('be.disabled');
6259

6360
// Assert that an error message about password mismatch is displayed
6461
cy.contains('Passwords do not match').should('be.visible');
62+
63+
// Assert that we're still on the registration page
64+
cy.url().should('not.include', `/u/${username}`);
6565
});
6666

6767
it('should not render Signup form if logged in', () => {

0 commit comments

Comments
 (0)