-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added new create user test in spanish (#875)
- Added new command to visit spanish page
- Loading branch information
1 parent
c7872ca
commit 8c30966
Showing
3 changed files
with
42 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
describe('Create User', () => { | ||
let username = `cypresstestemail+${Date.now()}@chayn.co`; | ||
before(() => { | ||
cy.cleanUpTestState(); | ||
}); | ||
|
||
it('User should be able to create user', () => { | ||
// Start from the home page | ||
cy.visitSpanishPage('/'); | ||
cy.wait(2000); | ||
cy.get('h1', { timeout: 8000 }) | ||
.contains('Acompáñanos en tu viaje de sanación') | ||
.should('exist'); | ||
cy.get('a[href="/es/auth/register"]', { timeout: 5000 }).first().click({ force: true }); | ||
cy.wait(2000); | ||
cy.get('h2', { timeout: 8000 }).should('contain', 'Crea una cuenta'); | ||
cy.get('#name', { timeout: 8000 }).type('Cypress test'); | ||
cy.get('#email', { timeout: 8000 }).type(username); | ||
cy.get('#password', { timeout: 8000 }).type('testpassword'); | ||
cy.get('button[type="submit"]').contains('Crea una cuenta').click(); | ||
cy.wait(3000); | ||
cy.get('h2', { timeout: 8000 }).should('contain', 'Ayúdanos a entender'); | ||
}); | ||
|
||
after(() => { | ||
cy.logout(); | ||
}); | ||
}); |
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