Skip to content

Commit 01d9f54

Browse files
Add fixes for tests to use the correct server URL for token
1 parent 3c6d3c2 commit 01d9f54

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TEST_CLIENT_BASE_URL, TEST_SERVER_BASE_URL } from "../constants";
1+
import { TEST_APPLICATION_SERVER_BASE_URL, TEST_CLIENT_BASE_URL } from "../constants";
22
import { toggleSignInSignUp, setInputValues, submitFormUnsafe, waitForSTElement } from "../helpers";
33

44
export async function openWebauthnSignUp(page) {
@@ -75,7 +75,7 @@ export async function getTokenFromEmail(email) {
7575
// Make an API call to get the token from the email
7676
// Since the email can contain special characters, we need to encode it
7777
const encodedEmail = encodeURIComponent(email);
78-
const response = await fetch(`${TEST_SERVER_BASE_URL}/test/webauthn/get-token?email=${encodedEmail}`);
78+
const response = await fetch(`${TEST_APPLICATION_SERVER_BASE_URL}/test/webauthn/get-token?email=${encodedEmail}`);
7979
const data = await response.json();
8080
return data.token;
8181
}

test/end-to-end/webauthn.signin.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ describe("SuperTokens Webauthn SignIn", () => {
8181
"ST_LOGS SESSION OVERRIDE GET_USER_ID",
8282
"ST_LOGS WEBAUTHN OVERRIDE SIGN IN",
8383
"ST_LOGS WEBAUTHN PRE_API_HOOKS SIGN_IN",
84+
"ST_LOGS SESSION ON_HANDLE_EVENT ACCESS_TOKEN_PAYLOAD_UPDATED",
85+
"ST_LOGS SESSION OVERRIDE GET_USER_ID",
8486
]);
8587
});
8688
it("should recover successfully from a recoverable error", async () => {

0 commit comments

Comments
 (0)