diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-08-29 15:27:01 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-08-29 15:27:01 +0200 |
| commit | 236e5e811355212945b89c4f7a99df5c837e97c7 (patch) | |
| tree | a9fe3a522f2dfe0d9602c4699535af5f1c6d5c82 /packages/meshbay-hub/tests | |
| parent | 5a88f8d7a0a35b0c75b0a56d0f6fce1d0a495c12 (diff) | |
| download | meshbay-236e5e811355212945b89c4f7a99df5c837e97c7.tar.gz | |
fix(hub): update layout test for the fit → fitAndPin rename
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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018BMLQjqFGCize2KtNBT79v
Diffstat (limited to 'packages/meshbay-hub/tests')
| -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): |