Closed Bug 1902859 Opened 5 months ago Closed 4 months ago

Improve Select Translations Multi-Locale Preferred Language Tests

Categories

(Firefox :: Translations, task, P3)

task

Tracking

()

RESOLVED FIXED
130 Branch
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.

Adds several test cases to test the SelectTranslations
context-menu offering with various locale and web content
languages.

Attachment #9407695 - Attachment description: Bug 1902859 - Add multi-locale context menu tests r=#translations-reviewers!,ohall → Bug 1902859 - Add multi-locale context menu tests r=#translations-reviewers!,gregtatum
Pushed by enordin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/886936954825 Add multi-locale context menu tests r=translations-reviewers,ohall,gregtatum
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 130 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: