Closed Bug 1833975 Opened 1 years ago Closed 1 years ago

Create a quick suggest test helper to mock remote settings data

Categories

(Firefox :: Address Bar, task, P3)

task

Tracking

()

RESOLVED FIXED
115 Branch
Tracking Status
firefox115 --- fixed

People

(Reporter: adw, Assigned: daisuke)

References

Details

Attachments

(4 files)

Currently only one type of quick suggest result is fetched from remote settings, adM/Wikipedia, and the tests for these results add mock suggestion objects directly to AdmWikiedpia's suggestions map (here and here), completely bypassing the AdmWikipedia code that deals with remote settings.

That's bad because it doesn't exercise the code that deals with remote settings, and it also doesn't address all the new types of results we want to support that will also be fetched from remote settings. We should come up with a generalized test helper to set up mock data in remote settings. It might be as simple as stubbing QuickSuggestRemoteSettings.rs.get() like Daisuke did in this patch for addon suggestions.

Assignee: nobody → daisuke
Status: NEW → ASSIGNED

Depends on D178791

Attachment #9335424 - Attachment description: WIP: Bug 1833975: Sync the RemoteSettings data in ensureQuickSuggestInit by RemoteSettings stub → Bug 1833975: Introduce MockRemoteSettings to sync RemoteSettings data
Attachment #9335425 - Attachment description: WIP: Bug 1833975: Use mock RemoteSettings for setRemoteSettingsResults → Bug 1833975: Use MockRemoteSettings for QuickSuggestTestUtils.setRemoteSettingsResults()
Attachment #9335426 - Attachment description: WIP: Bug 1833975: Use mock RemoteSettings for setConfig → Bug 1833975: Use MockRemoteSettings for QuickSuggestTestUtils.setConfig
Attachment #9335427 - Attachment description: WIP: Bug 1833975: Use rs instead of _test_rs → Bug 1833975: Use rs instead of _test_rs
Blocks: 1834957
Pushed by dakatsuka.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/43f66a49f875 Introduce MockRemoteSettings to sync RemoteSettings data r=adw https://hg.mozilla.org/integration/autoland/rev/f6a474dcdc0e Use MockRemoteSettings for QuickSuggestTestUtils.setRemoteSettingsResults() r=adw https://hg.mozilla.org/integration/autoland/rev/22a19ef954b3 Use MockRemoteSettings for QuickSuggestTestUtils.setConfig r=adw https://hg.mozilla.org/integration/autoland/rev/e06da1bd5237 Use rs instead of _test_rs r=adw
Regressions: 1834992

Backed out for causing xpcshell failures on test_quicksuggest_positionInSuggestions.js

Backout link

Push with failures

Failure log

Flags: needinfo?(daisuke)
Flags: needinfo?(daisuke)
Pushed by dakatsuka.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c7abb8859b9e Introduce MockRemoteSettings to sync RemoteSettings data r=adw https://hg.mozilla.org/integration/autoland/rev/64c4571a122e Use MockRemoteSettings for QuickSuggestTestUtils.setRemoteSettingsResults() r=adw https://hg.mozilla.org/integration/autoland/rev/24e76f31f305 Use MockRemoteSettings for QuickSuggestTestUtils.setConfig r=adw https://hg.mozilla.org/integration/autoland/rev/ecb043fa32f3 Use rs instead of _test_rs r=adw
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: