aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-11-16 08:44:16 -0700
committerAdam Soltys <[email protected]>2026-11-16 08:44:16 -0700
commit550776ed795f1da392ea39a7de5850630f02b16f (patch)
treec716be7e1b650d9b6dca3f3eea9f0aa11409ce52 /tools
parent5d6e0919ae3d17674c2b5753a7230dabad81120a (diff)
downloadcoinosv3-550776ed795f1da392ea39a7de5850630f02b16f.tar.gz
coinosv3-550776ed795f1da392ea39a7de5850630f02b16f.zip
The balance breakdown folds away under the total. "let's hide the breakdown by default but give some way to expand to see it" (Adam, 2026-11-16). On the one balance card, the Ark / On-chain split and the Gifts line now sit behind a small "Breakdown ▾" under the total (only when there is a breakdown to show); "Hide breakdown ▴" folds it again, and the choice is remembered per device. Lines about money on its way (Pending, Moving) still always show. The desktop side panel follows the same choice. signup-quick-test (folded by default, opens to the Gifts line, remembered), unified-balance and features-smoke pass.HEADmaster
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6SwkivduFDDkMmnXjZ
Diffstat (limited to 'tools')
-rw-r--r--tools/signup-quick-test.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/signup-quick-test.js b/tools/signup-quick-test.js
index 3e38c5f..5005d6a 100644
--- a/tools/signup-quick-test.js
+++ b/tools/signup-quick-test.js
@@ -108,6 +108,27 @@ try {
await page.reload({ waitUntil: 'domcontentloaded' }); await page.waitForSelector('.balance-face', { timeout: 20000 }); await sleep(1500);
await giveBalance();
check('...and never again, not after a reload', !(await page.$('.ways-back-prompt')));
+ // the breakdown (Ark / On-chain / Gifts) folds away under the total; a
+ // gift line stands in for it here (the ark feature made to report one)
+ {
+ const protoH = await page.evaluateHandle(() => Object.prototype);
+ const all = await page.queryObjects(protoH);
+ await page.evaluate((objs) => {
+ const f = objs.find((o) => { try { return o && o.id === 'ark' && typeof o.balanceLines === 'function'; } catch { return false; } });
+ f.balanceLines = () => [{ label: 'Gifts', sat: 700, side: 'savings', part: true }];
+ document.querySelector('.tabs button')?.click(); document.querySelector('.tabs button')?.click();
+ }, all);
+ await all.dispose(); await protoH.dispose(); await sleep(600);
+ const face = () => page.evaluate(() => ({ t: document.querySelector('.balance-one')?.innerText || '', btn: document.querySelector('.balance-one .breakdown-toggle')?.textContent || '' }));
+ let f = await face();
+ check('breakdown folded by default, with a way to open it', !/GIFTS/i.test(f.t.replace(f.btn, '')) && /breakdown/i.test(f.btn), JSON.stringify(f));
+ await page.click('.balance-one .breakdown-toggle'); await sleep(400);
+ f = await face();
+ check('opened, it shows the Gifts line', /Gifts/i.test(f.t.replace(f.btn, '')) && /hide/i.test(f.btn), JSON.stringify(f));
+ if (process.env.SHOT3) await page.screenshot({ path: process.env.SHOT3 });
+ check('remembered on this device', await page.evaluate(() => localStorage.getItem('btc-wallet-balance-breakdown') === '1'));
+ await page.evaluate(() => localStorage.removeItem('btc-wallet-balance-breakdown'));
+ }
for (let i = 0; i < 60 && !(await page.$('#recv-amount')); i++) await sleep(250);
check('Receive has an Amount button', !!(await page.$('#recv-amount')));
check('no History heading on an empty wallet', !/\bHISTORY\b/.test(await page.evaluate(() => document.body.innerText)));