Skip to content

Commit fdb63b0

Browse files
committed
test: further test/example fixes
1 parent 268cc45 commit fdb63b0

File tree

5 files changed

+5
-11
lines changed

5 files changed

+5
-11
lines changed

examples/with-account-linking/backend/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function getOtp() {
3030
export const SuperTokensConfig: TypeInput = {
3131
supertokens: {
3232
// this is the location of the SuperTokens core.
33-
connectionURI: "http://localhost:9000",
33+
connectionURI: "https://try.supertokens.com",
3434
},
3535
appInfo: {
3636
appName: "SuperTokens Demo App",

examples/with-i18next/test/basic.test.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,7 @@ describe("SuperTokens Example Basic tests", function () {
7373
it("Successful signup with credentials", async function () {
7474
await Promise.all([page.goto(websiteDomain), page.waitForNavigation({ waitUntil: "networkidle0" })]);
7575

76-
const dividerTextEle = await waitForSTElement(
77-
page,
78-
"[data-supertokens~='thirdPartyEmailPasswordDividerOr']"
79-
);
76+
const dividerTextEle = await waitForSTElement(page, "[data-supertokens~='dividerWithOr']");
8077
const dividerText = await page.evaluate((e) => e.innerText, dividerTextEle);
8178
assert.strictEqual(dividerText, "or translation");
8279

examples/with-no-session-on-sign-up-thirdpartyemailpassword/test/basic.test.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ describe("SuperTokens Example Basic tests", function () {
6161
before(async function () {
6262
browser = await puppeteer.launch({
6363
args: ["--no-sandbox", "--disable-setuid-sandbox"],
64-
headless: true,
64+
headless: false,
6565
});
6666
page = await browser.newPage();
6767
});
@@ -91,9 +91,6 @@ describe("SuperTokens Example Basic tests", function () {
9191
// Wait until the ... disappears from the button indicating it's done
9292
await page.waitForFunction((e) => !e.innerText.endsWith("..."), {}, submitButton);
9393
}
94-
95-
// We switch back over to sign in...
96-
await toggleSignInSignUp(page);
9794
await waitForSTElement(page, "[data-supertokens~='forgotPasswordLink']");
9895

9996
// It only shows up after navigation

examples/with-thirdpartyemailpassword-passwordless/test/basic.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ describe("SuperTokens Example Basic tests", function () {
144144
await pwlessBtn.click();
145145

146146
// redirected to /auth
147-
await setInputValues(page, [{ name: "emailOrPhone", value: email }]);
147+
await setInputValues(page, [{ name: "email", value: email }]);
148148
await submitForm(page);
149149
// Sent the otp
150150
await waitForSTElement(page, "[name=userInputCode]");

test/helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export async function waitForSTElement(page, selector, inverted = false) {
9393
}
9494
return res;
9595
} catch (ex) {
96-
if (start >= Date.now() - 30000) {
96+
if (start < Date.now() - 30000) {
9797
throw ex;
9898
}
9999
console.log("Caught exception in waitForSTElement, but retrying until timeout", ex);

0 commit comments

Comments
 (0)