diff --git a/examples/with-account-linking/frontend/src/config.tsx b/examples/with-account-linking/frontend/src/config.tsx index dba6e8f0a..062166493 100644 --- a/examples/with-account-linking/frontend/src/config.tsx +++ b/examples/with-account-linking/frontend/src/config.tsx @@ -40,7 +40,7 @@ export const SuperTokensConfig = { }, }), Passwordless.init({ - contactMethod: "PHONE", + contactMethod: "EMAIL_OR_PHONE", }), Session.init(), ], diff --git a/examples/with-account-linking/test/basic.test.js b/examples/with-account-linking/test/basic.test.js index f8fce01c9..029ba9550 100644 --- a/examples/with-account-linking/test/basic.test.js +++ b/examples/with-account-linking/test/basic.test.js @@ -143,11 +143,17 @@ describe("SuperTokens Example Basic tests", function () { await page.evaluate(() => __supertokensSessionRecipe.signOut({})); await new Promise((res) => setTimeout(res, 200)); - await page.goto(`${websiteDomain}/auth?rid=passwordless`); + await page.goto(`${websiteDomain}/auth?show=signup`); - await setInputValues(page, [{ name: "emailOrPhone", value: email }]); - await submitForm(page); + const contWithPwless = await waitForSTElement( + page, + "[data-supertokens~=continueWithPasswordlessButtonWrapper]" + ); + await contWithPwless.click(); + await setInputValues(page, [{ name: "email", value: email }]); + + await submitForm(page); await waitForSTElement(page, "[name=userInputCode]"); const loginAttemptInfo = JSON.parse( diff --git a/examples/with-i18next/src/App.js b/examples/with-i18next/src/App.js index 282e31311..498b26355 100644 --- a/examples/with-i18next/src/App.js +++ b/examples/with-i18next/src/App.js @@ -43,7 +43,7 @@ i18next.init({ AUTH_PAGE_FOOTER_PP: "Privacy Policy", AUTH_PAGE_FOOTER_END: "", - DIVIDER_OR: "or", + DIVIDER_OR: "or translation", THIRD_PARTY_PROVIDER_DEFAULT_BTN_START: "Continue with ", THIRD_PARTY_PROVIDER_DEFAULT_BTN_END: "", @@ -73,23 +73,10 @@ i18next.init({ EMAIL_PASSWORD_PASSWORD_LABEL: "Password", EMAIL_PASSWORD_PASSWORD_PLACEHOLDER: "Password", - EMAIL_PASSWORD_SIGN_IN_HEADER_TITLE: "Sign In", - EMAIL_PASSWORD_SIGN_IN_HEADER_SUBTITLE_START: "Not registered yet?", - EMAIL_PASSWORD_SIGN_IN_HEADER_SUBTITLE_SIGN_UP_LINK: "Sign Up", - EMAIL_PASSWORD_SIGN_IN_HEADER_SUBTITLE_END: "", EMAIL_PASSWORD_SIGN_IN_FORGOT_PW_LINK: "Forgot password?", EMAIL_PASSWORD_SIGN_IN_SUBMIT_BTN: "SIGN IN", EMAIL_PASSWORD_SIGN_IN_WRONG_CREDENTIALS_ERROR: "Incorrect email and password combination", - EMAIL_PASSWORD_SIGN_UP_HEADER_TITLE: "Sign Up", - EMAIL_PASSWORD_SIGN_UP_HEADER_SUBTITLE_START: "Already have an account?", - EMAIL_PASSWORD_SIGN_UP_HEADER_SUBTITLE_SIGN_IN_LINK: "Sign In", - EMAIL_PASSWORD_SIGN_UP_HEADER_SUBTITLE_END: "", - EMAIL_PASSWORD_SIGN_UP_FOOTER_START: "By continuing, you agree to our ", - AUTH_PAGE_FOOTER_TOS: "Terms of Service", - EMAIL_PASSWORD_SIGN_UP_FOOTER_AND: " and ", - EMAIL_PASSWORD_SIGN_UP_FOOTER_PP: "Privacy Policy", - EMAIL_PASSWORD_SIGN_UP_FOOTER_END: "", EMAIL_PASSWORD_SIGN_UP_SUBMIT_BTN: "SIGN UP", EMAIL_PASSWORD_EMAIL_ALREADY_EXISTS: "This email already exists. Please sign in instead", diff --git a/examples/with-no-session-on-sign-up-thirdpartyemailpassword/test/basic.test.js b/examples/with-no-session-on-sign-up-thirdpartyemailpassword/test/basic.test.js index 642d09130..a9c3fd548 100644 --- a/examples/with-no-session-on-sign-up-thirdpartyemailpassword/test/basic.test.js +++ b/examples/with-no-session-on-sign-up-thirdpartyemailpassword/test/basic.test.js @@ -61,7 +61,7 @@ describe("SuperTokens Example Basic tests", function () { before(async function () { browser = await puppeteer.launch({ args: ["--no-sandbox", "--disable-setuid-sandbox"], - headless: false, + headless: true, }); page = await browser.newPage(); }); diff --git a/examples/with-sign-in-up-split-emailpassword/test/basic.test.js b/examples/with-sign-in-up-split-emailpassword/test/basic.test.js index 42a403970..5edd9a37a 100644 --- a/examples/with-sign-in-up-split-emailpassword/test/basic.test.js +++ b/examples/with-sign-in-up-split-emailpassword/test/basic.test.js @@ -75,12 +75,12 @@ describe("SuperTokens Example Basic tests", function () { // redirected to /auth await waitForSTElement(page); - assert.strictEqual(page.url(), websiteDomain + "/auth/?redirectToPath="); + assert.strictEqual(page.url(), websiteDomain + "/signin?redirectToPath="); // Go to separate sign up page const link = await waitForSTElement(page, "#signupLink"); await Promise.all([link.click(), page.waitForNavigation({ waitUntil: "networkidle0" })]); - assert.strictEqual(page.url(), websiteDomain + "/signup?show=signup"); + assert.strictEqual(page.url(), websiteDomain + "/signup"); await setInputValues(page, [ { name: "email", value: email }, diff --git a/examples/with-thirdpartyemailpassword-passwordless/test/basic.test.js b/examples/with-thirdpartyemailpassword-passwordless/test/basic.test.js index 58f61aa00..556c6cf00 100644 --- a/examples/with-thirdpartyemailpassword-passwordless/test/basic.test.js +++ b/examples/with-thirdpartyemailpassword-passwordless/test/basic.test.js @@ -140,7 +140,9 @@ describe("SuperTokens Example Basic tests", function () { it("Successful signup with credentials", async function () { await Promise.all([page.goto(websiteDomain), page.waitForNavigation({ waitUntil: "networkidle0" })]); - const pwlessBtn = await waitForSTElement(page, "#passwordlessLoginBtn"); + await toggleSignInSignUp(page); + + const pwlessBtn = await waitForSTElement(page, "[data-supertokens~=continueWithPasswordlessButtonWrapper]"); await pwlessBtn.click(); // redirected to /auth