diff options
Diffstat (limited to 'tools/onboard-backup-test.js')
| -rw-r--r-- | tools/onboard-backup-test.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/onboard-backup-test.js b/tools/onboard-backup-test.js index 3b242dd..9fe5a3e 100644 --- a/tools/onboard-backup-test.js +++ b/tools/onboard-backup-test.js @@ -73,15 +73,23 @@ try { primaryTop: primary ? primary.getBoundingClientRect().top : -1, signinTop: signins.length ? signins[0].getBoundingClientRect().top : -1, divider: !!document.querySelector('.onb-or'), - body: (document.querySelector('.onb p') || {}).textContent || '', }; }); check('the way in says what it makes', /wallet/i.test(front.label || ''), front.label || 'missing'); check('...and comes before the sign-in buttons', front.first && front.primaryTop < front.signinTop, `create at ${Math.round(front.primaryTop)}, first sign-in at ${Math.round(front.signinTop)}`); check('...with a line between them, so they read as the alternative', front.divider); - check('the page says what the wallet actually is', /twelve words|seed|phrase/i.test(front.body), - front.body.slice(0, 60) + '…'); + // The welcome card is just the title and the buttons now (42c8d4e): the + // way in itself says what the wallet is — tapping it puts the twelve + // words on screen at once, with what they are. + await page.evaluate(() => document.getElementById('onb-create')?.click()); + await sleep(600); + const made = await page.evaluate(() => ({ + words: document.querySelectorAll('.words .w .t').length, + says: /12 words|twelve words/i.test(document.body.innerText), + })); + check('the way in shows what the wallet actually is: its twelve words', made.words === 12 && made.says, + made.words + ' words' + (made.says ? ', explained' : ', unexplained')); await page.close(); } |
