From faad243486666eb4cbefcd7ff813329e707106dd Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 7 Oct 2026 08:12:38 -0700 Subject: Feed tests: catch up with Articles, Popular as the default feed, timed feed defs and the tint that fades on sight - feed-media-views: the mode switch has an Articles button now - feed-media-cache: the live watch's since-only subscription isn't part of the crawl - feed-switch-seed: seeded feeds carry their edit time (the feeds sync merge drops one without) - feed-editor-relays: nos.lol is a local stand-in relay, so the test doesn't depend on reaching it - feed-streaming: the stub wallet opens on Following (no remembered feed = Popular); the held picture answers repeat fetches once released; the new-post tint is recorded as it paints (it fades on sight) Co-Authored-By: Claude Opus 5.5 --- tools/feed-media-cache-test.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/feed-media-cache-test.js') diff --git a/tools/feed-media-cache-test.js b/tools/feed-media-cache-test.js index fa90a15..46c485d 100644 --- a/tools/feed-media-cache-test.js +++ b/tools/feed-media-cache-test.js @@ -79,7 +79,7 @@ await page.evaluateOnNewDocument(([evs, pk]) => { const f = m[2] || {}; let out = []; if ((f.kinds || []).includes(1) && (f.authors || []).includes(pk) && !f['#e'] && !f.ids) { - window.__reqs.push({ until: f.until, limit: f.limit }); + window.__reqs.push({ until: f.until, limit: f.limit, since: f.since }); out = evs.filter((e) => !f.until || e.created_at <= f.until).slice(0, f.limit || 30); } setTimeout(() => { @@ -142,7 +142,8 @@ try { check('all six clips are found, the deepest 150 posts down', await waitFor(() => document.querySelectorAll('.media-grid .media-tile.video').length === 6, 15000), String(await tiles())); const took = Date.now() - t0; check('...without waiting on the slow picture along the way', took < 8000, took + ' ms'); - const reqs = await page.evaluate(() => window.__reqs); + // (the feed's live watch for new posts — a since-only subscription — isn't the crawl) + const reqs = await page.evaluate(() => window.__reqs.filter((r) => !(r.since && !r.until && !r.limit))); const steps = [...new Set(reqs.map((r) => r.until))]; // each step asks every relay check('...asking a hundred posts at a time, each step older than the last', reqs.length >= 1 && reqs.every((r) => r.limit === 100 && r.until) && steps.every((u, i) => !i || u < steps[i - 1]), JSON.stringify(steps)); -- cgit v1.2.3