From 3da7f9d52dee6a535190cd5e0db152a3689c7e8e Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 27 Sep 2026 08:29:01 -0700 Subject: 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 Claude-Session: https://claude.ai/code/session_01VhUKyXKtsJ67QAFfb7QR9D --- tools/padlock-ask-test.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'tools/padlock-ask-test.js') 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); } -- cgit v1.2.3