diff options
| author | Adam Soltys <[email protected]> | 2026-09-27 08:29:01 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-09-27 08:29:01 -0700 |
| commit | 3da7f9d52dee6a535190cd5e0db152a3689c7e8e (patch) | |
| tree | 59197752b56538cf967c5b33758423c8d92e0eb1 /tools/padlock-ask-test.js | |
| parent | b06bbb48e6c6c7f81a9592ab9562bb8e3042b2b6 (diff) | |
| download | coinosv3-3da7f9d52dee6a535190cd5e0db152a3689c7e8e.tar.gz coinosv3-3da7f9d52dee6a535190cd5e0db152a3689c7e8e.zip | |
Accounts: tapping an identity signs in as it and opens its profile; the padlock moves from the header to this page.
The identity chip used to put the npub in the URL and leave the list on
screen (the profile only paints over the wallet screen). Lock/Unlock now sits
with the other device-wide actions (log out, clear); the padlock tests reach it
through the Accounts page and lose their stale "Wallets" button.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VhUKyXKtsJ67QAFfb7QR9D
Diffstat (limited to 'tools/padlock-ask-test.js')
| -rw-r--r-- | tools/padlock-ask-test.js | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tools/padlock-ask-test.js b/tools/padlock-ask-test.js index e2837e5..f1fa3cf 100644 --- a/tools/padlock-ask-test.js +++ b/tools/padlock-ask-test.js @@ -35,27 +35,25 @@ try { await click('button', 'Open wallet'); await waitText('receive', 20000); - // open my own profile (the header avatar) - await page.evaluate(() => document.querySelector('.header-avatar')?.click()); + // open the Accounts page (the balance card's switcher) — the padlock lives there + await page.evaluate(() => document.querySelector('.balance-switch')?.click()); await sleep(900); - const onProfile = await page.evaluate(() => !!document.querySelector('.profile-avatar, .chat-avatar.profile-avatar')); - check('profile page is open', onProfile, (await bodyText()).slice(0, 60).replace(/\n/g, ' | ')); + check('Accounts page is open', /add account/i.test(await bodyText()), (await bodyText()).slice(0, 60).replace(/\n/g, ' | ')); // tap the padlock — the ask must appear without navigating anywhere const tapped = await page.evaluate(() => { const b = [...document.querySelectorAll('button')].find((e) => /lock/i.test(e.getAttribute('aria-label') || '')); if (!b) return false; b.click(); return true; }); - check('padlock is reachable from the profile page', tapped); + check('padlock is reachable from the Accounts page', tapped); await sleep(500); const text = await bodyText(); check('the ask appears on the tap', /protect this device/i.test(text), text.split('\n').slice(0, 3).join(' | ')); - // declining lands back on the profile, not somewhere else + // declining lands back on the Accounts page, not somewhere else await click('button', 'not now'); await sleep(600); - const back = await page.evaluate(() => !!document.querySelector('.profile-avatar')); - check('declining lands back on the profile page', back, (await bodyText()).slice(0, 60).replace(/\n/g, ' | ')); + check('declining lands back on the Accounts page', /add account/i.test(await bodyText()), (await bodyText()).slice(0, 60).replace(/\n/g, ' | ')); } finally { await browser.close(); server.stop(true); } |
