Improve Select Translations Multi-Locale Preferred Language Tests
Categories
(Firefox :: Translations, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox130 | --- | fixed |
People
(Reporter: nordzilla, Assigned: nordzilla)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Description
When writing Bug 1902711 I tried to add extra testing around multi-locale preferred language tests for opening the context menu to translate selected text. Things worked pretty well locally, but ran into issues in CI with the Intl.DisplayNames
not matching the mocked locale.
I believe that all the functionality is correct (the underlying functions are tested), but I would still like to have integration tests for this.
We should consider adding the current language tag to the translate-selection context menu item so that we can deterministically tell which language has been offered without having to worry about the language's display from mocked locale test infrastructure.
Steps to implement
- Invesitgate storing the currently offered language tag as an attribute on the translate-selection context menu item, that way we can test with the language tag rather than the display name.
Tests to implement
- Rework the tests to compare against the language tag, rather than the display name.
Assignee | ||
Comment 1•5 months ago
|
||
Adds several test cases to test the SelectTranslations
context-menu offering with various locale and web content
languages.
Updated•4 months ago
|
Comment 3•4 months ago
|
||
bugherder |
Description
•