aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/tests/test_sticky_header.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/tests/test_sticky_header.py')
-rw-r--r--packages/meshbay-hub/tests/test_sticky_header.py13
1 files changed, 13 insertions, 0 deletions
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