Prepare tests listed in the main browser.toml file for the SRD pref flip
Categories
(Firefox :: Settings UI, task)
Tracking
()
People
(Reporter: hjones, Assigned: tgiles)
References
(Blocks 1 open bug)
Details
(Whiteboard: [recomp])
Attachments
(8 external files)
We need to make sure our tests listed in in preferences will pass with the SRD pref enabled or disabled. Some of this work was already taken care of in this patch (specifically the creation of the new -srd manifest and moving some tests that are SRD only out of the new manifest). Here are the generic steps to take/things we should be checking for reference:
- add missing tests from
browser/components/preferences/tests/browser.tomltobrowser/components/preferences/tests/browser-srd.tomland ensure we havedupe-manifest=trueand thebrowser.settings-redesign.enabledpref set totrue - register this manifest in
browser/components/preferences/moz.build - remove any tests that already set
browser.settings-redesign.enabledtotruefrom the oldbrowser.tomlfile since these don't need to work with the pref disabled - clean up any code setting the SRD pref from within the test files (this will be read from the manifest)
- remove any tests from the new manifest that are only relevant to the old UI
- fix any failing tests
- add new tests if there are any obvious gaps
Updated•6 months ago
|
| Reporter | ||
Updated•6 months ago
|
| Assignee | ||
Updated•6 months ago
|
| Assignee | ||
Comment 1•6 months ago
|
||
Add dupe-manifest = true to browser-srd.toml so shared tests can run
without build system errors.
Move the audited set of shared tests into browser-srd.toml so they run
with browser.settings-redesign.enabled=true. Remove
browser_advanced_update.js from browser-srd.toml since it only covers
the legacy General pane.
Split browser_accessibility_pane.js, browser_appearance_pane, and
browser_colors_dialog into _xul.js copies that retain the
legacy/XUL-only assertions. This ensures we don't lose the pane-specific
coverage when the SRD pref is disabled, while allowing the non _xul.js
files to handle the SRD related changes in the next commit in this
stack.
Add an openPrefsTab helper to head.js for tests that need to open the
preferences UI at a specific category and wait for paneshown. This
replaces the openPreferencesViaOpenPreferencesAPI and similar observer
setups across the test directory.
Note: this part depends on the next commit in the stack (Part 2) for any
shared test referenced from browser-srd.toml to function under the
enabled redesign pref. They must land or back out together.
| Assignee | ||
Comment 2•6 months ago
|
||
Update shared preferences tests so they pass under both the legacy XUL
preferences and the new settings redesign preferences. Each file follows
one or more of these patterns:
- Calls
openPrefsTabhelper from head.js for pane navigation. - Replace hard-coded pane/subcategory selectors with unscoped versions.
SRD pane containers don't have a DOM id while the legacy containers
do. - Add SRD-conditional branches for elements that change when the
redesign is enabled. This includes pane location, DOM shape, or
telemetry bucket changes. - Guard null-element accesses, fix sync-pane-loaded observer leaks, and
use assertions with a tolerance value where exact equality checks were
too strict. - Drop redundant inline
browser.settings-redesign.enabled=true
pushPrefEnv calls.
Note: This commit pairs with the previous commit in the stack (Part 1).
browser-srd.toml entries added there reference these files, so these two
commits must land or back out together.
| Assignee | ||
Comment 3•6 months ago
|
||
Add two SRD-only tests that close new coverage gaps discovered while
making the shared tests pass when SRD is enabled.
browser_srd_telemetry_bucket_migration.js ensures that when a setting
moves to a new pane, the recorded telemetry from Glean's
browserUiInteraction is placed in the correct bucket. For example,
useSmoothScrolling moved from General to Accessibility and so its
interaction should be recorded in Accessibility.
browser_srd_related_settings_links.js verifies the "Related Settings"
moz-box-link elements on the Appearance pane render with the expected
hrefs.
Comment 6•5 months ago
|
||
Reverted this because it was causing mochitests failures in browser_windows_launch_on_login_msix.js.
- Revert link
- Push with failures
- Failure Log
- Failure line: TEST-UNEXPECTED-FAIL | browser/components/preferences/tests/browser_windows_launch_on_login_msix.js | test_check_uncheck_checkbox - Uncaught exception in test - TypeError: can't access property "checked", launchOnLoginCheckbox is null
Updated•5 months ago
|
Comment 10•5 months ago
|
||
Reverted this because it was breaking gecko decision task.
- Revert link
- Push with failures
- Failure Log
- Failure line: OSError: Error parsing TOML manifest file /builds/worker/checkouts/gecko/browser/components/preferences/tests/browser-srd.toml: redefinition of table
browser_legacy_pane_mappings.jsfor keybrowser_legacy_pane_mappings.jsat line 52 column 1
Comment 11•5 months ago
|
||
Updated•5 months ago
|
Comment 12•5 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/4a19f6192395
https://hg.mozilla.org/mozilla-central/rev/03dc17086962
https://hg.mozilla.org/mozilla-central/rev/fadbacb82463
https://hg.mozilla.org/mozilla-central/rev/98851d1e6b40
| Assignee | ||
Comment 13•5 months ago
|
||
Add dupe-manifest = true to browser-srd.toml so shared tests can run
without build system errors.
Move the audited set of shared tests into browser-srd.toml so they run
with browser.settings-redesign.enabled=true. Remove
browser_advanced_update.js from browser-srd.toml since it only covers
the legacy General pane.
Split browser_accessibility_pane.js, browser_appearance_pane, and
browser_colors_dialog into _xul.js copies that retain the
legacy/XUL-only assertions. This ensures we don't lose the pane-specific
coverage when the SRD pref is disabled, while allowing the non _xul.js
files to handle the SRD related changes in the next commit in this
stack.
Add an openPrefsTab helper to head.js for tests that need to open the
preferences UI at a specific category and wait for paneshown. This
replaces the openPreferencesViaOpenPreferencesAPI and similar observer
setups across the test directory.
Note: this part depends on the next commit in the stack (Part 2) for any
shared test referenced from browser-srd.toml to function under the
enabled redesign pref. They must land or back out together.
Original Revision: https://phabricator.services.mozilla.com/D302555
Updated•5 months ago
|
| Assignee | ||
Comment 14•5 months ago
|
||
Update shared preferences tests so they pass under both the legacy XUL
preferences and the new settings redesign preferences. Each file follows
one or more of these patterns:
- Calls
openPrefsTabhelper from head.js for pane navigation. - Replace hard-coded pane/subcategory selectors with unscoped versions.
SRD pane containers don't have a DOM id while the legacy containers
do. - Add SRD-conditional branches for elements that change when the
redesign is enabled. This includes pane location, DOM shape, or
telemetry bucket changes. - Guard null-element accesses, fix sync-pane-loaded observer leaks, and
use assertions with a tolerance value where exact equality checks were
too strict. - Drop redundant inline
browser.settings-redesign.enabled=true
pushPrefEnv calls.
Note: This commit pairs with the previous commit in the stack (Part 1).
browser-srd.toml entries added there reference these files, so these two
commits must land or back out together.
Original Revision: https://phabricator.services.mozilla.com/D302556
Updated•5 months ago
|
| Assignee | ||
Comment 15•5 months ago
|
||
Add an SRD-only test that closes a new coverage gap discovered while
making the shared tests pass when SRD is enabled.
browser_srd_telemetry_bucket_migration.js ensures that when a setting
moves to a new pane, the recorded telemetry from Glean's
browserUiInteraction is placed in the correct bucket. For example,
useSmoothScrolling moved from General to Accessibility and so its
interaction should be recorded in Accessibility.
Original Revision: https://phabricator.services.mozilla.com/D302557
Updated•5 months ago
|
| Assignee | ||
Comment 16•5 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D303259
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Comment 17•5 months ago
|
||
| uplift | ||
Description
•