Bug 1956952 - Add a probe for when CPM is enabled in sidebar customization panel. r=rsafaeian,sidebar-reviewers,kcochrane

Differential Revision: https://phabricator.services.mozilla.com/D243389
This commit is contained in:
Micah Tigley
2025-04-01 00:05:18 +00:00
parent 84dbc93438
commit 4284bf2ce2
3 changed files with 41 additions and 4 deletions

View File

@@ -687,3 +687,24 @@ contextual_manager:
opened:
type: boolean
description: Whether the sidebar is opening.
sidebar_customize_enabled:
type: event
description: >
User clicked on the checkbox corresponding to the "Passwords" entry on sidebar customization settings.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1956952
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1947634
data_sensitivity:
- interaction
expires: never
notification_emails:
- issozi@mozilla.com
- tthorne@mozilla.com
- passwords-dev@mozilla.org
send_in_pings:
- events
extra_keys:
checked:
type: boolean
description: Whether the Passwords box was checked.

View File

@@ -153,6 +153,11 @@ export class SidebarCustomize extends SidebarPage {
checked: e.target.checked,
});
break;
case "viewCPMSidebar":
Glean.contextualManager.sidebarCustomizeEnabled.record({
checked: e.target.checked,
});
break;
}
}

View File

@@ -249,10 +249,7 @@ add_task(async function test_review_checker_sidebar_toggle() {
add_task(async function test_contextual_manager_toggle() {
await SpecialPowers.pushPrefEnv({
set: [
["browser.contextual-password-manager.enabled", true],
["sidebar.revamp", false],
],
set: [["browser.contextual-password-manager.enabled", true]],
});
await SidebarController.waitUntilStable();
const gleanEvent = Glean.contextualManager.sidebarToggle;
@@ -261,6 +258,20 @@ add_task(async function test_contextual_manager_toggle() {
await SidebarController.waitUntilStable();
});
add_task(async function test_customize_contextual_manager_enabled() {
await SpecialPowers.pushPrefEnv({
set: [["browser.contextual-password-manager.enabled", true]],
});
await testCustomizeToggle(
"viewCPMSidebar",
Glean.contextualManager.sidebarCustomizeEnabled,
false
);
await SpecialPowers.popPrefEnv();
await SidebarController.waitUntilStable();
Services.fog.testResetFOG();
});
add_task(async function test_customize_panel_toggle() {
await testSidebarToggle(
"viewCustomizeSidebar",