Skip to content

Commit

Permalink
test: fix missing await
Browse files Browse the repository at this point in the history
  • Loading branch information
porcellus committed May 24, 2024
1 parent 9232775 commit b9131a6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions test/end-to-end/thirdparty.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ export function getThirdPartyTestCases({ authRecipe, rid, signInUpPageLoadLogs,
...signInUpPageLoadLogs,
]);
await waitForUrl(page, "/auth/");
const search = page.evaluate(() => window.location.search);
const search = await page.evaluate(() => window.location.search);
assert(search.endsWith("error=signin"));
});

Expand Down Expand Up @@ -466,7 +466,7 @@ export function getThirdPartyTestCases({ authRecipe, rid, signInUpPageLoadLogs,
...signInUpPageLoadLogs,
]);
await waitForUrl(page, "/auth/");
const search = page.evaluate(() => window.location.search);
const search = await page.evaluate(() => window.location.search);
assert(search.endsWith("error=signin"));
});

Expand Down Expand Up @@ -496,7 +496,7 @@ export function getThirdPartyTestCases({ authRecipe, rid, signInUpPageLoadLogs,
...signInUpPageLoadLogs,
]);
await waitForUrl(page, "/auth/");
const search = page.evaluate(() => window.location.search);
const search = await page.evaluate(() => window.location.search);
assert(search.endsWith("error=signin"));
});

Expand Down Expand Up @@ -526,7 +526,7 @@ export function getThirdPartyTestCases({ authRecipe, rid, signInUpPageLoadLogs,
...signInUpPageLoadLogs,
]);
await waitForUrl(page, "/auth/");
const search = page.evaluate(() => window.location.search);
const search = await page.evaluate(() => window.location.search);
assert(search.endsWith("error=signin"));
});

Expand Down Expand Up @@ -556,7 +556,7 @@ export function getThirdPartyTestCases({ authRecipe, rid, signInUpPageLoadLogs,
...signInUpPageLoadLogs,
]);
await waitForUrl(page, "/auth/");
const search = page.evaluate(() => window.location.search);
const search = await page.evaluate(() => window.location.search);
assert(search.endsWith("error=signin"));
});

Expand Down Expand Up @@ -586,7 +586,7 @@ export function getThirdPartyTestCases({ authRecipe, rid, signInUpPageLoadLogs,
...signInUpPageLoadLogs,
]);
await waitForUrl(page, "/auth/");
const search = page.evaluate(() => window.location.search);
const search = await page.evaluate(() => window.location.search);
assert(search.endsWith("error=signin"));
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/end-to-end/thirdpartyemailpassword.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ describe("SuperTokens Third Party Email Password", function () {
"ST_LOGS SUPERTOKENS GET_REDIRECTION_URL TO_AUTH",
]);
await waitForUrl(page, "/auth/");
const search = page.evaluate(() => window.location.search);
const search = await page.evaluate(() => window.location.search);
assert.deepStrictEqual(search, "?error=signin");
});
});
Expand Down

0 comments on commit b9131a6

Please sign in to comment.