@thoughtspot/visual-embed-sdk 1.49.2 → 1.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +4 -10
- package/cjs/src/authToken.spec.js +5 -0
- package/cjs/src/authToken.spec.js.map +1 -1
- package/cjs/src/embed/app.d.ts +7 -1
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +6 -0
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +11 -2
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +12 -0
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +30 -0
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/embedConfig.spec.d.ts +2 -0
- package/cjs/src/embed/embedConfig.spec.d.ts.map +1 -0
- package/cjs/src/embed/embedConfig.spec.js +74 -0
- package/cjs/src/embed/embedConfig.spec.js.map +1 -0
- package/cjs/src/embed/host-events.spec.d.ts +2 -0
- package/cjs/src/embed/host-events.spec.d.ts.map +1 -0
- package/cjs/src/embed/host-events.spec.js +1219 -0
- package/cjs/src/embed/host-events.spec.js.map +1 -0
- package/cjs/src/embed/liveboard.d.ts +6 -0
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/spotter-viz-utils.d.ts +29 -0
- package/cjs/src/embed/spotter-viz-utils.d.ts.map +1 -1
- package/cjs/src/embed/spotter-viz-utils.js.map +1 -1
- package/cjs/src/index.d.ts +2 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/mixpanel-service.spec.js +14 -0
- package/cjs/src/mixpanel-service.spec.js.map +1 -1
- package/cjs/src/types.d.ts +93 -6
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +88 -3
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/custom-actions.spec.js +26 -0
- package/cjs/src/utils/custom-actions.spec.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.spec.js +15 -0
- package/cjs/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
- package/cjs/src/utils/processData.spec.js +30 -0
- package/cjs/src/utils/processData.spec.js.map +1 -1
- package/cjs/src/utils/reporting.spec.js +21 -0
- package/cjs/src/utils/reporting.spec.js.map +1 -1
- package/cjs/src/utils/sessionInfoService.spec.d.ts +2 -0
- package/cjs/src/utils/sessionInfoService.spec.d.ts.map +1 -0
- package/cjs/src/utils/sessionInfoService.spec.js +130 -0
- package/cjs/src/utils/sessionInfoService.spec.js.map +1 -0
- package/cjs/src/utils.js +2 -3
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +158 -0
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-CS7yJ2Jj.js → index-B5xoN6Cp.js} +303 -187
- package/dist/src/embed/app.d.ts +7 -1
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +12 -0
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/embedConfig.spec.d.ts +2 -0
- package/dist/src/embed/embedConfig.spec.d.ts.map +1 -0
- package/dist/src/embed/host-events.spec.d.ts +2 -0
- package/dist/src/embed/host-events.spec.d.ts.map +1 -0
- package/dist/src/embed/liveboard.d.ts +6 -0
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/spotter-viz-utils.d.ts +29 -0
- package/dist/src/embed/spotter-viz-utils.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +93 -6
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/sessionInfoService.spec.d.ts +2 -0
- package/dist/src/utils/sessionInfoService.spec.d.ts.map +1 -0
- package/dist/tsembed-react.es.js +126 -18
- package/dist/tsembed-react.js +427 -203
- package/dist/tsembed.es.js +126 -18
- package/dist/tsembed.js +427 -203
- package/dist/visual-embed-sdk-react-full.d.ts +147 -7
- package/dist/visual-embed-sdk-react.d.ts +147 -7
- package/dist/visual-embed-sdk.d.ts +147 -7
- package/lib/package.json +4 -10
- package/lib/src/authToken.spec.js +5 -0
- package/lib/src/authToken.spec.js.map +1 -1
- package/lib/src/embed/app.d.ts +7 -1
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +6 -0
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +11 -2
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +12 -0
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +30 -0
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/embedConfig.spec.d.ts +2 -0
- package/lib/src/embed/embedConfig.spec.d.ts.map +1 -0
- package/lib/src/embed/embedConfig.spec.js +72 -0
- package/lib/src/embed/embedConfig.spec.js.map +1 -0
- package/lib/src/embed/host-events.spec.d.ts +2 -0
- package/lib/src/embed/host-events.spec.d.ts.map +1 -0
- package/lib/src/embed/host-events.spec.js +1216 -0
- package/lib/src/embed/host-events.spec.js.map +1 -0
- package/lib/src/embed/liveboard.d.ts +6 -0
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/spotter-viz-utils.d.ts +29 -0
- package/lib/src/embed/spotter-viz-utils.d.ts.map +1 -1
- package/lib/src/embed/spotter-viz-utils.js.map +1 -1
- package/lib/src/index.d.ts +2 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js.map +1 -1
- package/lib/src/mixpanel-service.spec.js +14 -0
- package/lib/src/mixpanel-service.spec.js.map +1 -1
- package/lib/src/types.d.ts +93 -6
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +88 -3
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/custom-actions.spec.js +26 -0
- package/lib/src/utils/custom-actions.spec.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.spec.js +15 -0
- package/lib/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
- package/lib/src/utils/processData.spec.js +30 -0
- package/lib/src/utils/processData.spec.js.map +1 -1
- package/lib/src/utils/reporting.spec.js +21 -0
- package/lib/src/utils/reporting.spec.js.map +1 -1
- package/lib/src/utils/sessionInfoService.spec.d.ts +2 -0
- package/lib/src/utils/sessionInfoService.spec.d.ts.map +1 -0
- package/lib/src/utils/sessionInfoService.spec.js +127 -0
- package/lib/src/utils/sessionInfoService.spec.js.map +1 -0
- package/lib/src/utils.js +1 -1
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +159 -1
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +147 -7
- package/package.json +4 -10
- package/src/authToken.spec.ts +6 -0
- package/src/embed/app.spec.ts +15 -2
- package/src/embed/app.ts +13 -1
- package/src/embed/conversation.spec.ts +32 -0
- package/src/embed/conversation.ts +12 -0
- package/src/embed/embedConfig.spec.ts +79 -0
- package/src/embed/host-events.spec.ts +1635 -0
- package/src/embed/liveboard.ts +6 -0
- package/src/embed/spotter-viz-utils.ts +30 -0
- package/src/index.ts +2 -1
- package/src/mixpanel-service.spec.ts +15 -0
- package/src/types.ts +96 -6
- package/src/utils/custom-actions.spec.ts +28 -0
- package/src/utils/graphql/answerService/answerService.spec.ts +18 -0
- package/src/utils/processData.spec.ts +32 -0
- package/src/utils/reporting.spec.ts +27 -0
- package/src/utils/sessionInfoService.spec.ts +151 -0
- package/src/utils.spec.ts +195 -0
- package/src/utils.ts +1 -1
|
@@ -0,0 +1,1219 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
/**
|
|
5
|
+
* Unit tests for HostEvents that had no prior coverage.
|
|
6
|
+
* Covers: postMessage type correctness, !isRendered guard (returns null + handleError),
|
|
7
|
+
* and vizId injection on LiveboardEmbed when viewConfig.vizId is set.
|
|
8
|
+
*/
|
|
9
|
+
const index_1 = require("../index");
|
|
10
|
+
const test_utils_1 = require("../test/test-utils");
|
|
11
|
+
const authInstance = tslib_1.__importStar(require("../auth"));
|
|
12
|
+
const thoughtSpotHost = 'https://tshost';
|
|
13
|
+
const liveboardId = 'eca215d4-0d2c-4a55-90e3-d81ef6848ae0';
|
|
14
|
+
const vizId = '6e73f724-660e-11eb-ae93-0242ac130002';
|
|
15
|
+
beforeAll(() => {
|
|
16
|
+
(0, index_1.init)({ thoughtSpotHost, authType: index_1.AuthType.None });
|
|
17
|
+
jest.spyOn(authInstance, 'postLoginService').mockImplementation(() => Promise.resolve(true));
|
|
18
|
+
});
|
|
19
|
+
beforeEach(() => {
|
|
20
|
+
document.body.innerHTML = (0, test_utils_1.getDocumentBody)();
|
|
21
|
+
});
|
|
22
|
+
// ---------------------------------------------------------------------------
|
|
23
|
+
// Helper: render a LiveboardEmbed and return it with the iframe spy
|
|
24
|
+
// ---------------------------------------------------------------------------
|
|
25
|
+
async function renderLiveboard(extraConfig = {}) {
|
|
26
|
+
const lb = new index_1.LiveboardEmbed((0, test_utils_1.getRootEl)(), {
|
|
27
|
+
frameParams: { width: '100%', height: '100%' },
|
|
28
|
+
liveboardId,
|
|
29
|
+
...extraConfig,
|
|
30
|
+
});
|
|
31
|
+
await lb.render();
|
|
32
|
+
const iframe = (0, test_utils_1.getIFrameEl)();
|
|
33
|
+
jest.spyOn(iframe.contentWindow, 'postMessage');
|
|
34
|
+
return { lb, iframe };
|
|
35
|
+
}
|
|
36
|
+
// Helper: create a LiveboardEmbed that has NOT been rendered, with handleError
|
|
37
|
+
// mocked to prevent the jest-setup console.error → throw.
|
|
38
|
+
function unrenderedLiveboard() {
|
|
39
|
+
const lb = new index_1.LiveboardEmbed((0, test_utils_1.getRootEl)(), {
|
|
40
|
+
frameParams: { width: '100%', height: '100%' },
|
|
41
|
+
liveboardId,
|
|
42
|
+
});
|
|
43
|
+
jest.spyOn(lb, 'handleError').mockImplementation(() => { });
|
|
44
|
+
return lb;
|
|
45
|
+
}
|
|
46
|
+
// ---------------------------------------------------------------------------
|
|
47
|
+
// 3 – Filter
|
|
48
|
+
// ---------------------------------------------------------------------------
|
|
49
|
+
describe('HostEvent.Filter', () => {
|
|
50
|
+
test('postMessage type is filter (all lowercase)', async () => {
|
|
51
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
52
|
+
const { lb, iframe } = await renderLiveboard();
|
|
53
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
54
|
+
lb.trigger(index_1.HostEvent.Filter, { columnName: 'col', operator: 'EQ', values: ['v'] });
|
|
55
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'filter' }), thoughtSpotHost, expect.anything());
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
test('returns null and calls handleError when !isRendered', async () => {
|
|
59
|
+
const lb = unrenderedLiveboard();
|
|
60
|
+
const handleErrorSpy = lb.handleError;
|
|
61
|
+
const result = await lb.trigger(index_1.HostEvent.Filter, {});
|
|
62
|
+
expect(result).toBeNull();
|
|
63
|
+
expect(handleErrorSpy).toHaveBeenCalledWith(expect.objectContaining({ code: index_1.EmbedErrorCodes.RENDER_NOT_CALLED }));
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
// ---------------------------------------------------------------------------
|
|
67
|
+
// 8 – UpdateRuntimeFilters
|
|
68
|
+
// ---------------------------------------------------------------------------
|
|
69
|
+
describe('HostEvent.UpdateRuntimeFilters', () => {
|
|
70
|
+
test('postMessage type is UpdateRuntimeFilters (PascalCase)', async () => {
|
|
71
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
72
|
+
const { lb, iframe } = await renderLiveboard();
|
|
73
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
74
|
+
lb.trigger(index_1.HostEvent.UpdateRuntimeFilters, []);
|
|
75
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'UpdateRuntimeFilters' }), thoughtSpotHost, expect.anything());
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
test('returns null when !isRendered', async () => {
|
|
79
|
+
const lb = unrenderedLiveboard();
|
|
80
|
+
const result = await lb.trigger(index_1.HostEvent.UpdateRuntimeFilters, []);
|
|
81
|
+
expect(result).toBeNull();
|
|
82
|
+
});
|
|
83
|
+
test('vizId is injected when viewConfig.vizId is set and payload is object', async () => {
|
|
84
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
85
|
+
const { lb, iframe } = await renderLiveboard({ vizId });
|
|
86
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
87
|
+
lb.trigger(index_1.HostEvent.UpdateRuntimeFilters, [{}]);
|
|
88
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'UpdateRuntimeFilters' }), thoughtSpotHost, expect.anything());
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
// ---------------------------------------------------------------------------
|
|
93
|
+
// 10 – OpenFilter
|
|
94
|
+
// ---------------------------------------------------------------------------
|
|
95
|
+
describe('HostEvent.OpenFilter', () => {
|
|
96
|
+
test('postMessage type is openFilter (camelCase)', async () => {
|
|
97
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
98
|
+
const { lb, iframe } = await renderLiveboard();
|
|
99
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
100
|
+
lb.trigger(index_1.HostEvent.OpenFilter, { columnId: 'col1' });
|
|
101
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'openFilter' }), thoughtSpotHost, expect.anything());
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
test('returns null when !isRendered', async () => {
|
|
105
|
+
const lb = unrenderedLiveboard();
|
|
106
|
+
const result = await lb.trigger(index_1.HostEvent.OpenFilter, {});
|
|
107
|
+
expect(result).toBeNull();
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
// ---------------------------------------------------------------------------
|
|
111
|
+
// 11 – AddColumns
|
|
112
|
+
// ---------------------------------------------------------------------------
|
|
113
|
+
describe('HostEvent.AddColumns', () => {
|
|
114
|
+
test('postMessage type is addColumns (camelCase)', async () => {
|
|
115
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
116
|
+
const { lb, iframe } = await renderLiveboard();
|
|
117
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
118
|
+
lb.trigger(index_1.HostEvent.AddColumns, { columnIds: ['c1'] });
|
|
119
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'addColumns' }), thoughtSpotHost, expect.anything());
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
test('returns null when !isRendered', async () => {
|
|
123
|
+
const lb = unrenderedLiveboard();
|
|
124
|
+
const result = await lb.trigger(index_1.HostEvent.AddColumns, {});
|
|
125
|
+
expect(result).toBeNull();
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
// ---------------------------------------------------------------------------
|
|
129
|
+
// 12 – RemoveColumn
|
|
130
|
+
// ---------------------------------------------------------------------------
|
|
131
|
+
describe('HostEvent.RemoveColumn', () => {
|
|
132
|
+
test('postMessage type is removeColumn (camelCase)', async () => {
|
|
133
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
134
|
+
const { lb, iframe } = await renderLiveboard();
|
|
135
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
136
|
+
lb.trigger(index_1.HostEvent.RemoveColumn, { columnId: 'c1' });
|
|
137
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'removeColumn' }), thoughtSpotHost, expect.anything());
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
test('returns null when !isRendered', async () => {
|
|
141
|
+
const lb = unrenderedLiveboard();
|
|
142
|
+
const result = await lb.trigger(index_1.HostEvent.RemoveColumn, {});
|
|
143
|
+
expect(result).toBeNull();
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
// ---------------------------------------------------------------------------
|
|
147
|
+
// 15 – LiveboardInfo
|
|
148
|
+
// ---------------------------------------------------------------------------
|
|
149
|
+
describe('HostEvent.LiveboardInfo', () => {
|
|
150
|
+
test('postMessage type is pinboardInfo', async () => {
|
|
151
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
152
|
+
const { lb, iframe } = await renderLiveboard();
|
|
153
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
154
|
+
lb.trigger(index_1.HostEvent.LiveboardInfo);
|
|
155
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'pinboardInfo' }), thoughtSpotHost, expect.anything());
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
test('returns null when !isRendered', async () => {
|
|
159
|
+
const lb = unrenderedLiveboard();
|
|
160
|
+
const result = await lb.trigger(index_1.HostEvent.LiveboardInfo);
|
|
161
|
+
expect(result).toBeNull();
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
// ---------------------------------------------------------------------------
|
|
165
|
+
// 16 – Schedule
|
|
166
|
+
// ---------------------------------------------------------------------------
|
|
167
|
+
describe('HostEvent.Schedule', () => {
|
|
168
|
+
test('postMessage type is subscription', async () => {
|
|
169
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
170
|
+
const { lb, iframe } = await renderLiveboard();
|
|
171
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
172
|
+
lb.trigger(index_1.HostEvent.Schedule);
|
|
173
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'subscription' }), thoughtSpotHost, expect.anything());
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
test('returns null when !isRendered', async () => {
|
|
177
|
+
const lb = unrenderedLiveboard();
|
|
178
|
+
const result = await lb.trigger(index_1.HostEvent.Schedule);
|
|
179
|
+
expect(result).toBeNull();
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
// ---------------------------------------------------------------------------
|
|
183
|
+
// 17 – SchedulesList
|
|
184
|
+
// ---------------------------------------------------------------------------
|
|
185
|
+
describe('HostEvent.SchedulesList', () => {
|
|
186
|
+
test('postMessage type is schedule-list (hyphenated)', async () => {
|
|
187
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
188
|
+
const { lb, iframe } = await renderLiveboard();
|
|
189
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
190
|
+
lb.trigger(index_1.HostEvent.SchedulesList);
|
|
191
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'schedule-list' }), thoughtSpotHost, expect.anything());
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
test('returns null when !isRendered', async () => {
|
|
195
|
+
const lb = unrenderedLiveboard();
|
|
196
|
+
const result = await lb.trigger(index_1.HostEvent.SchedulesList);
|
|
197
|
+
expect(result).toBeNull();
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
// ---------------------------------------------------------------------------
|
|
201
|
+
// 18 – ExportTML
|
|
202
|
+
// ---------------------------------------------------------------------------
|
|
203
|
+
describe('HostEvent.ExportTML', () => {
|
|
204
|
+
test('postMessage type is exportTSL (uses TSL abbreviation)', async () => {
|
|
205
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
206
|
+
const { lb, iframe } = await renderLiveboard();
|
|
207
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
208
|
+
lb.trigger(index_1.HostEvent.ExportTML);
|
|
209
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'exportTSL' }), thoughtSpotHost, expect.anything());
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
test('returns null when !isRendered', async () => {
|
|
213
|
+
const lb = unrenderedLiveboard();
|
|
214
|
+
const result = await lb.trigger(index_1.HostEvent.ExportTML);
|
|
215
|
+
expect(result).toBeNull();
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
// ---------------------------------------------------------------------------
|
|
219
|
+
// 19 – EditTML
|
|
220
|
+
// ---------------------------------------------------------------------------
|
|
221
|
+
describe('HostEvent.EditTML', () => {
|
|
222
|
+
test('postMessage type is editTSL', async () => {
|
|
223
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
224
|
+
const { lb, iframe } = await renderLiveboard();
|
|
225
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
226
|
+
lb.trigger(index_1.HostEvent.EditTML);
|
|
227
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'editTSL' }), thoughtSpotHost, expect.anything());
|
|
228
|
+
});
|
|
229
|
+
});
|
|
230
|
+
test('returns null when !isRendered', async () => {
|
|
231
|
+
const lb = unrenderedLiveboard();
|
|
232
|
+
const result = await lb.trigger(index_1.HostEvent.EditTML);
|
|
233
|
+
expect(result).toBeNull();
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
// ---------------------------------------------------------------------------
|
|
237
|
+
// 20 – UpdateTML
|
|
238
|
+
// ---------------------------------------------------------------------------
|
|
239
|
+
describe('HostEvent.UpdateTML', () => {
|
|
240
|
+
test('postMessage type is updateTSL', async () => {
|
|
241
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
242
|
+
const { lb, iframe } = await renderLiveboard();
|
|
243
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
244
|
+
lb.trigger(index_1.HostEvent.UpdateTML);
|
|
245
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'updateTSL' }), thoughtSpotHost, expect.anything());
|
|
246
|
+
});
|
|
247
|
+
});
|
|
248
|
+
test('returns null when !isRendered', async () => {
|
|
249
|
+
const lb = unrenderedLiveboard();
|
|
250
|
+
const result = await lb.trigger(index_1.HostEvent.UpdateTML);
|
|
251
|
+
expect(result).toBeNull();
|
|
252
|
+
});
|
|
253
|
+
});
|
|
254
|
+
// ---------------------------------------------------------------------------
|
|
255
|
+
// 21 – DownloadAsPdf
|
|
256
|
+
// ---------------------------------------------------------------------------
|
|
257
|
+
describe('HostEvent.DownloadAsPdf', () => {
|
|
258
|
+
test('postMessage type is downloadAsPdf (camelCase)', async () => {
|
|
259
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
260
|
+
const { lb, iframe } = await renderLiveboard();
|
|
261
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
262
|
+
lb.trigger(index_1.HostEvent.DownloadAsPdf);
|
|
263
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'downloadAsPdf' }), thoughtSpotHost, expect.anything());
|
|
264
|
+
});
|
|
265
|
+
});
|
|
266
|
+
test('returns null when !isRendered', async () => {
|
|
267
|
+
const lb = unrenderedLiveboard();
|
|
268
|
+
const result = await lb.trigger(index_1.HostEvent.DownloadAsPdf);
|
|
269
|
+
expect(result).toBeNull();
|
|
270
|
+
});
|
|
271
|
+
});
|
|
272
|
+
// ---------------------------------------------------------------------------
|
|
273
|
+
// 22 – DownloadLiveboardAsContinuousPDF
|
|
274
|
+
// ---------------------------------------------------------------------------
|
|
275
|
+
describe('HostEvent.DownloadLiveboardAsContinuousPDF', () => {
|
|
276
|
+
test('postMessage type is downloadLiveboardAsContinuousPDF', async () => {
|
|
277
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
278
|
+
const { lb, iframe } = await renderLiveboard();
|
|
279
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
280
|
+
lb.trigger(index_1.HostEvent.DownloadLiveboardAsContinuousPDF);
|
|
281
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'downloadLiveboardAsContinuousPDF' }), thoughtSpotHost, expect.anything());
|
|
282
|
+
});
|
|
283
|
+
});
|
|
284
|
+
test('returns null when !isRendered', async () => {
|
|
285
|
+
const lb = unrenderedLiveboard();
|
|
286
|
+
const result = await lb.trigger(index_1.HostEvent.DownloadLiveboardAsContinuousPDF);
|
|
287
|
+
expect(result).toBeNull();
|
|
288
|
+
});
|
|
289
|
+
});
|
|
290
|
+
// ---------------------------------------------------------------------------
|
|
291
|
+
// 23 – AIHighlights
|
|
292
|
+
// ---------------------------------------------------------------------------
|
|
293
|
+
describe('HostEvent.AIHighlights', () => {
|
|
294
|
+
test('postMessage type is AIHighlights (PascalCase)', async () => {
|
|
295
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
296
|
+
const { lb, iframe } = await renderLiveboard();
|
|
297
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
298
|
+
lb.trigger(index_1.HostEvent.AIHighlights);
|
|
299
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'AIHighlights' }), thoughtSpotHost, expect.anything());
|
|
300
|
+
});
|
|
301
|
+
});
|
|
302
|
+
test('returns null when !isRendered', async () => {
|
|
303
|
+
const lb = unrenderedLiveboard();
|
|
304
|
+
const result = await lb.trigger(index_1.HostEvent.AIHighlights);
|
|
305
|
+
expect(result).toBeNull();
|
|
306
|
+
});
|
|
307
|
+
});
|
|
308
|
+
// ---------------------------------------------------------------------------
|
|
309
|
+
// 24 – MakeACopy
|
|
310
|
+
// ---------------------------------------------------------------------------
|
|
311
|
+
describe('HostEvent.MakeACopy', () => {
|
|
312
|
+
test('postMessage type is makeACopy (camelCase)', async () => {
|
|
313
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
314
|
+
const { lb, iframe } = await renderLiveboard();
|
|
315
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
316
|
+
lb.trigger(index_1.HostEvent.MakeACopy);
|
|
317
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'makeACopy' }), thoughtSpotHost, expect.anything());
|
|
318
|
+
});
|
|
319
|
+
});
|
|
320
|
+
test('returns null when !isRendered', async () => {
|
|
321
|
+
const lb = unrenderedLiveboard();
|
|
322
|
+
const result = await lb.trigger(index_1.HostEvent.MakeACopy);
|
|
323
|
+
expect(result).toBeNull();
|
|
324
|
+
});
|
|
325
|
+
});
|
|
326
|
+
// ---------------------------------------------------------------------------
|
|
327
|
+
// 25 – Remove (maps to 'delete' string)
|
|
328
|
+
// ---------------------------------------------------------------------------
|
|
329
|
+
describe('HostEvent.Remove', () => {
|
|
330
|
+
test("postMessage type is 'delete' (NOT 'Remove')", async () => {
|
|
331
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
332
|
+
const { lb, iframe } = await renderLiveboard();
|
|
333
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
334
|
+
lb.trigger(index_1.HostEvent.Remove);
|
|
335
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'delete' }), thoughtSpotHost, expect.anything());
|
|
336
|
+
});
|
|
337
|
+
});
|
|
338
|
+
test('returns null when !isRendered', async () => {
|
|
339
|
+
const lb = unrenderedLiveboard();
|
|
340
|
+
const result = await lb.trigger(index_1.HostEvent.Remove);
|
|
341
|
+
expect(result).toBeNull();
|
|
342
|
+
});
|
|
343
|
+
});
|
|
344
|
+
// ---------------------------------------------------------------------------
|
|
345
|
+
// 26 – Explore
|
|
346
|
+
// ---------------------------------------------------------------------------
|
|
347
|
+
describe('HostEvent.Explore', () => {
|
|
348
|
+
test('postMessage type is explore (all lowercase)', async () => {
|
|
349
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
350
|
+
const { lb, iframe } = await renderLiveboard();
|
|
351
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
352
|
+
lb.trigger(index_1.HostEvent.Explore, { vizId: 'v1' });
|
|
353
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'explore' }), thoughtSpotHost, expect.anything());
|
|
354
|
+
});
|
|
355
|
+
});
|
|
356
|
+
test('returns null when !isRendered', async () => {
|
|
357
|
+
const lb = unrenderedLiveboard();
|
|
358
|
+
const result = await lb.trigger(index_1.HostEvent.Explore, {});
|
|
359
|
+
expect(result).toBeNull();
|
|
360
|
+
});
|
|
361
|
+
});
|
|
362
|
+
// ---------------------------------------------------------------------------
|
|
363
|
+
// 27 – CreateMonitor
|
|
364
|
+
// ---------------------------------------------------------------------------
|
|
365
|
+
describe('HostEvent.CreateMonitor', () => {
|
|
366
|
+
test('postMessage type is createMonitor (camelCase)', async () => {
|
|
367
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
368
|
+
const { lb, iframe } = await renderLiveboard();
|
|
369
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
370
|
+
lb.trigger(index_1.HostEvent.CreateMonitor);
|
|
371
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'createMonitor' }), thoughtSpotHost, expect.anything());
|
|
372
|
+
});
|
|
373
|
+
});
|
|
374
|
+
test('returns null when !isRendered', async () => {
|
|
375
|
+
const lb = unrenderedLiveboard();
|
|
376
|
+
const result = await lb.trigger(index_1.HostEvent.CreateMonitor);
|
|
377
|
+
expect(result).toBeNull();
|
|
378
|
+
});
|
|
379
|
+
});
|
|
380
|
+
// ---------------------------------------------------------------------------
|
|
381
|
+
// 28 – ManageMonitor
|
|
382
|
+
// ---------------------------------------------------------------------------
|
|
383
|
+
describe('HostEvent.ManageMonitor', () => {
|
|
384
|
+
test('postMessage type is manageMonitor (camelCase)', async () => {
|
|
385
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
386
|
+
const { lb, iframe } = await renderLiveboard();
|
|
387
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
388
|
+
lb.trigger(index_1.HostEvent.ManageMonitor);
|
|
389
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'manageMonitor' }), thoughtSpotHost, expect.anything());
|
|
390
|
+
});
|
|
391
|
+
});
|
|
392
|
+
test('returns null when !isRendered', async () => {
|
|
393
|
+
const lb = unrenderedLiveboard();
|
|
394
|
+
const result = await lb.trigger(index_1.HostEvent.ManageMonitor);
|
|
395
|
+
expect(result).toBeNull();
|
|
396
|
+
});
|
|
397
|
+
});
|
|
398
|
+
// ---------------------------------------------------------------------------
|
|
399
|
+
// 29 – Edit
|
|
400
|
+
// ---------------------------------------------------------------------------
|
|
401
|
+
describe('HostEvent.Edit', () => {
|
|
402
|
+
test('postMessage type is edit (all lowercase)', async () => {
|
|
403
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
404
|
+
const { lb, iframe } = await renderLiveboard();
|
|
405
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
406
|
+
lb.trigger(index_1.HostEvent.Edit);
|
|
407
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'edit' }), thoughtSpotHost, expect.anything());
|
|
408
|
+
});
|
|
409
|
+
});
|
|
410
|
+
test('returns null when !isRendered', async () => {
|
|
411
|
+
const lb = unrenderedLiveboard();
|
|
412
|
+
const result = await lb.trigger(index_1.HostEvent.Edit);
|
|
413
|
+
expect(result).toBeNull();
|
|
414
|
+
});
|
|
415
|
+
});
|
|
416
|
+
// ---------------------------------------------------------------------------
|
|
417
|
+
// 30 – CopyLink (maps to 'embedDocument')
|
|
418
|
+
// ---------------------------------------------------------------------------
|
|
419
|
+
describe('HostEvent.CopyLink', () => {
|
|
420
|
+
test("postMessage type is 'embedDocument' (NOT 'CopyLink')", async () => {
|
|
421
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
422
|
+
const { lb, iframe } = await renderLiveboard();
|
|
423
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
424
|
+
lb.trigger(index_1.HostEvent.CopyLink);
|
|
425
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'embedDocument' }), thoughtSpotHost, expect.anything());
|
|
426
|
+
});
|
|
427
|
+
});
|
|
428
|
+
test('returns null when !isRendered', async () => {
|
|
429
|
+
const lb = unrenderedLiveboard();
|
|
430
|
+
const result = await lb.trigger(index_1.HostEvent.CopyLink);
|
|
431
|
+
expect(result).toBeNull();
|
|
432
|
+
});
|
|
433
|
+
});
|
|
434
|
+
// ---------------------------------------------------------------------------
|
|
435
|
+
// 33 – ShowUnderlyingData
|
|
436
|
+
// ---------------------------------------------------------------------------
|
|
437
|
+
describe('HostEvent.ShowUnderlyingData', () => {
|
|
438
|
+
test('postMessage type is showUnderlyingData (camelCase)', async () => {
|
|
439
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
440
|
+
const { lb, iframe } = await renderLiveboard();
|
|
441
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
442
|
+
lb.trigger(index_1.HostEvent.ShowUnderlyingData);
|
|
443
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'showUnderlyingData' }), thoughtSpotHost, expect.anything());
|
|
444
|
+
});
|
|
445
|
+
});
|
|
446
|
+
test('returns null when !isRendered', async () => {
|
|
447
|
+
const lb = unrenderedLiveboard();
|
|
448
|
+
const result = await lb.trigger(index_1.HostEvent.ShowUnderlyingData);
|
|
449
|
+
expect(result).toBeNull();
|
|
450
|
+
});
|
|
451
|
+
});
|
|
452
|
+
// ---------------------------------------------------------------------------
|
|
453
|
+
// 34 – Delete (maps to 'onDeleteAnswer')
|
|
454
|
+
// ---------------------------------------------------------------------------
|
|
455
|
+
describe('HostEvent.Delete', () => {
|
|
456
|
+
test("postMessage type is 'onDeleteAnswer' (NOT 'delete' or 'Delete')", async () => {
|
|
457
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
458
|
+
const { lb, iframe } = await renderLiveboard();
|
|
459
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
460
|
+
lb.trigger(index_1.HostEvent.Delete);
|
|
461
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'onDeleteAnswer' }), thoughtSpotHost, expect.anything());
|
|
462
|
+
});
|
|
463
|
+
});
|
|
464
|
+
test('returns null when !isRendered', async () => {
|
|
465
|
+
const lb = unrenderedLiveboard();
|
|
466
|
+
const result = await lb.trigger(index_1.HostEvent.Delete);
|
|
467
|
+
expect(result).toBeNull();
|
|
468
|
+
});
|
|
469
|
+
});
|
|
470
|
+
// ---------------------------------------------------------------------------
|
|
471
|
+
// 35 – SpotIQAnalyze
|
|
472
|
+
// ---------------------------------------------------------------------------
|
|
473
|
+
describe('HostEvent.SpotIQAnalyze', () => {
|
|
474
|
+
test('postMessage type is spotIQAnalyze (camelCase)', async () => {
|
|
475
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
476
|
+
const { lb, iframe } = await renderLiveboard();
|
|
477
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
478
|
+
lb.trigger(index_1.HostEvent.SpotIQAnalyze);
|
|
479
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'spotIQAnalyze' }), thoughtSpotHost, expect.anything());
|
|
480
|
+
});
|
|
481
|
+
});
|
|
482
|
+
test('returns null when !isRendered', async () => {
|
|
483
|
+
const lb = unrenderedLiveboard();
|
|
484
|
+
const result = await lb.trigger(index_1.HostEvent.SpotIQAnalyze);
|
|
485
|
+
expect(result).toBeNull();
|
|
486
|
+
});
|
|
487
|
+
});
|
|
488
|
+
// ---------------------------------------------------------------------------
|
|
489
|
+
// 36 – Download (maps to 'downloadAsPng', same as DownloadAsPng)
|
|
490
|
+
// ---------------------------------------------------------------------------
|
|
491
|
+
describe('HostEvent.Download', () => {
|
|
492
|
+
test("postMessage type is 'downloadAsPng' (same string as DownloadAsPng)", async () => {
|
|
493
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
494
|
+
const { lb, iframe } = await renderLiveboard();
|
|
495
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
496
|
+
lb.trigger(index_1.HostEvent.Download);
|
|
497
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'downloadAsPng' }), thoughtSpotHost, expect.anything());
|
|
498
|
+
});
|
|
499
|
+
});
|
|
500
|
+
test('Download and DownloadAsPng share the identical string value', () => {
|
|
501
|
+
expect(index_1.HostEvent.Download).toBe(index_1.HostEvent.DownloadAsPng);
|
|
502
|
+
});
|
|
503
|
+
test('returns null when !isRendered', async () => {
|
|
504
|
+
const lb = unrenderedLiveboard();
|
|
505
|
+
const result = await lb.trigger(index_1.HostEvent.Download);
|
|
506
|
+
expect(result).toBeNull();
|
|
507
|
+
});
|
|
508
|
+
});
|
|
509
|
+
// ---------------------------------------------------------------------------
|
|
510
|
+
// 37 – DownloadAsPng
|
|
511
|
+
// ---------------------------------------------------------------------------
|
|
512
|
+
describe('HostEvent.DownloadAsPng', () => {
|
|
513
|
+
test('postMessage type is downloadAsPng', async () => {
|
|
514
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
515
|
+
const { lb, iframe } = await renderLiveboard();
|
|
516
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
517
|
+
lb.trigger(index_1.HostEvent.DownloadAsPng);
|
|
518
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'downloadAsPng' }), thoughtSpotHost, expect.anything());
|
|
519
|
+
});
|
|
520
|
+
});
|
|
521
|
+
test('returns null when !isRendered', async () => {
|
|
522
|
+
const lb = unrenderedLiveboard();
|
|
523
|
+
const result = await lb.trigger(index_1.HostEvent.DownloadAsPng);
|
|
524
|
+
expect(result).toBeNull();
|
|
525
|
+
});
|
|
526
|
+
});
|
|
527
|
+
// ---------------------------------------------------------------------------
|
|
528
|
+
// 39 – DownloadAsXlsx
|
|
529
|
+
// ---------------------------------------------------------------------------
|
|
530
|
+
describe('HostEvent.DownloadAsXlsx', () => {
|
|
531
|
+
test('postMessage type is downloadAsXLSX (capital X-L-S-X)', async () => {
|
|
532
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
533
|
+
const { lb, iframe } = await renderLiveboard();
|
|
534
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
535
|
+
lb.trigger(index_1.HostEvent.DownloadAsXlsx);
|
|
536
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'downloadAsXLSX' }), thoughtSpotHost, expect.anything());
|
|
537
|
+
});
|
|
538
|
+
});
|
|
539
|
+
test('returns null when !isRendered', async () => {
|
|
540
|
+
const lb = unrenderedLiveboard();
|
|
541
|
+
const result = await lb.trigger(index_1.HostEvent.DownloadAsXlsx);
|
|
542
|
+
expect(result).toBeNull();
|
|
543
|
+
});
|
|
544
|
+
});
|
|
545
|
+
// ---------------------------------------------------------------------------
|
|
546
|
+
// 40 – Share
|
|
547
|
+
// ---------------------------------------------------------------------------
|
|
548
|
+
describe('HostEvent.Share', () => {
|
|
549
|
+
test('postMessage type is share (all lowercase)', async () => {
|
|
550
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
551
|
+
const { lb, iframe } = await renderLiveboard();
|
|
552
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
553
|
+
lb.trigger(index_1.HostEvent.Share);
|
|
554
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'share' }), thoughtSpotHost, expect.anything());
|
|
555
|
+
});
|
|
556
|
+
});
|
|
557
|
+
test('returns null when !isRendered', async () => {
|
|
558
|
+
const lb = unrenderedLiveboard();
|
|
559
|
+
const result = await lb.trigger(index_1.HostEvent.Share);
|
|
560
|
+
expect(result).toBeNull();
|
|
561
|
+
});
|
|
562
|
+
});
|
|
563
|
+
// ---------------------------------------------------------------------------
|
|
564
|
+
// 42 – SyncToSheets
|
|
565
|
+
// ---------------------------------------------------------------------------
|
|
566
|
+
describe('HostEvent.SyncToSheets', () => {
|
|
567
|
+
test('postMessage type is sync-to-sheets (hyphenated, all lowercase)', async () => {
|
|
568
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
569
|
+
const { lb, iframe } = await renderLiveboard();
|
|
570
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
571
|
+
lb.trigger(index_1.HostEvent.SyncToSheets);
|
|
572
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'sync-to-sheets' }), thoughtSpotHost, expect.anything());
|
|
573
|
+
});
|
|
574
|
+
});
|
|
575
|
+
test('returns null when !isRendered', async () => {
|
|
576
|
+
const lb = unrenderedLiveboard();
|
|
577
|
+
const result = await lb.trigger(index_1.HostEvent.SyncToSheets);
|
|
578
|
+
expect(result).toBeNull();
|
|
579
|
+
});
|
|
580
|
+
});
|
|
581
|
+
// ---------------------------------------------------------------------------
|
|
582
|
+
// 43 – SyncToOtherApps
|
|
583
|
+
// ---------------------------------------------------------------------------
|
|
584
|
+
describe('HostEvent.SyncToOtherApps', () => {
|
|
585
|
+
test('postMessage type is sync-to-other-apps (hyphenated)', async () => {
|
|
586
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
587
|
+
const { lb, iframe } = await renderLiveboard();
|
|
588
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
589
|
+
lb.trigger(index_1.HostEvent.SyncToOtherApps);
|
|
590
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'sync-to-other-apps' }), thoughtSpotHost, expect.anything());
|
|
591
|
+
});
|
|
592
|
+
});
|
|
593
|
+
test('returns null when !isRendered', async () => {
|
|
594
|
+
const lb = unrenderedLiveboard();
|
|
595
|
+
const result = await lb.trigger(index_1.HostEvent.SyncToOtherApps);
|
|
596
|
+
expect(result).toBeNull();
|
|
597
|
+
});
|
|
598
|
+
});
|
|
599
|
+
// ---------------------------------------------------------------------------
|
|
600
|
+
// 44 – ManagePipelines
|
|
601
|
+
// ---------------------------------------------------------------------------
|
|
602
|
+
describe('HostEvent.ManagePipelines', () => {
|
|
603
|
+
test("postMessage type is 'manage-pipeline' (singular, hyphenated)", async () => {
|
|
604
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
605
|
+
const { lb, iframe } = await renderLiveboard();
|
|
606
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
607
|
+
lb.trigger(index_1.HostEvent.ManagePipelines);
|
|
608
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'manage-pipeline' }), thoughtSpotHost, expect.anything());
|
|
609
|
+
});
|
|
610
|
+
});
|
|
611
|
+
test('returns null when !isRendered', async () => {
|
|
612
|
+
const lb = unrenderedLiveboard();
|
|
613
|
+
const result = await lb.trigger(index_1.HostEvent.ManagePipelines);
|
|
614
|
+
expect(result).toBeNull();
|
|
615
|
+
});
|
|
616
|
+
});
|
|
617
|
+
// ---------------------------------------------------------------------------
|
|
618
|
+
// 45 – ResetSearch
|
|
619
|
+
// ---------------------------------------------------------------------------
|
|
620
|
+
describe('HostEvent.ResetSearch', () => {
|
|
621
|
+
test('postMessage type is resetSearch (camelCase)', async () => {
|
|
622
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
623
|
+
const { lb, iframe } = await renderLiveboard();
|
|
624
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
625
|
+
lb.trigger(index_1.HostEvent.ResetSearch);
|
|
626
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'resetSearch' }), thoughtSpotHost, expect.anything());
|
|
627
|
+
});
|
|
628
|
+
});
|
|
629
|
+
test('returns null when !isRendered', async () => {
|
|
630
|
+
const lb = unrenderedLiveboard();
|
|
631
|
+
const result = await lb.trigger(index_1.HostEvent.ResetSearch);
|
|
632
|
+
expect(result).toBeNull();
|
|
633
|
+
});
|
|
634
|
+
});
|
|
635
|
+
// ---------------------------------------------------------------------------
|
|
636
|
+
// 49 – SetVisibleTabs
|
|
637
|
+
// ---------------------------------------------------------------------------
|
|
638
|
+
describe('HostEvent.SetVisibleTabs', () => {
|
|
639
|
+
test("postMessage type is 'SetPinboardVisibleTabs' (NOT 'SetVisibleTabs')", async () => {
|
|
640
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
641
|
+
const { lb, iframe } = await renderLiveboard();
|
|
642
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
643
|
+
lb.trigger(index_1.HostEvent.SetVisibleTabs, ['tab1']);
|
|
644
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'SetPinboardVisibleTabs' }), thoughtSpotHost, expect.anything());
|
|
645
|
+
});
|
|
646
|
+
});
|
|
647
|
+
test('returns null when !isRendered', async () => {
|
|
648
|
+
const lb = unrenderedLiveboard();
|
|
649
|
+
const result = await lb.trigger(index_1.HostEvent.SetVisibleTabs, []);
|
|
650
|
+
expect(result).toBeNull();
|
|
651
|
+
});
|
|
652
|
+
});
|
|
653
|
+
// ---------------------------------------------------------------------------
|
|
654
|
+
// 50 – SetHiddenTabs
|
|
655
|
+
// ---------------------------------------------------------------------------
|
|
656
|
+
describe('HostEvent.SetHiddenTabs', () => {
|
|
657
|
+
test("postMessage type is 'SetPinboardHiddenTabs' (NOT 'SetHiddenTabs')", async () => {
|
|
658
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
659
|
+
const { lb, iframe } = await renderLiveboard();
|
|
660
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
661
|
+
lb.trigger(index_1.HostEvent.SetHiddenTabs, ['tab1']);
|
|
662
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'SetPinboardHiddenTabs' }), thoughtSpotHost, expect.anything());
|
|
663
|
+
});
|
|
664
|
+
});
|
|
665
|
+
test('returns null when !isRendered', async () => {
|
|
666
|
+
const lb = unrenderedLiveboard();
|
|
667
|
+
const result = await lb.trigger(index_1.HostEvent.SetHiddenTabs, []);
|
|
668
|
+
expect(result).toBeNull();
|
|
669
|
+
});
|
|
670
|
+
});
|
|
671
|
+
// ---------------------------------------------------------------------------
|
|
672
|
+
// 52 – AskSage
|
|
673
|
+
// ---------------------------------------------------------------------------
|
|
674
|
+
describe('HostEvent.AskSage', () => {
|
|
675
|
+
test('postMessage type is AskSage (PascalCase)', async () => {
|
|
676
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
677
|
+
const { lb, iframe } = await renderLiveboard();
|
|
678
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
679
|
+
lb.trigger(index_1.HostEvent.AskSage);
|
|
680
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'AskSage' }), thoughtSpotHost, expect.anything());
|
|
681
|
+
});
|
|
682
|
+
});
|
|
683
|
+
test('returns null when !isRendered', async () => {
|
|
684
|
+
const lb = unrenderedLiveboard();
|
|
685
|
+
const result = await lb.trigger(index_1.HostEvent.AskSage);
|
|
686
|
+
expect(result).toBeNull();
|
|
687
|
+
});
|
|
688
|
+
});
|
|
689
|
+
// ---------------------------------------------------------------------------
|
|
690
|
+
// 53 – UpdateCrossFilter
|
|
691
|
+
// ---------------------------------------------------------------------------
|
|
692
|
+
describe('HostEvent.UpdateCrossFilter', () => {
|
|
693
|
+
test('postMessage type is UpdateCrossFilter (PascalCase)', async () => {
|
|
694
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
695
|
+
const { lb, iframe } = await renderLiveboard();
|
|
696
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
697
|
+
lb.trigger(index_1.HostEvent.UpdateCrossFilter, {});
|
|
698
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'UpdateCrossFilter' }), thoughtSpotHost, expect.anything());
|
|
699
|
+
});
|
|
700
|
+
});
|
|
701
|
+
test('returns null when !isRendered', async () => {
|
|
702
|
+
const lb = unrenderedLiveboard();
|
|
703
|
+
const result = await lb.trigger(index_1.HostEvent.UpdateCrossFilter, {});
|
|
704
|
+
expect(result).toBeNull();
|
|
705
|
+
});
|
|
706
|
+
});
|
|
707
|
+
// ---------------------------------------------------------------------------
|
|
708
|
+
// 56 – UpdateParameters
|
|
709
|
+
// ---------------------------------------------------------------------------
|
|
710
|
+
describe('HostEvent.UpdateParameters', () => {
|
|
711
|
+
test('postMessage type is UpdateParameters (PascalCase)', async () => {
|
|
712
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
713
|
+
const { lb, iframe } = await renderLiveboard();
|
|
714
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
715
|
+
lb.trigger(index_1.HostEvent.UpdateParameters, {});
|
|
716
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'UpdateParameters' }), thoughtSpotHost, expect.anything());
|
|
717
|
+
});
|
|
718
|
+
});
|
|
719
|
+
test('returns null when !isRendered', async () => {
|
|
720
|
+
const lb = unrenderedLiveboard();
|
|
721
|
+
const result = await lb.trigger(index_1.HostEvent.UpdateParameters, {});
|
|
722
|
+
expect(result).toBeNull();
|
|
723
|
+
});
|
|
724
|
+
});
|
|
725
|
+
// ---------------------------------------------------------------------------
|
|
726
|
+
// 60 – SelectPersonalizedView (maps to British spelling)
|
|
727
|
+
// ---------------------------------------------------------------------------
|
|
728
|
+
describe('HostEvent.SelectPersonalizedView', () => {
|
|
729
|
+
test("postMessage type is 'SelectPersonalisedView' (British spelling)", async () => {
|
|
730
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
731
|
+
const { lb, iframe } = await renderLiveboard();
|
|
732
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
733
|
+
lb.trigger(index_1.HostEvent.SelectPersonalizedView, {});
|
|
734
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'SelectPersonalisedView' }), thoughtSpotHost, expect.anything());
|
|
735
|
+
});
|
|
736
|
+
});
|
|
737
|
+
test('returns null when !isRendered', async () => {
|
|
738
|
+
const lb = unrenderedLiveboard();
|
|
739
|
+
const result = await lb.trigger(index_1.HostEvent.SelectPersonalizedView, {});
|
|
740
|
+
expect(result).toBeNull();
|
|
741
|
+
});
|
|
742
|
+
});
|
|
743
|
+
// ---------------------------------------------------------------------------
|
|
744
|
+
// 64 – TransformTableVizData
|
|
745
|
+
// ---------------------------------------------------------------------------
|
|
746
|
+
describe('HostEvent.TransformTableVizData', () => {
|
|
747
|
+
test('postMessage type is TransformTableVizData (PascalCase)', async () => {
|
|
748
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
749
|
+
const { lb, iframe } = await renderLiveboard();
|
|
750
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
751
|
+
lb.trigger(index_1.HostEvent.TransformTableVizData, {});
|
|
752
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'TransformTableVizData' }), thoughtSpotHost, expect.anything());
|
|
753
|
+
});
|
|
754
|
+
});
|
|
755
|
+
test('returns null when !isRendered', async () => {
|
|
756
|
+
const lb = unrenderedLiveboard();
|
|
757
|
+
const result = await lb.trigger(index_1.HostEvent.TransformTableVizData, {});
|
|
758
|
+
expect(result).toBeNull();
|
|
759
|
+
});
|
|
760
|
+
});
|
|
761
|
+
// ---------------------------------------------------------------------------
|
|
762
|
+
// 65 – SpotterSearch
|
|
763
|
+
// ---------------------------------------------------------------------------
|
|
764
|
+
describe('HostEvent.SpotterSearch', () => {
|
|
765
|
+
test('postMessage type is SpotterSearch (PascalCase)', async () => {
|
|
766
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
767
|
+
const { lb, iframe } = await renderLiveboard();
|
|
768
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
769
|
+
lb.trigger(index_1.HostEvent.SpotterSearch, {});
|
|
770
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'SpotterSearch' }), thoughtSpotHost, expect.anything());
|
|
771
|
+
});
|
|
772
|
+
});
|
|
773
|
+
test('returns null when !isRendered', async () => {
|
|
774
|
+
const lb = unrenderedLiveboard();
|
|
775
|
+
const result = await lb.trigger(index_1.HostEvent.SpotterSearch, {});
|
|
776
|
+
expect(result).toBeNull();
|
|
777
|
+
});
|
|
778
|
+
});
|
|
779
|
+
// ---------------------------------------------------------------------------
|
|
780
|
+
// 66 – EditLastPrompt
|
|
781
|
+
// ---------------------------------------------------------------------------
|
|
782
|
+
describe('HostEvent.EditLastPrompt', () => {
|
|
783
|
+
test('postMessage type is EditLastPrompt (PascalCase)', async () => {
|
|
784
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
785
|
+
const { lb, iframe } = await renderLiveboard();
|
|
786
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
787
|
+
lb.trigger(index_1.HostEvent.EditLastPrompt, {});
|
|
788
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'EditLastPrompt' }), thoughtSpotHost, expect.anything());
|
|
789
|
+
});
|
|
790
|
+
});
|
|
791
|
+
test('returns null when !isRendered', async () => {
|
|
792
|
+
const lb = unrenderedLiveboard();
|
|
793
|
+
const result = await lb.trigger(index_1.HostEvent.EditLastPrompt, {});
|
|
794
|
+
expect(result).toBeNull();
|
|
795
|
+
});
|
|
796
|
+
});
|
|
797
|
+
// ---------------------------------------------------------------------------
|
|
798
|
+
// 67 – PreviewSpotterData
|
|
799
|
+
// ---------------------------------------------------------------------------
|
|
800
|
+
describe('HostEvent.PreviewSpotterData', () => {
|
|
801
|
+
test('postMessage type is PreviewSpotterData (PascalCase)', async () => {
|
|
802
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
803
|
+
const { lb, iframe } = await renderLiveboard();
|
|
804
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
805
|
+
lb.trigger(index_1.HostEvent.PreviewSpotterData, {});
|
|
806
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'PreviewSpotterData' }), thoughtSpotHost, expect.anything());
|
|
807
|
+
});
|
|
808
|
+
});
|
|
809
|
+
test('returns null when !isRendered', async () => {
|
|
810
|
+
const lb = unrenderedLiveboard();
|
|
811
|
+
const result = await lb.trigger(index_1.HostEvent.PreviewSpotterData, {});
|
|
812
|
+
expect(result).toBeNull();
|
|
813
|
+
});
|
|
814
|
+
});
|
|
815
|
+
// ---------------------------------------------------------------------------
|
|
816
|
+
// 68 – AddToCoaching
|
|
817
|
+
// ---------------------------------------------------------------------------
|
|
818
|
+
describe('HostEvent.AddToCoaching', () => {
|
|
819
|
+
test('postMessage type is addToCoaching (camelCase)', async () => {
|
|
820
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
821
|
+
const { lb, iframe } = await renderLiveboard();
|
|
822
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
823
|
+
lb.trigger(index_1.HostEvent.AddToCoaching, {});
|
|
824
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'addToCoaching' }), thoughtSpotHost, expect.anything());
|
|
825
|
+
});
|
|
826
|
+
});
|
|
827
|
+
test('returns null when !isRendered', async () => {
|
|
828
|
+
const lb = unrenderedLiveboard();
|
|
829
|
+
const result = await lb.trigger(index_1.HostEvent.AddToCoaching, {});
|
|
830
|
+
expect(result).toBeNull();
|
|
831
|
+
});
|
|
832
|
+
});
|
|
833
|
+
// ---------------------------------------------------------------------------
|
|
834
|
+
// 69 – DataModelInstructions
|
|
835
|
+
// ---------------------------------------------------------------------------
|
|
836
|
+
describe('HostEvent.DataModelInstructions', () => {
|
|
837
|
+
test('postMessage type is DataModelInstructions (PascalCase)', async () => {
|
|
838
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
839
|
+
const { lb, iframe } = await renderLiveboard();
|
|
840
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
841
|
+
lb.trigger(index_1.HostEvent.DataModelInstructions, {});
|
|
842
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'DataModelInstructions' }), thoughtSpotHost, expect.anything());
|
|
843
|
+
});
|
|
844
|
+
});
|
|
845
|
+
test('returns null when !isRendered', async () => {
|
|
846
|
+
const lb = unrenderedLiveboard();
|
|
847
|
+
const result = await lb.trigger(index_1.HostEvent.DataModelInstructions, {});
|
|
848
|
+
expect(result).toBeNull();
|
|
849
|
+
});
|
|
850
|
+
});
|
|
851
|
+
// ---------------------------------------------------------------------------
|
|
852
|
+
// 70 – ResetSpotterConversation
|
|
853
|
+
// ---------------------------------------------------------------------------
|
|
854
|
+
describe('HostEvent.ResetSpotterConversation', () => {
|
|
855
|
+
test('postMessage type is ResetSpotterConversation (PascalCase)', async () => {
|
|
856
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
857
|
+
const { lb, iframe } = await renderLiveboard();
|
|
858
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
859
|
+
lb.trigger(index_1.HostEvent.ResetSpotterConversation, {});
|
|
860
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'ResetSpotterConversation' }), thoughtSpotHost, expect.anything());
|
|
861
|
+
});
|
|
862
|
+
});
|
|
863
|
+
test('returns null when !isRendered', async () => {
|
|
864
|
+
const lb = unrenderedLiveboard();
|
|
865
|
+
const result = await lb.trigger(index_1.HostEvent.ResetSpotterConversation, {});
|
|
866
|
+
expect(result).toBeNull();
|
|
867
|
+
});
|
|
868
|
+
});
|
|
869
|
+
// ---------------------------------------------------------------------------
|
|
870
|
+
// 71 – DeleteLastPrompt
|
|
871
|
+
// ---------------------------------------------------------------------------
|
|
872
|
+
describe('HostEvent.DeleteLastPrompt', () => {
|
|
873
|
+
test('postMessage type is DeleteLastPrompt (PascalCase)', async () => {
|
|
874
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
875
|
+
const { lb, iframe } = await renderLiveboard();
|
|
876
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
877
|
+
lb.trigger(index_1.HostEvent.DeleteLastPrompt, {});
|
|
878
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'DeleteLastPrompt' }), thoughtSpotHost, expect.anything());
|
|
879
|
+
});
|
|
880
|
+
});
|
|
881
|
+
test('returns null when !isRendered', async () => {
|
|
882
|
+
const lb = unrenderedLiveboard();
|
|
883
|
+
const result = await lb.trigger(index_1.HostEvent.DeleteLastPrompt, {});
|
|
884
|
+
expect(result).toBeNull();
|
|
885
|
+
});
|
|
886
|
+
});
|
|
887
|
+
// ---------------------------------------------------------------------------
|
|
888
|
+
// 72 – AnswerChartSwitcher
|
|
889
|
+
// ---------------------------------------------------------------------------
|
|
890
|
+
describe('HostEvent.AnswerChartSwitcher', () => {
|
|
891
|
+
test('postMessage type is answerChartSwitcher (camelCase)', async () => {
|
|
892
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
893
|
+
const { lb, iframe } = await renderLiveboard();
|
|
894
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
895
|
+
lb.trigger(index_1.HostEvent.AnswerChartSwitcher, {});
|
|
896
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'answerChartSwitcher' }), thoughtSpotHost, expect.anything());
|
|
897
|
+
});
|
|
898
|
+
});
|
|
899
|
+
test('returns null when !isRendered', async () => {
|
|
900
|
+
const lb = unrenderedLiveboard();
|
|
901
|
+
const result = await lb.trigger(index_1.HostEvent.AnswerChartSwitcher, {});
|
|
902
|
+
expect(result).toBeNull();
|
|
903
|
+
});
|
|
904
|
+
});
|
|
905
|
+
// ---------------------------------------------------------------------------
|
|
906
|
+
// 75 – AskSpotter
|
|
907
|
+
// ---------------------------------------------------------------------------
|
|
908
|
+
describe('HostEvent.AskSpotter', () => {
|
|
909
|
+
test('postMessage type is AskSpotter (PascalCase)', async () => {
|
|
910
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
911
|
+
const { lb, iframe } = await renderLiveboard();
|
|
912
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
913
|
+
lb.trigger(index_1.HostEvent.AskSpotter, {});
|
|
914
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'AskSpotter' }), thoughtSpotHost, expect.anything());
|
|
915
|
+
});
|
|
916
|
+
});
|
|
917
|
+
test('returns null when !isRendered', async () => {
|
|
918
|
+
const lb = unrenderedLiveboard();
|
|
919
|
+
const result = await lb.trigger(index_1.HostEvent.AskSpotter, {});
|
|
920
|
+
expect(result).toBeNull();
|
|
921
|
+
});
|
|
922
|
+
});
|
|
923
|
+
// ---------------------------------------------------------------------------
|
|
924
|
+
// 78 – StartNewSpotterConversation
|
|
925
|
+
// ---------------------------------------------------------------------------
|
|
926
|
+
describe('HostEvent.StartNewSpotterConversation', () => {
|
|
927
|
+
test('postMessage type is StartNewSpotterConversation (PascalCase)', async () => {
|
|
928
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
929
|
+
const { lb, iframe } = await renderLiveboard();
|
|
930
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
931
|
+
lb.trigger(index_1.HostEvent.StartNewSpotterConversation, {});
|
|
932
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'StartNewSpotterConversation' }), thoughtSpotHost, expect.anything());
|
|
933
|
+
});
|
|
934
|
+
});
|
|
935
|
+
test('returns null when !isRendered', async () => {
|
|
936
|
+
const lb = unrenderedLiveboard();
|
|
937
|
+
const result = await lb.trigger(index_1.HostEvent.StartNewSpotterConversation, {});
|
|
938
|
+
expect(result).toBeNull();
|
|
939
|
+
});
|
|
940
|
+
});
|
|
941
|
+
// ---------------------------------------------------------------------------
|
|
942
|
+
// 80 – SendTestScheduleEmail
|
|
943
|
+
// ---------------------------------------------------------------------------
|
|
944
|
+
describe('HostEvent.SendTestScheduleEmail', () => {
|
|
945
|
+
test('postMessage type is sendTestScheduleEmail (camelCase)', async () => {
|
|
946
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
947
|
+
const { lb, iframe } = await renderLiveboard();
|
|
948
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
949
|
+
lb.trigger(index_1.HostEvent.SendTestScheduleEmail, {});
|
|
950
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'sendTestScheduleEmail' }), thoughtSpotHost, expect.anything());
|
|
951
|
+
});
|
|
952
|
+
});
|
|
953
|
+
test('returns null when !isRendered', async () => {
|
|
954
|
+
const lb = unrenderedLiveboard();
|
|
955
|
+
const result = await lb.trigger(index_1.HostEvent.SendTestScheduleEmail, {});
|
|
956
|
+
expect(result).toBeNull();
|
|
957
|
+
});
|
|
958
|
+
});
|
|
959
|
+
// ---------------------------------------------------------------------------
|
|
960
|
+
// 81 – SpotterVizSendUserMessage
|
|
961
|
+
// ---------------------------------------------------------------------------
|
|
962
|
+
describe('HostEvent.SpotterVizSendUserMessage', () => {
|
|
963
|
+
test('postMessage type is SpotterVizSendUserMessage (PascalCase)', async () => {
|
|
964
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
965
|
+
const { lb, iframe } = await renderLiveboard();
|
|
966
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
967
|
+
lb.trigger(index_1.HostEvent.SpotterVizSendUserMessage, {});
|
|
968
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'SpotterVizSendUserMessage' }), thoughtSpotHost, expect.anything());
|
|
969
|
+
});
|
|
970
|
+
});
|
|
971
|
+
test('returns null when !isRendered', async () => {
|
|
972
|
+
const lb = unrenderedLiveboard();
|
|
973
|
+
const result = await lb.trigger(index_1.HostEvent.SpotterVizSendUserMessage, {});
|
|
974
|
+
expect(result).toBeNull();
|
|
975
|
+
});
|
|
976
|
+
});
|
|
977
|
+
// ---------------------------------------------------------------------------
|
|
978
|
+
// 82 – InitSpotterVizConversation
|
|
979
|
+
// ---------------------------------------------------------------------------
|
|
980
|
+
describe('HostEvent.InitSpotterVizConversation', () => {
|
|
981
|
+
test('postMessage type is InitSpotterVizConversation (PascalCase)', async () => {
|
|
982
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
983
|
+
const { lb, iframe } = await renderLiveboard();
|
|
984
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
985
|
+
lb.trigger(index_1.HostEvent.InitSpotterVizConversation, {});
|
|
986
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'InitSpotterVizConversation' }), thoughtSpotHost, expect.anything());
|
|
987
|
+
});
|
|
988
|
+
});
|
|
989
|
+
test('returns null when !isRendered', async () => {
|
|
990
|
+
const lb = unrenderedLiveboard();
|
|
991
|
+
const result = await lb.trigger(index_1.HostEvent.InitSpotterVizConversation, {});
|
|
992
|
+
expect(result).toBeNull();
|
|
993
|
+
});
|
|
994
|
+
});
|
|
995
|
+
// ---------------------------------------------------------------------------
|
|
996
|
+
// 83 – RefreshLiveboardBrowserCache
|
|
997
|
+
// ---------------------------------------------------------------------------
|
|
998
|
+
describe('HostEvent.RefreshLiveboardBrowserCache', () => {
|
|
999
|
+
test('postMessage type is refreshLiveboardBrowserCache (camelCase)', async () => {
|
|
1000
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
1001
|
+
const { lb, iframe } = await renderLiveboard();
|
|
1002
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
1003
|
+
lb.trigger(index_1.HostEvent.RefreshLiveboardBrowserCache, {});
|
|
1004
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'refreshLiveboardBrowserCache' }), thoughtSpotHost, expect.anything());
|
|
1005
|
+
});
|
|
1006
|
+
});
|
|
1007
|
+
test('returns null when !isRendered', async () => {
|
|
1008
|
+
const lb = unrenderedLiveboard();
|
|
1009
|
+
const result = await lb.trigger(index_1.HostEvent.RefreshLiveboardBrowserCache, {});
|
|
1010
|
+
expect(result).toBeNull();
|
|
1011
|
+
});
|
|
1012
|
+
});
|
|
1013
|
+
// ---------------------------------------------------------------------------
|
|
1014
|
+
// vizId injection tests — verifies LiveboardEmbed injects viewConfig.vizId
|
|
1015
|
+
// ---------------------------------------------------------------------------
|
|
1016
|
+
describe('vizId injection on LiveboardEmbed trigger (object payload)', () => {
|
|
1017
|
+
const eventsWithVizId = [
|
|
1018
|
+
['Filter', index_1.HostEvent.Filter, { columnName: 'c' }],
|
|
1019
|
+
['OpenFilter', index_1.HostEvent.OpenFilter, { columnId: 'c1' }],
|
|
1020
|
+
['AddColumns', index_1.HostEvent.AddColumns, { columnIds: ['c1'] }],
|
|
1021
|
+
['RemoveColumn', index_1.HostEvent.RemoveColumn, { columnId: 'c1' }],
|
|
1022
|
+
['LiveboardInfo', index_1.HostEvent.LiveboardInfo, {}],
|
|
1023
|
+
['Schedule', index_1.HostEvent.Schedule, {}],
|
|
1024
|
+
['SchedulesList', index_1.HostEvent.SchedulesList, {}],
|
|
1025
|
+
['ExportTML', index_1.HostEvent.ExportTML, {}],
|
|
1026
|
+
['EditTML', index_1.HostEvent.EditTML, {}],
|
|
1027
|
+
['UpdateTML', index_1.HostEvent.UpdateTML, {}],
|
|
1028
|
+
['DownloadAsPdf', index_1.HostEvent.DownloadAsPdf, {}],
|
|
1029
|
+
['DownloadLiveboardAsContinuousPDF', index_1.HostEvent.DownloadLiveboardAsContinuousPDF, {}],
|
|
1030
|
+
['AIHighlights', index_1.HostEvent.AIHighlights, {}],
|
|
1031
|
+
['MakeACopy', index_1.HostEvent.MakeACopy, {}],
|
|
1032
|
+
['Remove', index_1.HostEvent.Remove, {}],
|
|
1033
|
+
['Explore', index_1.HostEvent.Explore, {}],
|
|
1034
|
+
['CreateMonitor', index_1.HostEvent.CreateMonitor, {}],
|
|
1035
|
+
['ManageMonitor', index_1.HostEvent.ManageMonitor, {}],
|
|
1036
|
+
['Edit', index_1.HostEvent.Edit, {}],
|
|
1037
|
+
['CopyLink', index_1.HostEvent.CopyLink, {}],
|
|
1038
|
+
['ShowUnderlyingData', index_1.HostEvent.ShowUnderlyingData, {}],
|
|
1039
|
+
['Delete', index_1.HostEvent.Delete, {}],
|
|
1040
|
+
['SpotIQAnalyze', index_1.HostEvent.SpotIQAnalyze, {}],
|
|
1041
|
+
['Download', index_1.HostEvent.Download, {}],
|
|
1042
|
+
['DownloadAsPng', index_1.HostEvent.DownloadAsPng, {}],
|
|
1043
|
+
['DownloadAsXlsx', index_1.HostEvent.DownloadAsXlsx, {}],
|
|
1044
|
+
['Share', index_1.HostEvent.Share, {}],
|
|
1045
|
+
['SyncToSheets', index_1.HostEvent.SyncToSheets, {}],
|
|
1046
|
+
['SyncToOtherApps', index_1.HostEvent.SyncToOtherApps, {}],
|
|
1047
|
+
['ManagePipelines', index_1.HostEvent.ManagePipelines, {}],
|
|
1048
|
+
['SelectPersonalizedView', index_1.HostEvent.SelectPersonalizedView, {}],
|
|
1049
|
+
['UpdateCrossFilter', index_1.HostEvent.UpdateCrossFilter, {}],
|
|
1050
|
+
['UpdateParameters', index_1.HostEvent.UpdateParameters, {}],
|
|
1051
|
+
['TransformTableVizData', index_1.HostEvent.TransformTableVizData, {}],
|
|
1052
|
+
['PreviewSpotterData', index_1.HostEvent.PreviewSpotterData, {}],
|
|
1053
|
+
['AnswerChartSwitcher', index_1.HostEvent.AnswerChartSwitcher, {}],
|
|
1054
|
+
];
|
|
1055
|
+
test.each(eventsWithVizId)('%s: viewConfig.vizId is injected into the payload as data.vizId', async (name, event, payload) => {
|
|
1056
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
1057
|
+
const { lb, iframe } = await renderLiveboard({ vizId });
|
|
1058
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
1059
|
+
lb.trigger(event, payload);
|
|
1060
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({
|
|
1061
|
+
data: expect.objectContaining({ vizId }),
|
|
1062
|
+
}), thoughtSpotHost, expect.anything());
|
|
1063
|
+
});
|
|
1064
|
+
});
|
|
1065
|
+
});
|
|
1066
|
+
// ---------------------------------------------------------------------------
|
|
1067
|
+
// Array payload vizId injection — vizId added as a non-indexed property on the
|
|
1068
|
+
// array object (array.length remains unchanged)
|
|
1069
|
+
// ---------------------------------------------------------------------------
|
|
1070
|
+
describe('vizId injection on LiveboardEmbed trigger (array payload)', () => {
|
|
1071
|
+
const arrayEvents = [
|
|
1072
|
+
['UpdateRuntimeFilters', index_1.HostEvent.UpdateRuntimeFilters],
|
|
1073
|
+
['SetVisibleTabs', index_1.HostEvent.SetVisibleTabs],
|
|
1074
|
+
['SetHiddenTabs', index_1.HostEvent.SetHiddenTabs],
|
|
1075
|
+
];
|
|
1076
|
+
test.each(arrayEvents)('%s: vizId is added as a non-indexed property on the array — array.length unchanged', async (name, event) => {
|
|
1077
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
1078
|
+
const { lb, iframe } = await renderLiveboard({ vizId });
|
|
1079
|
+
const arrayPayload = ['item1', 'item2'];
|
|
1080
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
1081
|
+
lb.trigger(event, arrayPayload);
|
|
1082
|
+
const call = iframe.contentWindow.postMessage.mock.calls[0];
|
|
1083
|
+
const sentData = call[0].data;
|
|
1084
|
+
// vizId is set as a property directly on the array object
|
|
1085
|
+
expect(sentData.vizId).toBe(vizId);
|
|
1086
|
+
// array.length is unchanged
|
|
1087
|
+
expect(sentData.length).toBe(2);
|
|
1088
|
+
});
|
|
1089
|
+
});
|
|
1090
|
+
test.each(arrayEvents)('%s: without viewConfig.vizId — array payload is sent as-is (no vizId property)', async (name, event) => {
|
|
1091
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
1092
|
+
const { lb, iframe } = await renderLiveboard(); // no vizId
|
|
1093
|
+
const arrayPayload = ['item1'];
|
|
1094
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
1095
|
+
lb.trigger(event, arrayPayload);
|
|
1096
|
+
const call = iframe.contentWindow.postMessage.mock.calls[0];
|
|
1097
|
+
const sentData = call[0].data;
|
|
1098
|
+
expect(sentData.vizId).toBeUndefined();
|
|
1099
|
+
});
|
|
1100
|
+
});
|
|
1101
|
+
});
|
|
1102
|
+
// ---------------------------------------------------------------------------
|
|
1103
|
+
// UpdateRuntimeFilters — without vizId, array payload sent as-is
|
|
1104
|
+
// ---------------------------------------------------------------------------
|
|
1105
|
+
describe('HostEvent.UpdateRuntimeFilters — additional cases', () => {
|
|
1106
|
+
test('without viewConfig.vizId — RuntimeFilter array payload sent as-is', async () => {
|
|
1107
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
1108
|
+
const { lb, iframe } = await renderLiveboard(); // no vizId
|
|
1109
|
+
const filters = [{ columnName: 'col', operator: 'EQ', values: ['v1'] }];
|
|
1110
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
1111
|
+
lb.trigger(index_1.HostEvent.UpdateRuntimeFilters, filters);
|
|
1112
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'UpdateRuntimeFilters' }), thoughtSpotHost, expect.anything());
|
|
1113
|
+
});
|
|
1114
|
+
});
|
|
1115
|
+
});
|
|
1116
|
+
// ---------------------------------------------------------------------------
|
|
1117
|
+
// iframe MessageChannel response resolves the trigger promise
|
|
1118
|
+
// ---------------------------------------------------------------------------
|
|
1119
|
+
describe('trigger promise resolves with iframe response', () => {
|
|
1120
|
+
const responseEvents = [
|
|
1121
|
+
['AddColumns', index_1.HostEvent.AddColumns, { columnIds: ['c1'] }],
|
|
1122
|
+
['RemoveColumn', index_1.HostEvent.RemoveColumn, { columnId: 'c1' }],
|
|
1123
|
+
['UpdateTML', index_1.HostEvent.UpdateTML, {}],
|
|
1124
|
+
['AIHighlights', index_1.HostEvent.AIHighlights, {}],
|
|
1125
|
+
['AskSage', index_1.HostEvent.AskSage, {}],
|
|
1126
|
+
['AskSpotter', index_1.HostEvent.AskSpotter, {}],
|
|
1127
|
+
['TransformTableVizData', index_1.HostEvent.TransformTableVizData, {}],
|
|
1128
|
+
['SpotterSearch', index_1.HostEvent.SpotterSearch, {}],
|
|
1129
|
+
];
|
|
1130
|
+
test.each(responseEvents)('%s: trigger promise resolves with the full responseData from iframe', async (name, event, payload) => {
|
|
1131
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
1132
|
+
const { lb } = await renderLiveboard();
|
|
1133
|
+
const responseData = { test: 'data-from-iframe' };
|
|
1134
|
+
// Start the trigger (which internally posts to the MessageChannel)
|
|
1135
|
+
const triggerPromise = lb.trigger(event, payload);
|
|
1136
|
+
// Simulate the iframe responding via port1
|
|
1137
|
+
test_utils_1.messageChannelMock.port1.onmessage({ data: responseData });
|
|
1138
|
+
const result = await triggerPromise;
|
|
1139
|
+
expect(result).toEqual(responseData);
|
|
1140
|
+
});
|
|
1141
|
+
});
|
|
1142
|
+
// ---------------------------------------------------------------------------
|
|
1143
|
+
// Context parameter forwarding
|
|
1144
|
+
// ---------------------------------------------------------------------------
|
|
1145
|
+
describe('context parameter forwarded in postMessage payload', () => {
|
|
1146
|
+
test('ExportTML: context is forwarded as context field in postMessage', async () => {
|
|
1147
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
1148
|
+
const { lb, iframe } = await renderLiveboard();
|
|
1149
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
1150
|
+
lb.trigger(index_1.HostEvent.ExportTML, {}, 'Liveboard');
|
|
1151
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ context: 'Liveboard' }), thoughtSpotHost, expect.anything());
|
|
1152
|
+
});
|
|
1153
|
+
});
|
|
1154
|
+
test('EditTML: context is forwarded as context field in postMessage', async () => {
|
|
1155
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
1156
|
+
const { lb, iframe } = await renderLiveboard();
|
|
1157
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
1158
|
+
lb.trigger(index_1.HostEvent.EditTML, {}, 'Search');
|
|
1159
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ context: 'Search' }), thoughtSpotHost, expect.anything());
|
|
1160
|
+
});
|
|
1161
|
+
});
|
|
1162
|
+
test('DownloadAsPdf: context is forwarded as context field in postMessage', async () => {
|
|
1163
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
1164
|
+
const { lb, iframe } = await renderLiveboard();
|
|
1165
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
1166
|
+
lb.trigger(index_1.HostEvent.DownloadAsPdf, {}, 'Liveboard');
|
|
1167
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ context: 'Liveboard' }), thoughtSpotHost, expect.anything());
|
|
1168
|
+
});
|
|
1169
|
+
});
|
|
1170
|
+
test('MakeACopy: context is forwarded as context field in postMessage', async () => {
|
|
1171
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
1172
|
+
const { lb, iframe } = await renderLiveboard();
|
|
1173
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
1174
|
+
lb.trigger(index_1.HostEvent.MakeACopy, {}, 'Answer');
|
|
1175
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ context: 'Answer' }), thoughtSpotHost, expect.anything());
|
|
1176
|
+
});
|
|
1177
|
+
});
|
|
1178
|
+
test('CreateMonitor: context is forwarded as context field in postMessage', async () => {
|
|
1179
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
1180
|
+
const { lb, iframe } = await renderLiveboard();
|
|
1181
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
1182
|
+
lb.trigger(index_1.HostEvent.CreateMonitor, {}, 'Liveboard');
|
|
1183
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ context: 'Liveboard' }), thoughtSpotHost, expect.anything());
|
|
1184
|
+
});
|
|
1185
|
+
});
|
|
1186
|
+
test('ShowUnderlyingData: context is forwarded as context field in postMessage', async () => {
|
|
1187
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
1188
|
+
const { lb, iframe } = await renderLiveboard();
|
|
1189
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
1190
|
+
lb.trigger(index_1.HostEvent.ShowUnderlyingData, {}, 'Liveboard');
|
|
1191
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ context: 'Liveboard' }), thoughtSpotHost, expect.anything());
|
|
1192
|
+
});
|
|
1193
|
+
});
|
|
1194
|
+
test('SpotIQAnalyze: context is forwarded as context field in postMessage', async () => {
|
|
1195
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
1196
|
+
const { lb, iframe } = await renderLiveboard();
|
|
1197
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
1198
|
+
lb.trigger(index_1.HostEvent.SpotIQAnalyze, {}, 'Answer');
|
|
1199
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ context: 'Answer' }), thoughtSpotHost, expect.anything());
|
|
1200
|
+
});
|
|
1201
|
+
});
|
|
1202
|
+
test('Edit: context is forwarded as context field in postMessage', async () => {
|
|
1203
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
1204
|
+
const { lb, iframe } = await renderLiveboard();
|
|
1205
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
1206
|
+
lb.trigger(index_1.HostEvent.Edit, {}, 'Liveboard');
|
|
1207
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ context: 'Liveboard' }), thoughtSpotHost, expect.anything());
|
|
1208
|
+
});
|
|
1209
|
+
});
|
|
1210
|
+
test('CopyLink: context is forwarded as context field in postMessage', async () => {
|
|
1211
|
+
(0, test_utils_1.mockMessageChannel)();
|
|
1212
|
+
const { lb, iframe } = await renderLiveboard();
|
|
1213
|
+
await (0, test_utils_1.executeAfterWait)(() => {
|
|
1214
|
+
lb.trigger(index_1.HostEvent.CopyLink, {}, 'Liveboard');
|
|
1215
|
+
expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({ context: 'Liveboard' }), thoughtSpotHost, expect.anything());
|
|
1216
|
+
});
|
|
1217
|
+
});
|
|
1218
|
+
});
|
|
1219
|
+
//# sourceMappingURL=host-events.spec.js.map
|