diff --git a/app/src/redux/analytics/__tests__/make-event.test.ts b/app/src/redux/analytics/__tests__/make-event.test.ts index 70506dc162a..8cc56e18950 100644 --- a/app/src/redux/analytics/__tests__/make-event.test.ts +++ b/app/src/redux/analytics/__tests__/make-event.test.ts @@ -1,5 +1,7 @@ import { vi, describe, it, expect, beforeEach } from 'vitest' +import { OT2_ROBOT_TYPE } from '@opentrons/shared-data' + import { makeEvent } from '../make-event' import * as selectors from '../selectors' @@ -49,6 +51,7 @@ describe('analytics events map', () => { name: 'pipetteOffsetCalibrationStarted', properties: { ...action.payload, + robotType: OT2_ROBOT_TYPE, }, }) }) @@ -65,6 +68,7 @@ describe('analytics events map', () => { name: 'tipLengthCalibrationStarted', properties: { ...action.payload, + robotType: OT2_ROBOT_TYPE, }, }) }) @@ -77,6 +81,7 @@ describe('analytics events map', () => { robotName: 'my-robot', sessionId: 'seshid', command: { command: 'calibration.exitSession' }, + robotType: OT2_ROBOT_TYPE, }, } as any vi.mocked(selectors.getAnalyticsSessionExitDetails).mockReturnValue({ @@ -86,7 +91,7 @@ describe('analytics events map', () => { return expect(makeEvent(action, state)).resolves.toEqual({ name: 'my-session-typeExit', - properties: { step: 'session-step' }, + properties: { step: 'session-step', robotType: OT2_ROBOT_TYPE }, }) }) @@ -117,12 +122,11 @@ describe('analytics events map', () => { properties: { pipetteModel: 'my-pipette-model', tipRackDisplayName: 'some display name', + robotType: OT2_ROBOT_TYPE, }, }) }) - }) - describe('events with calibration data', () => { it('analytics:RESOURCE_MONITOR_REPORT -> resourceMonitorReport event', () => { const state = {} as any const action = { diff --git a/app/src/redux/analytics/make-event.ts b/app/src/redux/analytics/make-event.ts index e163b942c35..608915c4112 100644 --- a/app/src/redux/analytics/make-event.ts +++ b/app/src/redux/analytics/make-event.ts @@ -237,6 +237,7 @@ export function makeEvent( name: 'pipetteOffsetCalibrationStarted', properties: { ...action.payload, + robotType: OT2_ROBOT_TYPE, }, }) } @@ -246,6 +247,7 @@ export function makeEvent( name: 'tipLengthCalibrationStarted', properties: { ...action.payload, + robotType: OT2_ROBOT_TYPE, }, }) }