From 459fc93e98f23e326c2fa77fe86ba74c2bae77f0 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Tue, 15 Sep 2026 17:01:06 +0200 Subject: feat(hub): Videos and Music list their cards a page at a time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previous/next arrows in the pinned toolbar, on group pages and in Search. Page size is an account preference (Settings → Defaults), 50 by default, 10 to 200 in steps of 10. Co-Authored-By: Claude Opus 5 --- packages/meshbay-hub/tests/test_sticky_header.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'packages/meshbay-hub/tests/test_sticky_header.py') diff --git a/packages/meshbay-hub/tests/test_sticky_header.py b/packages/meshbay-hub/tests/test_sticky_header.py index 32b8124..741b57f 100644 --- a/packages/meshbay-hub/tests/test_sticky_header.py +++ b/packages/meshbay-hub/tests/test_sticky_header.py @@ -78,6 +78,19 @@ def test_every_view_was_reached(measured): f"expected {EXPECTED_CASES} measurements, got {len(measured)}") +def test_media_toolbars_were_measured_with_their_page_arrows(measured): + """ + Videos and Music put previous/next arrows in the pinned toolbar once a + library is longer than a page (`pager.js`). The fixture sets a page smaller + than its library so every measurement above covers the toolbar with them; + this fails the fixture if that stops being true. + """ + media = [c for c in measured if c["name"].split(" @")[0].endswith(("videos", "music"))] + assert media, "no Videos or Music case was measured" + bare = [c["name"] for c in media if not c.get("pager")] + assert not bare, "measured without page arrows: " + ", ".join(bare) + + def test_the_page_really_scrolled(measured): """ Everything below compares a scrolled page with an unscrolled one. A view -- cgit v1.2.3