Skip to content

Commit

Permalink
test(e2e): ensure advanced types work in forms also
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Oct 19, 2021
1 parent 63dba73 commit 287269c
Show file tree
Hide file tree
Showing 8 changed files with 344 additions and 261 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,13 @@ describe('Basic email profile with failing login flows', () => {

it('should show an error when the identifier is missing', () => {
cy.submitPasswordForm()
cy.get('*[data-testid="ui/message/4000001"]').should(
cy.get('*[data-testid="ui/message/4000002"]').should(
'contain.text',
'length must be >= 1, but got 0'
'Property password_identifier is missing'
)
cy.get('*[data-testid="ui/message/4000002"]').should(
'contain.text',
'Property password is missing'
)
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ context('Registration success with email profile', () => {
cy.get('input[name="traits"]').should('not.exist')
cy.get('input[name="traits.email"]').type(email)
cy.get('input[name="password"]').type(password)
cy.get('input[name="website"]').type('')
const website = 'https://www.ory.sh/'
cy.get('input[name="traits.website"]').type(website)

cy.submitPasswordForm()
cy.get('pre').should('contain.text', email)
Expand All @@ -69,9 +70,9 @@ context('Registration success with email profile', () => {
expect(identity.verifiable_addresses).to.be.undefined
expect(identity.schema_id).to.equal('default')
expect(identity.schema_url).to.equal(`${APP_URL}/schemas/default`)
expect(identity.traits.website).to.equal('')
expect(identity.traits.website).to.equal(website)
expect(identity.traits.email).to.equal(email)
expect(identity.traits.age).to.equal(0)
expect(identity.traits.age).to.be.undefined
expect(identity.traits.tos).to.equal(false)
})
})
Expand Down
242 changes: 0 additions & 242 deletions test/e2e/cypress/integration/profiles/mfa/lookup.spec.js

This file was deleted.

0 comments on commit 287269c

Please sign in to comment.