Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Feb 14, 2022
1 parent a607385 commit 90605e8
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 97 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {appPrefix, gen, website} from '../../../../helpers'
import {routes as react} from '../../../../helpers/react'
import {routes as express} from '../../../../helpers/express'
import { appPrefix, gen, website } from '../../../../helpers'
import { routes as react } from '../../../../helpers/react'
import { routes as express } from '../../../../helpers/express'

context('Social Sign Up Successes', () => {
;[
Expand All @@ -16,7 +16,7 @@ context('Social Sign Up Successes', () => {
app: 'express' as 'express',
profile: 'oidc'
}
].forEach(({registration, login, profile, app}) => {
].forEach(({ registration, login, profile, app }) => {
describe(`for app ${app}`, () => {
before(() => {
cy.useConfigProfile(profile)
Expand All @@ -32,7 +32,7 @@ context('Social Sign Up Successes', () => {
})

const shouldSession = (email) => (session) => {
const {identity} = session
const { identity } = session
expect(identity.id).to.not.be.empty
expect(identity.traits.website).to.equal(website)
expect(identity.traits.email).to.equal(email)
Expand All @@ -41,7 +41,7 @@ context('Social Sign Up Successes', () => {
it('should be able to sign up with incomplete data and finally be signed in', () => {
const email = gen.email()

cy.registerOidc({email, expectSession: false, route: registration})
cy.registerOidc({ email, expectSession: false, route: registration })

cy.get('#registration-password').should('not.exist')
cy.get(appPrefix(app) + '[name="traits.email"]').should(
Expand Down Expand Up @@ -97,14 +97,14 @@ context('Social Sign Up Successes', () => {
it('should be able to sign up with complete data', () => {
const email = gen.email()

cy.registerOidc({email, website, route: registration})
cy.registerOidc({ email, website, route: registration })
cy.getSession().should(shouldSession(email))
})

it('should be able to convert a sign up flow to a sign in flow', () => {
const email = gen.email()

cy.registerOidc({email, website, route: registration})
cy.registerOidc({ email, website, route: registration })
cy.logout()
cy.noSession()
cy.visit(registration)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ context('Social Sign In Settings Success', () => {
cy.get('#accept').click()

cy.get('input[name="traits.website"]').clear().type(website)
cy.triggerOidc(app,'hydra')
cy.triggerOidc(app, 'hydra')

cy.get('[data-testid="ui/message/4000007"]').should(
'contain.text',
Expand Down
Loading

0 comments on commit 90605e8

Please sign in to comment.