Per-widget Jest fixtures for Stocks, Privacy and Picture of the Day omit widgets.enabled
Categories
(Firefox :: New Tab Page, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox159 | --- | fixed |
People
(Reporter: maxx, Assigned: maxx)
References
Details
Attachments
(1 external file)
Stocks.test.jsx, Privacy.test.jsx and PictureOfTheDay.test.jsx each build a "this widget is on" pref state that sets widgets.system.enabled and the widget's own widgets.system.<id>.enabled / widgets.<id>.enabled prefs, but omits widgets.enabled -- the container toggle the user controls. The Weather, Clocks and Crossword fixtures do set it.
The suites pass today, because these tests render the widget component directly and never reach the container gate. The gap is latent: any code that consults the container toggle, such as isWidgetEnabled(widget, prefs, prefs["widgets.enabled"]) or hasContentAreaWidgets(prefs), sees the widget as disabled in these fixtures while it would be enabled in the product. That makes the fixtures an unreliable starting point for tests that grow toward layout or container behavior.
Fix: add "widgets.enabled": true to the three fixtures, so all six per-widget fixtures describe the same state.
| Assignee | ||
Comment 1•2 months ago
|
||
Stocks.test.jsx, Privacy.test.jsx and PictureOfTheDay.test.jsx each build a "this widget is on" pref state but omit widgets.enabled, the container toggle, unlike the Weather, Clocks and Crossword fixtures.
Updated•2 months ago
|
Comment 2•1 month ago
|
||
There is an r+ patch which didn't land and no activity in this bug for 1 week.
:maxx, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 3•1 month ago
|
||
Rebased and landing. Thanks!
Updated•26 days ago
|
Description
•