diff --git a/test/e2e/cypress/integration/profiles/passkey/flows.spec.ts b/test/e2e/cypress/integration/profiles/passkey/flows.spec.ts index 7a16d9b0ccb2..43b9782e0443 100644 --- a/test/e2e/cypress/integration/profiles/passkey/flows.spec.ts +++ b/test/e2e/cypress/integration/profiles/passkey/flows.spec.ts @@ -9,12 +9,12 @@ import { testRegistrationWebhook } from "../../../helpers/webhook" const signup = (registration: string, app: string, email = gen.email()) => { cy.visit(registration) - const emailTrait = `${ - app === "express" ? '[data-testid="passwordless-flow"]' : "" - } [name="traits.email"]` const websiteTrait = `${ - app === "express" ? '[data-testid="passwordless-flow"]' : "" - } [name="traits.website"]` + app === "express" ? `form[data-testid="passkey-flow"]` : "" + } input[name="traits.website"]` + const emailTrait = `${ + app === "express" ? `form[data-testid="passkey-flow"]` : "" + } input[name="traits.email"]` cy.get(emailTrait).type(email) cy.get(websiteTrait).type("https://www.ory.sh") @@ -118,12 +118,12 @@ context("Passkey registration", () => { }) const websiteTrait = `${ - app === "express" ? `[data-testid="passwordless-flow"]` : "" - } [name="traits.website"]` + app === "express" ? `form[data-testid="passkey-flow"]` : "" + } input[name="traits.website"]` const emailTrait = `${ - app === "express" ? `[data-testid="passwordless-flow"]` : "" - } [name="traits.email"]` + app === "express" ? `form[data-testid="passkey-flow"]` : "" + } input[name="traits.email"]` cy.get(websiteTrait).type("b") cy.get('[name="method"][value="passkey"]').click() @@ -139,7 +139,8 @@ context("Passkey registration", () => { cy.get('[data-testid="ui/message/4000001"]').should("to.exist") cy.get(websiteTrait).should("have.value", "b") cy.get(emailTrait).should("have.value", email) - cy.get(websiteTrait).clear().type("https://www.ory.sh") + cy.get(websiteTrait).clear() + cy.get(websiteTrait).type("https://www.ory.sh") cy.get('[name="method"][value="passkey"]').click() diff --git a/test/e2e/run.sh b/test/e2e/run.sh index 8578fb5c6509..c0af9664faa2 100755 --- a/test/e2e/run.sh +++ b/test/e2e/run.sh @@ -81,14 +81,12 @@ prepare() { export TEST_DATABASE_COCKROACHDB="cockroach://root@localhost:3446/defaultdb?sslmode=disable" fi - if [ -n ${SKIP_UI_NODE+x} ]; then - if [ -z ${NODE_UI_PATH+x} ]; then - node_ui_dir="$(mktemp -d -t ci-XXXXXXXXXX)/kratos-selfservice-ui-node" - git clone --depth 1 --branch master https://github.com/ory/kratos-selfservice-ui-node.git "$node_ui_dir" - (cd "$node_ui_dir" && npm i --legacy-peer-deps && npm run build) - else - node_ui_dir="${NODE_UI_PATH}" - fi + if [ -z ${NODE_UI_PATH+x} ]; then + node_ui_dir="$(mktemp -d -t ci-XXXXXXXXXX)/kratos-selfservice-ui-node" + git clone --depth 1 --branch master https://github.com/ory/kratos-selfservice-ui-node.git "$node_ui_dir" + (cd "$node_ui_dir" && npm i --legacy-peer-deps && npm run build) + else + node_ui_dir="${NODE_UI_PATH}" fi if [ -z ${RN_UI_PATH+x} ]; then @@ -206,29 +204,25 @@ prepare() { PORT=4746 HYDRA_ADMIN_URL=http://localhost:4745 ./hydra-kratos-login-consent >"${base}/test/e2e/hydra-kratos-ui.e2e.log" 2>&1 & ) - if [ -n ${SKIP_UI_NODE+x} ]; then + ( + cd "$node_ui_dir" + PORT=4456 SECURITY_MODE=cookie npm run start \ + >"${base}/test/e2e/ui-node.e2e.log" 2>&1 & + ) + + if [ -z ${REACT_UI_PATH+x} ]; then ( - cd "$node_ui_dir" - PORT=4456 SECURITY_MODE=cookie npm run start \ - >"${base}/test/e2e/ui-node.e2e.log" 2>&1 & + cd "$react_ui_dir" + NEXT_PUBLIC_KRATOS_PUBLIC_URL=http://localhost:4433 npm run build + NEXT_PUBLIC_KRATOS_PUBLIC_URL=http://localhost:4433 npm run start -- --hostname 127.0.0.1 --port 4458 \ + >"${base}/test/e2e/react-iu.e2e.log" 2>&1 & + ) + else + ( + cd "$react_ui_dir" + PORT=4458 NEXT_PUBLIC_KRATOS_PUBLIC_URL=http://localhost:4433 npm run dev \ + >"${base}/test/e2e/react-iu.e2e.log" 2>&1 & ) - fi - - if [ -n ${SKIP_REACT_UI+x} ]; then - if [ -z ${REACT_UI_PATH+x} ]; then - ( - cd "$react_ui_dir" - NEXT_PUBLIC_KRATOS_PUBLIC_URL=http://localhost:4433 npm run build - NEXT_PUBLIC_KRATOS_PUBLIC_URL=http://localhost:4433 npm run start -- --hostname 127.0.0.1 --port 4458 \ - >"${base}/test/e2e/react-iu.e2e.log" 2>&1 & - ) - else - ( - cd "$react_ui_dir" - PORT=4458 NEXT_PUBLIC_KRATOS_PUBLIC_URL=http://localhost:4433 npm run dev \ - >"${base}/test/e2e/react-iu.e2e.log" 2>&1 & - ) - fi fi (