diff options
| author | Adam Soltys <[email protected]> | 2026-10-07 08:12:38 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-07 08:12:38 -0700 |
| commit | faad243486666eb4cbefcd7ff813329e707106dd (patch) | |
| tree | ce25612f6ed8fdd9355b08d7e07efb5c6b429c7f /tools/feed-media-cache-test.js | |
| parent | 78cf670939133fc4f656f0f42b21a59431a53842 (diff) | |
| download | coinosv3-faad243486666eb4cbefcd7ff813329e707106dd.tar.gz coinosv3-faad243486666eb4cbefcd7ff813329e707106dd.zip | |
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 <[email protected]>
Diffstat (limited to 'tools/feed-media-cache-test.js')
| -rw-r--r-- | tools/feed-media-cache-test.js | 5 |
1 files changed, 3 insertions, 2 deletions
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)); |
