Repository navigation
test: make four e2e checks pass on Firefox - #460
Merged
Merged
Conversation
These tests failed on Firefox in the scheduled cross-browser run. Each failure came from an assumption in the test, not from a Citry bug. - The i18n fallback-text test served a bare fragment with no doctype and no charset, and counted every console warning as a hydration fault. Firefox warns about Quirks Mode and the undeclared encoding of the test page. The test now serves a real UTF-8 document. - The fragment manager test expected Chromium's "net::ERR_FAILED" console message for an aborted script request. Firefox logs nothing for an aborted request, so the message may now be absent. - The same test and the startup-styles test read a logged Error from the console text. Chromium includes the error's message there and Firefox prints "JSHandle@object". Both now read the message from the console message's last argument. - The CMenu test required the page to scroll to an item below the screen. Chromium keeps a menu that does not fit below its trigger below it, so the page must scroll. Firefox moves the menu up so it fits on screen, so the item is already visible. This is a browser difference, and both keep the focused item visible, which is the contract. The test now requires a scroll only when the menu sat below its trigger, and renames to say what it checks. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The scheduled cross-browser run (run 40310909616 on main) fails four e2e tests on Firefox. All four pass on Chromium. Each failure comes from an assumption in the test, not from a Citry bug. Test-only change; no product code and no changelog entry.
Causes and fixes
test_i18n_vue_plugin_e2e.py::test_browser_isolates_fallback_text_exactly_as_the_server_does: the test served a bare fragment (no doctype, no charset) and counted every console warning as a hydration fault. Firefox warns "This page is in Quirks Mode" and "The character encoding of the document was not declared", about the test page. The test now serves<!doctype html><meta charset="utf-8">plus the body withtext/html; charset=utf-8. It is the onlyroute.fulfillin that file whose page also collects console warnings, so the others are unchanged.test_vue_transparent_root_e2e.py::test_fragment_manager_loads_and_mounts_python_composed_component, aborted request: Chromium logs "Failed to load resource: net::ERR_FAILED" for the aborted script route and the test required exactly one. Firefox logs nothing. The test now allows zero or one and removes it when present.message.textincludes its message; Firefox printsJSHandle@object.test_fragment_startup_styles_survive_other_unmount_and_release_on_own_cancel: same Error-object logging for[Citry] discarded Vue fragment:. Causes 3 and 4 share a helper,_logged_error_text, which reads the message from the last console argument (args[-1].evaluate("error => String(error?.message ?? error)")) outside the event handler.test_cmenu_e2e.py::test_a_key_scrolls_the_page_to_an_item_below_the_screen(both cases), nowtest_a_key_shows_an_item_that_starts_below_the_screen: it assertedwindow.scrollY > 0. Chromium keeps a menu that does not fit below its trigger below it, overflowing the screen, so the page scrolls. Firefox shifts the menu up so it fits on screen (overlapping the trigger), so the item is already visible. This is a browser placement difference, and both keep the focused item visible, which is the real contract. The test asserts a scroll only when the menu sat below its trigger when the key focused the item; otherwise it asserts the menu is inside the viewport. The final check that the focused item is inside the viewport stays for both. Verified that Chromium takes the scroll branch and Firefox takes the fits-on-screen branch.Evidence
Changed tests, Firefox and Chromium: 10 passed (4 tests, cmenu has two cases).
Whole changed files on Chromium (
-n 2): 94 passed.ruff checkandruff format --check: clean.WebKit: could not be run here. WebKit launch hangs in this environment, including for a test this PR does not touch on unmodified code, so the WebKit result is unknown and nothing was changed for it.
🤖 Generated with Claude Code