-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/new-password-requirements' into staging
- Loading branch information
Showing
9 changed files
with
108 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ describe('Operator', function () { | |
|
||
context('when logged in as Operator', function () { | ||
beforeEach(function () { | ||
cy.login('[email protected]', 'password'); | ||
cy.login('[email protected]', 'Supersecret1'); | ||
}); | ||
|
||
describe('updating operator profile', function () { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,15 +15,15 @@ describe('User', () => { | |
cy.get('#input-password').type('wrongpassword'); | ||
cy.get('button').contains('Log in').click(); | ||
cy.get('.rrt-text').should('have.text', 'Wrong email or password'); | ||
cy.get('#input-password').clear().type('password'); | ||
cy.get('#input-password').clear().type('Supersecret1'); | ||
cy.get('button').contains('Log in').click(); | ||
cy.contains('a', 'My account'); | ||
}); | ||
}) | ||
|
||
context('Public user', () => { | ||
it('can log in and out', function () { | ||
cy.login('[email protected]', 'password'); | ||
cy.login('[email protected]', 'Supersecret1'); | ||
cy.get('a').contains('My account').click(); | ||
cy.get('a').contains('My profile').click(); | ||
cy.get('#input-firstName').should('have.value', 'Operator'); | ||
|
@@ -44,11 +44,17 @@ describe('User', () => { | |
cy.get('#input-first_name').type('Test'); | ||
cy.get('#input-last_name').type('Operator'); | ||
cy.get('#input-email').type('[email protected]'); | ||
cy.get('#input-password').type('supersecret'); | ||
cy.get('#input-password_confirmation').type('supersecret'); | ||
cy.get('#input-password').type('password'); | ||
cy.get('#input-password_confirmation').type('password2'); | ||
cy.get('button').contains('Sign up').click(); | ||
cy.get('.error').should('have.text', 'The field is required'); | ||
cy.contains('.error', 'The field is required'); | ||
cy.contains('.error', 'The field should have at least one capital (uppercase) letter'); | ||
cy.contains('.error', 'The field should have at least one digit'); | ||
cy.contains('.error', 'The field should have at least 10 characters'); | ||
cy.contains('.error', 'The field should be equal to password'); | ||
cy.get('.rrt-text').should('have.text', 'Fill all the required fields'); | ||
cy.get('#input-password').clear().type('Superpassword1'); | ||
cy.get('#input-password_confirmation').clear().type('Superpassword1'); | ||
cy.get('label[for=checkbox-agree-undefined]').click(); | ||
cy.get('button').contains('Sign up').click(); | ||
cy.get('.c-info-box').contains('you will receive an email to [email protected] once your account is approved'); | ||
|
@@ -78,7 +84,7 @@ describe('User', () => { | |
|
||
context('Logged in User', () => { | ||
beforeEach(() => { | ||
cy.login('[email protected]', 'password'); | ||
cy.login('[email protected]', 'Supersecret1'); | ||
}); | ||
|
||
it('can update user profile', function () { | ||
|
@@ -90,9 +96,9 @@ describe('User', () => { | |
cy.get('#input-lastName').clear(); | ||
cy.get('#input-lastName').type('Operator 2'); | ||
cy.selectOption('[name=locale]', 'Po', 'Português'); | ||
cy.get('#input-password').type('supersecret'); | ||
cy.get('#input-passwordConfirmation').type('supersecret'); | ||
cy.get('#input-currentPassword').type('password'); | ||
cy.get('#input-password').type('GreatPassword1'); | ||
cy.get('#input-passwordConfirmation').type('GreatPassword1'); | ||
cy.get('#input-currentPassword').type('Supersecret1'); | ||
|
||
cy.get('button').contains('Update').click(); | ||
cy.get('.rrt-text').should('have.text', 'Profile saved correctly'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters