Skip to content

Commit 2c8d6ec

Browse files
Get rid of using random UUID for appId
1 parent 7e5c70f commit 2c8d6ec

File tree

2 files changed

+8
-18
lines changed

2 files changed

+8
-18
lines changed

test/end-to-end/accountlinking.test.js

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ import {
4545
screenshotOnFailure,
4646
} from "../helpers";
4747
import { TEST_CLIENT_BASE_URL, RESET_PASSWORD_API } from "../constants";
48-
import { randomUUID } from "node:crypto";
4948

5049
/*
5150
* Tests.
@@ -322,8 +321,7 @@ describe("SuperTokens Account linking", function () {
322321

323322
it("should not allow sign in w/ an unverified emailpassword user in case of conflict", async function () {
324323
// Use a common appId over the test to allow re-inits
325-
const appId = randomUUID();
326-
const coreUrl = await setupCoreApp({ appId });
324+
const coreUrl = await setupCoreApp({ appId: "test-app-id" });
327325
await setupST({
328326
coreUrl,
329327
passwordlessFlowType,
@@ -491,8 +489,7 @@ describe("SuperTokens Account linking", function () {
491489

492490
it("should not allow sign in w/ an unverified thirdparty user in case of conflict", async function () {
493491
// Use a common appId over the test to allow re-inits
494-
const appId = randomUUID();
495-
const coreUrl = await setupCoreApp({ appId });
492+
const coreUrl = await setupCoreApp({ appId: "test-app-id" });
496493
await setupST({
497494
coreUrl,
498495
passwordlessFlowType,
@@ -561,8 +558,7 @@ describe("SuperTokens Account linking", function () {
561558
const email = `test-user+${Date.now()}@supertokens.com`;
562559

563560
// Use a common appId over the test to allow re-inits
564-
const appId = randomUUID();
565-
const coreUrl = await setupCoreApp({ appId });
561+
const coreUrl = await setupCoreApp({ appId: "test-app-id" });
566562
await setupST({
567563
coreUrl,
568564
passwordlessFlowType,
@@ -611,8 +607,7 @@ describe("SuperTokens Account linking", function () {
611607
it("should not allow sign up w/ passwordless if it conflicts with an unverified user", async function () {
612608
const email = `test-user+${Date.now()}@supertokens.com`;
613609
// Use a common appId over the test to allow re-inits
614-
const appId = randomUUID();
615-
const coreUrl = await setupCoreApp({ appId });
610+
const coreUrl = await setupCoreApp({ appId: "test-app-id" });
616611
await setupST({
617612
coreUrl,
618613
passwordlessFlowType,
@@ -663,8 +658,7 @@ describe("SuperTokens Account linking", function () {
663658
const email2 = `test-user2+${Date.now()}@supertokens.com`;
664659

665660
// Use a common appId over the test to allow re-inits
666-
const appId = randomUUID();
667-
const coreUrl = await setupCoreApp({ appId });
661+
const coreUrl = await setupCoreApp({ appId: "test-app-id" });
668662
await setupST({
669663
coreUrl,
670664
passwordlessFlowType,
@@ -739,8 +733,7 @@ describe("SuperTokens Account linking", function () {
739733
await page.evaluate(() => window.localStorage.setItem("mode", "REQUIRED"));
740734

741735
// Use a common appId over the test to allow re-inits
742-
const appId = randomUUID();
743-
const coreUrl = await setupCoreApp({ appId });
736+
const coreUrl = await setupCoreApp({ appId: "test-app-id" });
744737
await setupST({
745738
coreUrl,
746739
passwordlessFlowType,

test/end-to-end/passwordless.test_gen.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ import {
4040

4141
import { TEST_CLIENT_BASE_URL, SOMETHING_WENT_WRONG_ERROR } from "../constants";
4242
import { tryEmailPasswordSignUp, tryPasswordlessSignInUp } from "./mfa.helpers";
43-
import { randomUUID } from "crypto";
4443

4544
const examplePhoneNumber = "+36701231212";
4645
const exampleEmail = "[email protected]";
@@ -129,9 +128,8 @@ export function getPasswordlessTestCases({ authRecipe, logId, generalErrorRecipe
129128
const contactMethod = "EMAIL_OR_PHONE";
130129

131130
before(async function () {
132-
const appId = randomUUID();
133131
const coreUrl = await setupCoreApp({
134-
appId,
132+
appId: "test-app-id",
135133
coreConfig: {
136134
passwordless_code_lifetime: 4000,
137135
passwordless_max_code_input_attempts: 3,
@@ -338,15 +336,14 @@ export function getPasswordlessTestCases({ authRecipe, logId, generalErrorRecipe
338336

339337
let accountLinkingSupported;
340338
let coreUrl;
341-
const appId = randomUUID();
342339
const coreConfig = {
343340
passwordless_code_lifetime: 4000,
344341
passwordless_max_code_input_attempts: 3,
345342
};
346343

347344
before(async function () {
348345
coreUrl = await setupCoreApp({
349-
appId,
346+
appId: "test-app-id",
350347
coreConfig,
351348
});
352349
});

0 commit comments

Comments
 (0)