aboutsummaryrefslogtreecommitdiffstats
path: root/tools/profile-feed-test.js
diff options
context:
space:
mode:
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