aboutsummaryrefslogtreecommitdiffstats
path: root/tools/profile-feed-test.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-07 08:34:13 -0700
committerAdam Soltys <[email protected]>2026-10-07 08:34:13 -0700
commit6d288aeb194d2765282cf9fd72bd1f5fdd747a71 (patch)
tree9ea340ae990af7e675d0871a80d4d3cdd9b0ac4a /tools/profile-feed-test.js
parenta6bae186071e7e07136a37f63864d0bf578edd16 (diff)
parentd04f10db5e3c007db2cd8a5f9e12eff55bc1c653 (diff)
downloadcoinosv3-6d288aeb194d2765282cf9fd72bd1f5fdd747a71.tar.gz
coinosv3-6d288aeb194d2765282cf9fd72bd1f5fdd747a71.zip
Merge branch 'worktree-agent-ab051145d709af327'
Diffstat (limited to 'tools/profile-feed-test.js')
-rw-r--r--tools/profile-feed-test.js30
1 files changed, 22 insertions, 8 deletions
diff --git a/tools/profile-feed-test.js b/tools/profile-feed-test.js
index 9c743ae..8ea7faa 100644
--- a/tools/profile-feed-test.js
+++ b/tools/profile-feed-test.js
@@ -32,12 +32,12 @@ try {
await page.waitForSelector('textarea');
await page.type('textarea', generateMnemonic(wordlist));
await click('button', 'Open wallet');
+ // a mainnet wallet offers a username first (the spending-account step)
+ if (await waitText('claim a username', 8000)) await click('button', 'Not now');
check('wallet opens', await waitText('receive', 20000));
- // .header-msgs is the shared header-button class — settings, lock and
- // search wear it too, and the first one is no longer this. Ask for the
- // messages button by name.
- await page.evaluate(() => [...document.querySelectorAll('button')]
+ // Messages is a button in the bottom nav; ask for it by name.
+ await page.evaluate(() => [...document.querySelectorAll('.app-nav-button')]
.find((b) => /message/i.test(b.getAttribute('aria-label') || ''))?.click());
await sleep(800);
check('chat home opens', await waitText('coinos', 10000));
@@ -53,13 +53,27 @@ try {
const empty = !fed && (await bodyText()).includes('No recent posts');
check('note feed resolves', fed || empty, fed ? 'notes shown' : 'no posts for this pk');
if (fed) {
- const zaps = await page.evaluate(() => [...document.querySelectorAll('button')].filter((b) => b.textContent.trim() === '⚡').length);
+ // the ⚡ in every note's action bar, live when the wallet can pay
+ const zaps = await page.evaluate(() => [...document.querySelectorAll('.notes-feed button.note-zap')].filter((b) => b.getAttribute('aria-disabled') !== 'true').length);
check('zap buttons on notes', zaps > 0, `${zaps} note(s) zappable`);
const imgsBroken = await page.evaluate(() => [...document.querySelectorAll('.note-img')].some((i) => i.style.display !== 'none' && i.complete && i.naturalWidth === 0));
check('no broken inline images', !imgsBroken);
- // tap a zap: should land on the send tab's zap card (resolution ladder)
- await page.evaluate(() => [...document.querySelectorAll('button')].find((b) => b.textContent.trim() === '⚡')?.click());
- check('zap flow opens', await waitText('Send a zap', 10000));
+ // A tap pays the default amount at once (this wallet is empty, so it
+ // would only fail); holding ⚡ opens the screen that sets the amount.
+ const box = await page.evaluate(() => {
+ const b = [...document.querySelectorAll('.notes-feed button.note-zap')].find((x) => x.getAttribute('aria-disabled') !== 'true');
+ if (!b) return null;
+ b.scrollIntoView({ block: 'center' });
+ const r = b.getBoundingClientRect();
+ return { x: r.x + r.width / 2, y: r.y + r.height / 2 };
+ });
+ if (box) {
+ await page.mouse.move(box.x, box.y);
+ await page.mouse.down();
+ await sleep(800);
+ await page.mouse.up();
+ }
+ check('zap flow opens', await waitText('Set your zap amount', 10000));
}
}
check('no page errors', pageErrors.length === 0, pageErrors.slice(0, 2).join(' | '));