test frontend signup flow
This commit is contained in:
parent
3dc9204979
commit
e47535f91c
3 changed files with 145 additions and 15 deletions
|
|
@ -42,28 +42,18 @@ describe('guest authentication pages', () => {
|
|||
cy.visit('/signup')
|
||||
|
||||
cy.get('h1').should('have.text', 'Start your journey')
|
||||
cy.get('label[for="signup-name"]').should('have.text', 'Full name')
|
||||
cy.get('#signup-name').should('have.attr', 'autocomplete', 'name')
|
||||
cy.get('label[for="signup-email"]').should('have.text', 'Email address')
|
||||
cy.get('#signup-email').should('have.attr', 'autocomplete', 'email')
|
||||
cy.get('label[for="signup-password"]').should('have.text', 'Password')
|
||||
cy.get('#signup-password').should('have.attr', 'autocomplete', 'new-password')
|
||||
cy.get('label[for="signup-password-confirmation"]').should(
|
||||
'have.text',
|
||||
'Confirm password',
|
||||
)
|
||||
cy.get('#signup-password-confirmation').should(
|
||||
'have.attr',
|
||||
'autocomplete',
|
||||
'new-password',
|
||||
)
|
||||
cy.get('button[type="submit"]').should('have.text', 'Create account')
|
||||
cy.get('#signup-name').should('not.exist')
|
||||
cy.get('#signup-password').should('not.exist')
|
||||
cy.get('#signup-password-confirmation').should('not.exist')
|
||||
cy.get('button[type="submit"]').should('have.text', 'Continue with email')
|
||||
|
||||
cy.contains('a', 'Log in').click()
|
||||
cy.location('pathname').should('equal', '/login')
|
||||
})
|
||||
|
||||
it('keeps UI-only form submissions on their current route', () => {
|
||||
it('keeps invalid form submissions on their current route', () => {
|
||||
cy.visit('/login')
|
||||
cy.get('form').submit()
|
||||
cy.location('pathname').should('equal', '/login')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue