aboutsummaryrefslogtreecommitdiffstats
path: root/tools/profile-feed-test.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-09 16:04:46 -0700
committerAdam Soltys <[email protected]>2026-10-09 16:04:46 -0700
commit22653c35ab372f7649711a743fd88b71265ae4e5 (patch)
treee96aecb2d926ded1292c35bc81abc740df54cf2a /tools/profile-feed-test.js
parentb6cca5ba5196d3b89df4708c0b1aff31ec624df0 (diff)
downloadcoinosv3-22653c35ab372f7649711a743fd88b71265ae4e5.tar.gz
coinosv3-22653c35ab372f7649711a743fd88b71265ae4e5.zip
Profiles: Posts / Replies tabs. Replies were mixed into a profile's list, tagged "↩ reply" — now Posts (the default) is what they posted and Replies is their side of other people's threads (NIP-10 replies, NIP-22 comments). Profiles load thirty mixed notes a page and older pages only on scroll, so a tab that holds few of its kind (someone who mostly replies, or never does) fetches older pages by itself — five at most per tab, so a person who never replies doesn't have their whole history paged through. tools/profile-replies-test.js; profile-feed-test waits for rows (the tabs come before them; the old "Latest posts" heading only appeared with notes in hand).
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Vps2H27rhbG9ZqseGfMrc3
Diffstat (limited to 'tools/profile-feed-test.js')
-rw-r--r--tools/profile-feed-test.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/profile-feed-test.js b/tools/profile-feed-test.js
index f2ca9e6..87dfc80 100644
--- a/tools/profile-feed-test.js
+++ b/tools/profile-feed-test.js
@@ -49,8 +49,13 @@ try {
await page.evaluate(() => document.querySelector('.chat-avatar.clickable')?.click());
check('profile screen opens', await waitText('back', 10000));
// the feed: either notes arrive or the explicit empty state shows
- const fed = await waitText('Latest posts', 15000);
- const empty = !fed && (await bodyText()).includes('No recent posts');
+ // (the Posts / Replies tabs come first; their rows once the relays answer)
+ let fed = false, empty = false;
+ for (let i = 0; i < 60 && !fed && !empty; i++) {
+ fed = await page.evaluate(() => document.querySelectorAll('.notes-feed [data-zap-post]').length > 0);
+ empty = !fed && /No recent posts/.test(await bodyText());
+ if (!fed && !empty) await sleep(250);
+ }
check('note feed resolves', fed || empty, fed ? 'notes shown' : 'no posts for this pk');
if (fed) {
// the ⚡ in every note's action bar, live when the wallet can pay