From 236e5e811355212945b89c4f7a99df5c837e97c7 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Sat, 29 Aug 2026 15:27:01 +0200 Subject: fix(hub): update layout test for the fit → fitAndPin rename MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit b6f3139 renamed `fit` to `fitAndPin` in chat-app.js and rebound the resize / orientationchange / visualViewport listeners to it, but test_the_panel_refits_when_the_viewport_changes still grepped for the old name and failed. `fit` itself still exists (fitAndPin wraps it), so test_the_measurement_survives_a_scrolled_page was unaffected. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_018BMLQjqFGCize2KtNBT79v --- packages/meshbay-hub/tests/test_layout_responsive.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'packages/meshbay-hub/tests/test_layout_responsive.py') 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): -- cgit v1.2.3