mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-11-21 16:38:41 -06:00
SDA-2571 Updated event variable name
This commit is contained in:
parent
d84d54239c
commit
3f08517ee2
@ -148,7 +148,7 @@ describe('<AnnotateArea/>', () => {
|
||||
const path = wrapper.find('[data-testid="path0"]');
|
||||
const expectedValue = { type: 'annotate_erased', element: 'screen_capture_annotate' };
|
||||
path.simulate('click');
|
||||
expect(spy).toBeCalledWith('send-tracking-data-to-main', expectedValue);
|
||||
expect(spy).toBeCalledWith('snippet-analytics-data', expectedValue);
|
||||
});
|
||||
|
||||
it('should send annotate_added_pen event when drawn with pen', () => {
|
||||
@ -158,7 +158,7 @@ describe('<AnnotateArea/>', () => {
|
||||
const area = wrapper.find('[data-testid="annotate-area"]');
|
||||
area.simulate('mousedown', { pageX: 2, pageY: 49 });
|
||||
area.simulate('mouseup');
|
||||
expect(spy).toBeCalledWith('send-tracking-data-to-main', expectedValue);
|
||||
expect(spy).toBeCalledWith('snippet-analytics-data', expectedValue);
|
||||
});
|
||||
|
||||
it('should send annotate_added_highlight event when drawn with highlight', () => {
|
||||
@ -178,6 +178,6 @@ describe('<AnnotateArea/>', () => {
|
||||
const area = wrapper.find('[data-testid="annotate-area"]');
|
||||
area.simulate('mousedown', { pageX: 2, pageY: 49 });
|
||||
area.simulate('mouseup');
|
||||
expect(spy).toBeCalledWith('send-tracking-data-to-main', expectedValue);
|
||||
expect(spy).toBeCalledWith('snippet-analytics-data', expectedValue);
|
||||
});
|
||||
});
|
||||
|
@ -25,7 +25,7 @@ describe('Snipping Tool', () => {
|
||||
const spy = jest.spyOn(ipcRenderer, 'send');
|
||||
const expectedValue = { type: 'screenshot_taken', element: 'screen_capture_annotate' };
|
||||
mount(React.createElement(SnippingTool));
|
||||
expect(spy).toBeCalledWith('send-tracking-data-to-main', expectedValue);
|
||||
expect(spy).toBeCalledWith('snippet-analytics-data', expectedValue);
|
||||
});
|
||||
|
||||
it('should send capture_sent BI event when clicking done', async () => {
|
||||
@ -35,7 +35,7 @@ describe('Snipping Tool', () => {
|
||||
wrapper.find('[data-testid="done-button"]').simulate('click');
|
||||
wrapper.update();
|
||||
await waitForPromisesToResolve();
|
||||
expect(spy).toBeCalledWith('send-tracking-data-to-main', expectedValue);
|
||||
expect(spy).toBeCalledWith('snippet-analytics-data', expectedValue);
|
||||
});
|
||||
|
||||
it('should send annotate_cleared BI event when clicking clear', async () => {
|
||||
@ -45,7 +45,7 @@ describe('Snipping Tool', () => {
|
||||
wrapper.find('[data-testid="clear-button"]').simulate('click');
|
||||
wrapper.update();
|
||||
await waitForPromisesToResolve();
|
||||
expect(spy).toBeCalledWith('send-tracking-data-to-main', expectedValue);
|
||||
expect(spy).toBeCalledWith('snippet-analytics-data', expectedValue);
|
||||
});
|
||||
|
||||
it('should render pen color picker when clicked on pen', () => {
|
||||
|
@ -53,7 +53,7 @@ class ScreenSnippet {
|
||||
this.captureUtil = '/usr/bin/gnome-screenshot';
|
||||
}
|
||||
|
||||
ipcMain.on('send-tracking-data-to-main', async (_event, eventData: { element: AnalyticsElements, type: ScreenSnippetActionTypes }) => {
|
||||
ipcMain.on('snippet-analytics-data', async (_event, eventData: { element: AnalyticsElements, type: ScreenSnippetActionTypes }) => {
|
||||
analytics.track({ element: eventData.element, action_type: eventData.type });
|
||||
});
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ const availableHighlightColors: IColor[] = [
|
||||
const SNIPPING_TOOL_NAMESPACE = 'ScreenSnippet';
|
||||
|
||||
export const sendAnalyticsToMain = (element: AnalyticsElements, type: ScreenSnippetActionTypes): void => {
|
||||
ipcRenderer.send('send-tracking-data-to-main', { element, type });
|
||||
ipcRenderer.send('snippet-analytics-data', { element, type });
|
||||
};
|
||||
|
||||
const SnippingTool: React.FunctionComponent<ISnippingToolProps> = ({ existingPaths }) => {
|
||||
|
Loading…
Reference in New Issue
Block a user