diff options
| author | Adam Soltys <[email protected]> | 2026-02-11 09:44:48 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-11 15:34:35 -0800 |
| commit | 2cc4969678f4d073ebddec0e7e9f2aac707fb761 (patch) | |
| tree | 7b196647aa87432e4eb420a43d0b9e839078133b /src | |
| parent | b484f522ef032c0469db976a422fc667ca402855 (diff) | |
| download | coinos-ui-2cc4969678f4d073ebddec0e7e9f2aac707fb761.tar.gz coinos-ui-2cc4969678f4d073ebddec0e7e9f2aac707fb761.zip | |
playwright test
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/Balance.svelte | 8 | ||||
| -rw-r--r-- | src/routes/(static)/login/+page.svelte | 10 |
2 files changed, 14 insertions, 4 deletions
diff --git a/src/components/Balance.svelte b/src/components/Balance.svelte index cf61e0b0..4ceaa65a 100644 --- a/src/components/Balance.svelte +++ b/src/components/Balance.svelte @@ -22,13 +22,17 @@ <div> {#if user.haspin && !$pin} - <button onclick={toggleShow} class="flex gap-2 text-xl"> + <button + onclick={toggleShow} + class="flex gap-2 text-xl" + data-testid="balance-show" + > <iconify-icon noobserver icon="ph:eye-slash-bold" width="32" ></iconify-icon> <div class="my-auto">{$t("user.showBalance")}</div> </button> {:else if !isNaN(rate)} - <div class="flex gap-4"> + <div class="flex gap-4" data-testid="balance-value"> <Amount amount={Math.max(balance - (id === user.id ? locked || 0 : 0), 0)} {rate} diff --git a/src/routes/(static)/login/+page.svelte b/src/routes/(static)/login/+page.svelte index d25c6e51..23f772d3 100644 --- a/src/routes/(static)/login/+page.svelte +++ b/src/routes/(static)/login/+page.svelte @@ -66,7 +66,7 @@ const getRecaptchaToken = () => new Promise((resolve, reject) => { - if (isTor) return resolve(""); + if (isTor || !recaptchaSiteKey) return resolve(""); if (!browser || !grecaptcha) return reject(new Error("captcha unavailable")); grecaptcha.ready(() => { grecaptcha @@ -182,6 +182,7 @@ <input name="username" + data-testid="login-username" type="text" required bind:value={username} @@ -198,7 +199,12 @@ > </div> - <button type="submit" class="btn btn-accent" bind:this={btn}> + <button + type="submit" + class="btn btn-accent" + bind:this={btn} + data-testid="login-submit" + > {$t("login.signIn")} </button> |
