feat(metrics): Add Glean metrics for "set password" screen for third party auth

This commit is contained in:
Vijay Budhram 2024-06-21 12:35:43 -04:00
Родитель 25e15d2de2
Коммит a435d98616
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 9778545895B2532B
3 изменённых файлов: 18 добавлений и 18 удалений

Просмотреть файл

@ -253,16 +253,16 @@ const recordEventMetric = (eventName: string, properties: EventProperties) => {
case 'cad_mobile_pair_view':
cadMobilePair.view.record();
break;
case 'set_password_third_party_auth_view':
case 'third_party_auth_set_password_view':
setPasswordThirdPartyAuth.view.record();
break;
case 'set_password_third_party_auth_engage':
case 'third_party_auth_set_password_engage':
setPasswordThirdPartyAuth.engage.record();
break;
case 'set_password_third_party_auth_submit':
case 'third_party_auth_set_password_submit':
setPasswordThirdPartyAuth.submit.record();
break;
case 'set_password_third_party_auth_success':
case 'third_party_auth_set_password_success':
setPasswordThirdPartyAuth.success.record();
break;
}
@ -378,10 +378,10 @@ export const GleanMetrics = {
view: createEventFn('cad_approve_device_view'),
},
setPasswordThirdPartyAuth: {
view: createEventFn('set_password_third_party_auth_view'),
engage: createEventFn('set_password_third_party_auth_engage'),
submit: createEventFn('set_password_third_party_auth_submit'),
success: createEventFn('set_password_third_party_auth_success'),
view: createEventFn('third_party_auth_set_password_view'),
engage: createEventFn('third_party_auth_set_password_engage'),
submit: createEventFn('third_party_auth_set_password_submit'),
success: createEventFn('third_party_auth_set_password_success'),
},
};

Просмотреть файл

@ -457,40 +457,40 @@ describe('lib/glean', () => {
});
});
describe('set_password_third_party_auth', () => {
it('submits a ping with the set_password_third_party_auth_view event name', async () => {
describe('third_party_auth_set_password', () => {
it('submits a ping with the third_party_auth_set_password_view event name', async () => {
await GleanMetrics.setPasswordThirdPartyAuth.view();
sinon.assert.calledOnce(setEventNameStub);
sinon.assert.calledWith(
setEventNameStub,
'set_password_third_party_auth_view'
'third_party_auth_set_password_view'
);
});
it('submits a ping with the set_password_third_party_auth_engage event name', async () => {
it('submits a ping with the third_party_auth_set_password_engage event name', async () => {
await GleanMetrics.setPasswordThirdPartyAuth.engage();
sinon.assert.calledOnce(setEventNameStub);
sinon.assert.calledWith(
setEventNameStub,
'set_password_third_party_auth_engage'
'third_party_auth_set_password_engage'
);
});
it('submits a ping with the set_password_third_party_auth_submit event name', async () => {
it('submits a ping with the third_party_auth_set_password_submit event name', async () => {
await GleanMetrics.setPasswordThirdPartyAuth.submit();
sinon.assert.calledOnce(setEventNameStub);
sinon.assert.calledWith(
setEventNameStub,
'set_password_third_party_auth_submit'
'third_party_auth_set_password_submit'
);
});
it('submits a ping with the set_password_third_party_auth_success event name', async () => {
it('submits a ping with the third_party_auth_set_password_success event name', async () => {
await GleanMetrics.setPasswordThirdPartyAuth.success();
sinon.assert.calledOnce(setEventNameStub);
sinon.assert.calledWith(
setEventNameStub,
'set_password_third_party_auth_success'
'third_party_auth_set_password_success'
);
});
});

Просмотреть файл

@ -1300,7 +1300,7 @@ cad_mobile_pair:
data_sensitivity:
- interaction
set_password_third_party_auth:
third_party_auth_set_password:
view:
type: event
description: |