Skip to content

Commit 224cae0

Browse files
authored
test: update tests to fix CI (#802)
* test: update tests to fix CI * test: add more missing var declarations
1 parent e466d10 commit 224cae0

File tree

6 files changed

+4
-38
lines changed

6 files changed

+4
-38
lines changed

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

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -437,43 +437,6 @@ describe("SuperTokens Account linking", function () {
437437
assert.strictEqual(new URL(page.url()).pathname, "/auth/");
438438
});
439439

440-
// TODO: explain
441-
it.skip("should not allow sign up w/ passwordless after changing the email if it conflicts with an unverified user", async function () {
442-
const email = `test-user+${Date.now()}@supertokens.com`;
443-
const email2 = `test-user-2+${Date.now()}@supertokens.com`;
444-
445-
await setAccountLinkingConfig(true, false);
446-
// 1. Sign up without account linking with an unverified ep user & log out
447-
await tryEmailPasswordSignUp(page, email);
448-
await logOut(page);
449-
450-
// 2. Sign up with passwordless
451-
await tryPasswordlessSignInUp(page, email2);
452-
await Promise.all([page.waitForSelector(".sessionInfo-user-id"), page.waitForNetworkIdle()]);
453-
const accessTokenPayload = await page.evaluate(() =>
454-
window.__supertokensSessionRecipe.getAccessTokenPayloadSecurely()
455-
);
456-
const userId = accessTokenPayload.sub;
457-
await logOut(page);
458-
459-
await page.evaluate(() => localStorage.removeItem("supertokens-passwordless-loginAttemptInfo"));
460-
await Promise.all([
461-
page.goto(`${TEST_CLIENT_BASE_URL}/auth/?authRecipe=passwordless`),
462-
page.waitForNavigation({ waitUntil: "networkidle0" }),
463-
]);
464-
await changeEmail("passwordless", userId, email);
465-
await setAccountLinkingConfig(true, true, true);
466-
467-
await setInputValues(page, [{ name: "emailOrPhone", value: email }]);
468-
await submitForm(page);
469-
470-
assert.strictEqual(
471-
await getGeneralError(page),
472-
"Cannot sign in / up due to security reasons. Please try a different login method or contact support. (ERR_CODE_003)"
473-
);
474-
assert.strictEqual(new URL(page.url()).pathname, "/auth/");
475-
});
476-
477440
it("should not allow sign up w/ passwordless if it conflicts with an unverified user", async function () {
478441
const email = `test-user+${Date.now()}@supertokens.com`;
479442

test/end-to-end/mfa.chooserscreen.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ describe("SuperTokens SignIn w/ MFA", function () {
6565
let browser;
6666
let page;
6767
let consoleLogs = [];
68+
let skipped = false;
6869

6970
before(async function () {
7071
if (!(await isMFASupported())) {

test/end-to-end/mfa.default_reqs.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ describe("SuperTokens SignIn w/ MFA", function () {
6666
let browser;
6767
let page;
6868
let consoleLogs = [];
69+
let skipped = false;
6970

7071
before(async function () {
7172
if (!(await isMFASupported())) {

test/end-to-end/mfa.factorscreen.otp.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ describe("SuperTokens SignIn w/ MFA", function () {
6666
let browser;
6767
let page;
6868
let consoleLogs = [];
69+
let skipped = false;
6970

7071
before(async function () {
7172
if (!(await isMFASupported())) {

test/end-to-end/mfa.factorscreen.totp.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ describe("SuperTokens SignIn w/ MFA", function () {
6666
let browser;
6767
let page;
6868
let consoleLogs = [];
69+
let skipped = false;
6970

7071
before(async function () {
7172
if (!(await isMFASupported())) {

test/end-to-end/mfa.helpers.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import { TEST_CLIENT_BASE_URL } from "../constants";
1717
import { getTestPhoneNumber } from "../exampleTestHelpers";
1818

1919
export async function setupUserWithAllFactors(page) {
20-
// TODO: it'd be cleaner if this part was not done through the app
2120
const email = await getTestEmail();
2221
const phoneNumber = getTestPhoneNumber();
2322
await clearBrowserCookiesWithoutAffectingConsole(page, []);

0 commit comments

Comments
 (0)