diff --git a/selfservice/hook/code_address_verifier_test.go b/selfservice/hook/code_address_verifier_test.go index 615262d6f6d3..b39f59dfbc2e 100644 --- a/selfservice/hook/code_address_verifier_test.go +++ b/selfservice/hook/code_address_verifier_test.go @@ -1,3 +1,6 @@ +// Copyright © 2023 Ory Corp +// SPDX-License-Identifier: Apache-2.0 + package hook_test import ( @@ -8,6 +11,8 @@ import ( "time" "github.com/gofrs/uuid" + "github.com/stretchr/testify/require" + "github.com/ory/kratos/identity" "github.com/ory/kratos/internal" "github.com/ory/kratos/internal/testhelpers" @@ -18,7 +23,6 @@ import ( "github.com/ory/kratos/session" "github.com/ory/kratos/x" "github.com/ory/x/randx" - "github.com/stretchr/testify/require" ) func TestCodeAddressVerifier(t *testing.T) { diff --git a/test/e2e/cypress/integration/profiles/code/registration/error.spec.ts b/test/e2e/cypress/integration/profiles/code/registration/error.spec.ts index e69de29bb2d1..10353f51c3e7 100644 --- a/test/e2e/cypress/integration/profiles/code/registration/error.spec.ts +++ b/test/e2e/cypress/integration/profiles/code/registration/error.spec.ts @@ -0,0 +1,2 @@ +// Copyright © 2023 Ory Corp +// SPDX-License-Identifier: Apache-2.0 diff --git a/test/e2e/cypress/support/commands.ts b/test/e2e/cypress/support/commands.ts index 12fe045c101d..e5d5c0d43cf4 100644 --- a/test/e2e/cypress/support/commands.ts +++ b/test/e2e/cypress/support/commands.ts @@ -80,7 +80,7 @@ Cypress.Commands.add("proxy", (app: string) => { }) }) -Cypress.Commands.add("shortPrivilegedSessionTime", ({ } = {}) => { +Cypress.Commands.add("shortPrivilegedSessionTime", ({} = {}) => { updateConfigFile((config) => { config.selfservice.flows.settings.privileged_session_max_age = "1ms" return config @@ -109,50 +109,50 @@ Cypress.Commands.add("setDefaultIdentitySchema", (id: string) => { }) }) -Cypress.Commands.add("longPrivilegedSessionTime", ({ } = {}) => { +Cypress.Commands.add("longPrivilegedSessionTime", ({} = {}) => { updateConfigFile((config) => { config.selfservice.flows.settings.privileged_session_max_age = "5m" return config }) }) -Cypress.Commands.add("longVerificationLifespan", ({ } = {}) => { +Cypress.Commands.add("longVerificationLifespan", ({} = {}) => { updateConfigFile((config) => { config.selfservice.flows.verification.lifespan = "1m" return config }) }) -Cypress.Commands.add("shortVerificationLifespan", ({ } = {}) => { +Cypress.Commands.add("shortVerificationLifespan", ({} = {}) => { updateConfigFile((config) => { config.selfservice.flows.verification.lifespan = "1ms" return config }) }) -Cypress.Commands.add("sessionRequiresNo2fa", ({ } = {}) => { +Cypress.Commands.add("sessionRequiresNo2fa", ({} = {}) => { updateConfigFile((config) => { config.session.whoami.required_aal = "aal1" return config }) }) -Cypress.Commands.add("sessionRequires2fa", ({ } = {}) => { +Cypress.Commands.add("sessionRequires2fa", ({} = {}) => { updateConfigFile((config) => { config.session.whoami.required_aal = "highest_available" return config }) }) -Cypress.Commands.add("shortLinkLifespan", ({ } = {}) => { +Cypress.Commands.add("shortLinkLifespan", ({} = {}) => { updateConfigFile((config) => { config.selfservice.methods.link.config.lifespan = "1ms" return config }) }) -Cypress.Commands.add("longLinkLifespan", ({ } = {}) => { +Cypress.Commands.add("longLinkLifespan", ({} = {}) => { updateConfigFile((config) => { config.selfservice.methods.link.config.lifespan = "1m" return config }) }) -Cypress.Commands.add("shortCodeLifespan", ({ } = {}) => { +Cypress.Commands.add("shortCodeLifespan", ({} = {}) => { updateConfigFile((config) => { config.selfservice.methods.code.config.lifespan = "1ms" return config @@ -173,28 +173,28 @@ Cypress.Commands.add("longLifespan", (strategy: Strategy) => { }) }) -Cypress.Commands.add("longCodeLifespan", ({ } = {}) => { +Cypress.Commands.add("longCodeLifespan", ({} = {}) => { updateConfigFile((config) => { config.selfservice.methods.code.config.lifespan = "1m" return config }) }) -Cypress.Commands.add("shortCodeLifespan", ({ } = {}) => { +Cypress.Commands.add("shortCodeLifespan", ({} = {}) => { updateConfigFile((config) => { config.selfservice.methods.code.config.lifespan = "1ms" return config }) }) -Cypress.Commands.add("longCodeLifespan", ({ } = {}) => { +Cypress.Commands.add("longCodeLifespan", ({} = {}) => { updateConfigFile((config) => { config.selfservice.methods.code.config.lifespan = "1m" return config }) }) -Cypress.Commands.add("longRecoveryLifespan", ({ } = {}) => { +Cypress.Commands.add("longRecoveryLifespan", ({} = {}) => { updateConfigFile((config) => { config.selfservice.flows.recovery.lifespan = "1m" return config @@ -225,20 +225,20 @@ Cypress.Commands.add("setPostCodeRegistrationHooks", (hooks) => { cy.setupHooks("registration", "after", "code", hooks) }) -Cypress.Commands.add("shortLoginLifespan", ({ } = {}) => { +Cypress.Commands.add("shortLoginLifespan", ({} = {}) => { updateConfigFile((config) => { config.selfservice.flows.login.lifespan = "100ms" return config }) }) -Cypress.Commands.add("longLoginLifespan", ({ } = {}) => { +Cypress.Commands.add("longLoginLifespan", ({} = {}) => { updateConfigFile((config) => { config.selfservice.flows.login.lifespan = "1h" return config }) }) -Cypress.Commands.add("shortRecoveryLifespan", ({ } = {}) => { +Cypress.Commands.add("shortRecoveryLifespan", ({} = {}) => { updateConfigFile((config) => { config.selfservice.flows.recovery.lifespan = "1ms" return config @@ -253,7 +253,7 @@ Cypress.Commands.add("requireStrictAal", () => { }) }) -Cypress.Commands.add("useLaxAal", ({ } = {}) => { +Cypress.Commands.add("useLaxAal", ({} = {}) => { updateConfigFile((config) => { config.selfservice.flows.settings.required_aal = "aal1" config.session.whoami.required_aal = "aal1" @@ -261,21 +261,21 @@ Cypress.Commands.add("useLaxAal", ({ } = {}) => { }) }) -Cypress.Commands.add("disableVerification", ({ } = {}) => { +Cypress.Commands.add("disableVerification", ({} = {}) => { updateConfigFile((config) => { config.selfservice.flows.verification.enabled = false return config }) }) -Cypress.Commands.add("enableVerification", ({ } = {}) => { +Cypress.Commands.add("enableVerification", ({} = {}) => { updateConfigFile((config) => { config.selfservice.flows.verification.enabled = true return config }) }) -Cypress.Commands.add("enableRecovery", ({ } = {}) => { +Cypress.Commands.add("enableRecovery", ({} = {}) => { updateConfigFile((config) => { if (!config.selfservice.flows.recovery) { config.selfservice.flows.recovery = {} @@ -306,28 +306,28 @@ Cypress.Commands.add("disableRecoveryStrategy", (strategy: Strategy) => { }) }) -Cypress.Commands.add("disableRecovery", ({ } = {}) => { +Cypress.Commands.add("disableRecovery", ({} = {}) => { updateConfigFile((config) => { config.selfservice.flows.recovery.enabled = false return config }) }) -Cypress.Commands.add("disableRegistration", ({ } = {}) => { +Cypress.Commands.add("disableRegistration", ({} = {}) => { updateConfigFile((config) => { config.selfservice.flows.registration.enabled = false return config }) }) -Cypress.Commands.add("enableRegistration", ({ } = {}) => { +Cypress.Commands.add("enableRegistration", ({} = {}) => { updateConfigFile((config) => { config.selfservice.flows.registration.enabled = true return config }) }) -Cypress.Commands.add("useLaxAal", ({ } = {}) => { +Cypress.Commands.add("useLaxAal", ({} = {}) => { updateConfigFile((config) => { config.selfservice.flows.settings.required_aal = "aal1" config.session.whoami.required_aal = "aal1" @@ -659,21 +659,21 @@ Cypress.Commands.add( }, ) -Cypress.Commands.add("shortRegisterLifespan", ({ } = {}) => { +Cypress.Commands.add("shortRegisterLifespan", ({} = {}) => { updateConfigFile((config) => { config.selfservice.flows.registration.lifespan = "100ms" return config }) }) -Cypress.Commands.add("longRegisterLifespan", ({ } = {}) => { +Cypress.Commands.add("longRegisterLifespan", ({} = {}) => { updateConfigFile((config) => { config.selfservice.flows.registration.lifespan = "1h" return config }) }) -Cypress.Commands.add("browserReturnUrlOry", ({ } = {}) => { +Cypress.Commands.add("browserReturnUrlOry", ({} = {}) => { updateConfigFile((config) => { config.selfservice.allowed_return_urls = [ "https://www.ory.sh/", @@ -683,7 +683,7 @@ Cypress.Commands.add("browserReturnUrlOry", ({ } = {}) => { }) }) -Cypress.Commands.add("remoteCourierRecoveryTemplates", ({ } = {}) => { +Cypress.Commands.add("remoteCourierRecoveryTemplates", ({} = {}) => { updateConfigFile((config) => { config.courier.templates = { recovery: { @@ -713,7 +713,7 @@ Cypress.Commands.add("remoteCourierRecoveryTemplates", ({ } = {}) => { }) }) -Cypress.Commands.add("remoteCourierRecoveryCodeTemplates", ({ } = {}) => { +Cypress.Commands.add("remoteCourierRecoveryCodeTemplates", ({} = {}) => { updateConfigFile((config) => { config.courier.templates = { recovery_code: {