-
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.
- Loading branch information
Showing
8 changed files
with
30 additions
and
26 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 |
---|---|---|
|
@@ -5,7 +5,7 @@ describe('Password Reset', () => { | |
|
||
describe('Forgot password form', () => { | ||
it('user can ask for password reset', function () { | ||
cy.get('a').contains('Sign in').click(); | ||
cy.get('div[role=button]').contains('Sign in').click(); | ||
cy.get('button').contains('Reset your password').click(); | ||
cy.get('#input-email').type('[email protected]'); | ||
cy.get('button').contains('Reset Password').click(); | ||
|
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 |
---|---|---|
|
@@ -10,33 +10,33 @@ describe('User', () => { | |
context('Login form', () => { | ||
it('can log in', function () { | ||
cy.visit('/'); | ||
cy.get('a').contains('Sign in').click(); | ||
cy.get('div[role=button]').contains('Sign in').click(); | ||
cy.get('#input-email').type('[email protected]'); | ||
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('Supersecret1'); | ||
cy.get('button').contains('Log in').click(); | ||
cy.contains('a', 'My account'); | ||
cy.contains('div[role=button]', 'My account'); | ||
}); | ||
}) | ||
|
||
context('Public user', () => { | ||
it('can log in and out', function () { | ||
cy.login('[email protected]', 'Supersecret1'); | ||
cy.get('a').contains('My account').click(); | ||
cy.get('div[role=button]').contains('My account').click(); | ||
cy.get('a').contains('My profile').click(); | ||
cy.get('#input-firstName').should('have.value', 'Operator'); | ||
cy.get('#input-lastName').should('have.value', 'User'); | ||
cy.get('a').contains('My account').click(); | ||
cy.get('a').contains('Sign out').click(); | ||
cy.get('a').contains('Sign in').should('exist') | ||
cy.get('a').contains('My account').should('not.exist') | ||
cy.get('div[role=button]').contains('My account').click(); | ||
cy.get('div[role=button]').contains('Sign out').click(); | ||
cy.get('div[role=button]').contains('Sign in').should('exist') | ||
cy.get('div[role=button]').contains('My account').should('not.exist') | ||
}); | ||
|
||
it('can create account', function () { | ||
cy.visit('/'); | ||
cy.get('a').contains('Sign in').click(); | ||
cy.get('div[role=button]').contains('Sign in').click(); | ||
cy.get('a').contains('Register now').click(); | ||
cy.selectOption('[name=country_id]', 'Co', 'Congo'); | ||
cy.selectOption('[name=operator_id]', 'Si', 'SIFCO'); | ||
|
@@ -62,7 +62,7 @@ describe('User', () => { | |
|
||
it('can create producer', function () { | ||
cy.visit('/'); | ||
cy.get('a').contains('Sign in').click(); | ||
cy.get('div[role=button]').contains('Sign in').click(); | ||
cy.get('a').contains('Register new producer').click(); | ||
|
||
cy.get('#input-name').type('Super New Producer'); | ||
|
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