diff options
| -rw-r--r-- | packages/meshbay-hub/tests/test_layout_responsive.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/meshbay-hub/tests/test_layout_responsive.py b/packages/meshbay-hub/tests/test_layout_responsive.py index 11a6d05..d7a680d 100644 --- a/packages/meshbay-hub/tests/test_layout_responsive.py +++ b/packages/meshbay-hub/tests/test_layout_responsive.py @@ -145,10 +145,12 @@ def test_the_measurement_survives_a_scrolled_page(app): def test_the_panel_refits_when_the_viewport_changes(app): + # `fit` is wrapped by `fitAndPin` (which also keeps the view pinned to + # the bottom on a resize) — that is what the listeners bind to. for event in ("resize", "orientationchange"): - assert f"addEventListener('{event}', fit)" in app - assert "visualViewport?.addEventListener('resize', fit)" in app - assert "removeEventListener('resize', fit)" in app, "the listener must be released" + assert f"addEventListener('{event}', fitAndPin)" in app + assert "visualViewport?.addEventListener('resize', fitAndPin)" in app + assert "removeEventListener('resize', fitAndPin)" in app, "the listener must be released" def test_the_css_floor_does_not_fight_the_measurement(css, app): |