aboutsummaryrefslogtreecommitdiffstats
path: root/tools/account-access-test.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/account-access-test.js')
-rw-r--r--tools/account-access-test.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/account-access-test.js b/tools/account-access-test.js
index 3e481cc..91fbe05 100644
--- a/tools/account-access-test.js
+++ b/tools/account-access-test.js
@@ -36,13 +36,18 @@ try {
check('avatar opens the wallet settings with sign-in and logout', await page.evaluate(() => ['Security', 'Sign into another account', 'Log out'].every((s) => document.body.innerText.includes(s))));
const saved = await page.evaluate(() => localStorage.getItem('btc-wallet-watch'));
await click('Sign into another account');
- check('sign-in opens on Create new, not the seed import box', await page.evaluate(() =>
- document.querySelector('.tabs .active')?.textContent.includes('Create new') && !document.querySelector('.card textarea')));
+ check('sign-in opens on the front door\'s two choices', await page.evaluate(() =>
+ !!document.getElementById('add-create') && !!document.getElementById('add-signin') && !document.querySelector('.tabs') && !document.querySelector('.card textarea')));
+ await click('Sign in to an existing account');
+ check('...then the sign-in list, seed phrase first', await page.evaluate(() => {
+ const b = [...document.querySelectorAll('.onb button')].map((x) => x.textContent.trim());
+ return b[0] === 'Seed phrase' && b.includes('Nostr');
+ }));
// Expand the Nostr login card without supplying a private key.
- await click('Sign in with Nostr');
+ await click('Nostr');
await page.waitForSelector('input[placeholder="nsec, private key, or bunker://…"]');
check('Nostr key sign-in is reachable without deleting the old wallet', await page.evaluate((saved) => localStorage.getItem('btc-wallet-watch') === saved, saved));
- await click('← Back');
+ for (let i = 0; i < 3; i++) { await click('← Back'); await new Promise((r) => setTimeout(r, 150)); }
await page.waitForSelector('.header-avatar');
await page.click('.header-avatar');
await click('Log out');