Skip to content

Commit 0c8b068

Browse files
Add fixes for all webauthn tests
1 parent 24b797c commit 0c8b068

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

lib/build/webauthnprebuiltui.js

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/ts/recipe/webauthn/components/themes/signUp/signUpForm.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export const SignUpForm = (
164164
});
165165

166166
// If it is an error related to passkey, we need to handle it.
167-
if (response.status === "OK") {
167+
if (response.status !== "OK") {
168168
setErrorLabel("WEBAUTHN_PASSKEY_RECOVERABLE_ERROR");
169169
}
170170

@@ -209,6 +209,7 @@ export const SignUpForm = (
209209
}
210210
}
211211
} catch (e) {
212+
console.error("error", e);
212213
props.setActiveScreen(SignUpScreen.Error);
213214
} finally {
214215
if (setIsLoading) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ describe("SuperTokens Webauthn Recovery Email", () => {
9090
]);
9191

9292
// Verify that the email is sent by fetching the token through the API
93-
const token = await getTokenFromEmail(page, email);
93+
const token = await getTokenFromEmail(email);
9494
assert.ok(token);
9595
assert.strictEqual(token.length, 128);
9696
});

test/helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export async function getSubmitFormButtonLabelWithoutShadowDom(page) {
178178
}
179179

180180
export async function getSubmitFormButton(page) {
181-
return waitForSTElement(page, "[data-supertokens='button']");
181+
return waitForSTElement(page, "[data-supertokens~='button']");
182182
}
183183

184184
export async function getInputField(page, name) {

0 commit comments

Comments
 (0)