Repository navigation
Reset language settings before each full e2e test - #474
Merged
Merged
Conversation
The Arabic auto-detect test sets enabled_languages to ["en_US", "ar_SA"]. With pl_PL disabled, resolveFallbackLanguage changes pl_PL to en_US, and the Polish decimal step fails in an ordered run. The test now uses openEnglishField, which enables all languages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Seven tests narrow enabled_languages and do not restore it. With a narrowed list, resolveFallbackLanguage changes the language of a later test to the first enabled language. The beforeEach baseline now sets the enabled languages, the language, the fallback language, the site profiles and the auto-detect site priors to their defaults. It writes them in one storage call with the grammar rules. The measurement unit test no longer resets the language at its end. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The beforeEach reset ran only after writes from the test helpers. The popup, the options page and commands also write settings, and those changes leaked into the next test. The hook now also reads the baseline keys and resets them when they are not equal to the baseline. The baseline now also sets inline_suggestion, num_suggestions and min_word_length to their defaults. The language resets in the auto-detect tests and in the popup language test are removed, because the baseline does them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
The e2e test "Grammar Rule Engine formats measurement units only in verified prose typing" failed when it ran after other tests. It passed when it ran alone. This PR fixes the cause for all languages, not only for this test.
Root cause
The test "Auto-detect switches to Arabic for Arabic-script typing" sets
enabled_languagesto["en_US", "ar_SA"], and itsfinallyblock does not reset this setting. ThebeforeEachhook of the full suite reset only the grammar rules.The measurement test then sets the language to
pl_PL. Becausepl_PLis not enabled,resolveFallbackLanguage(src/core/domain/lang.ts) changes it toen_US. The Polish decimal step ("Masa: 1,50kg ") then runs with English rules, and the wait times out.Seven tests in the full suite narrow
enabled_languages(for example["en_US"],["en_US", "el_GR"]and["textExpander"]). Any later test that sets a language outside the narrowed list has the same problem.Changes
PER_TEST_RESET_SETTINGSobject holds the defaults that each full-suite test starts from: no grammar rules, all languages enabled,en_USas language and fallback, no site profiles, no auto-detect site priors,inline_suggestionoff, the defaultnum_suggestionsandmin_word_length_to_predict = 1. The smoke suite has a similar object.beforeEachreset only after a test helper wrote settings. The popup, the options page and commands also write settings. A new helper,storedSettingsDiffer, reads the baseline keys in one storage call. The hook now resets when a helper wrote settings or when a stored value is not equal to the baseline.finallyblocks of three auto-detect tests and the reset at the end of the popup language test did the same reset as the baseline. They are removed.openEnglishFieldhelper, like the other grammar tests. Its language reset at the end is removed.Test plan
On Chrome:
bun run test:e2e:full --platform=chrome: 200 pass, 0 fail--test-name-pattern "typing|Quill|quill|CKEditor|ckeditor": 39 pass, 0 fail (before: 38 pass, 1 fail)bun run checkpasses🤖 Generated with Claude Code