@thoughtspot/visual-embed-sdk 1.50.1 → 1.51.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 +1 -1
- package/cjs/src/css-variables.d.ts +36 -0
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +106 -14
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +47 -36
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +318 -149
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +204 -1
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +19 -15
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +198 -17
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/events.spec.js +42 -0
- package/cjs/src/embed/events.spec.js.map +1 -1
- package/cjs/src/embed/host-events.spec.js +45 -0
- package/cjs/src/embed/host-events.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts +15 -0
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.js +1 -0
- package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +1 -0
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js +9 -0
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +36 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +26 -6
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +83 -2
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/spotter-utils.d.ts +8 -1
- package/cjs/src/embed/spotter-utils.d.ts.map +1 -1
- package/cjs/src/embed/spotter-utils.js +14 -1
- package/cjs/src/embed/spotter-utils.js.map +1 -1
- package/cjs/src/embed/spotter-utils.spec.js +61 -0
- package/cjs/src/embed/spotter-utils.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +15 -0
- package/cjs/src/embed/ts-embed.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.d.ts +4 -0
- package/cjs/src/mixpanel-service.d.ts.map +1 -1
- package/cjs/src/mixpanel-service.js +4 -0
- package/cjs/src/mixpanel-service.js.map +1 -1
- package/cjs/src/types.d.ts +460 -15
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +428 -8
- package/cjs/src/types.js.map +1 -1
- package/dist/{index-fCne7kmU.js → index-aBzH5ZwF.js} +1 -1
- package/dist/src/css-variables.d.ts +36 -0
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +106 -14
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +204 -1
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts +15 -0
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +36 -1
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/spotter-utils.d.ts +8 -1
- package/dist/src/embed/spotter-utils.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.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/mixpanel-service.d.ts +4 -0
- package/dist/src/mixpanel-service.d.ts.map +1 -1
- package/dist/src/types.d.ts +460 -15
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +558 -69
- package/dist/tsembed-react.js +557 -68
- package/dist/tsembed.es.js +556 -68
- package/dist/tsembed.js +555 -67
- package/dist/visual-embed-sdk-react-full.d.ts +845 -27
- package/dist/visual-embed-sdk-react.d.ts +851 -29
- package/dist/visual-embed-sdk.d.ts +855 -29
- package/lib/package.json +1 -1
- package/lib/src/css-variables.d.ts +36 -0
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +106 -14
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +48 -37
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +319 -150
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +204 -1
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +21 -17
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +198 -17
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/events.spec.js +42 -0
- package/lib/src/embed/events.spec.js.map +1 -1
- package/lib/src/embed/host-events.spec.js +45 -0
- package/lib/src/embed/host-events.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +15 -0
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.js +1 -0
- package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +1 -0
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js +9 -0
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +36 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +26 -6
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +83 -2
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/spotter-utils.d.ts +8 -1
- package/lib/src/embed/spotter-utils.d.ts.map +1 -1
- package/lib/src/embed/spotter-utils.js +12 -0
- package/lib/src/embed/spotter-utils.js.map +1 -1
- package/lib/src/embed/spotter-utils.spec.js +62 -1
- package/lib/src/embed/spotter-utils.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +15 -0
- package/lib/src/embed/ts-embed.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.d.ts +4 -0
- package/lib/src/mixpanel-service.d.ts.map +1 -1
- package/lib/src/mixpanel-service.js +4 -0
- package/lib/src/mixpanel-service.js.map +1 -1
- package/lib/src/types.d.ts +460 -15
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +428 -8
- package/lib/src/types.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +855 -29
- package/package.json +1 -1
- package/src/css-variables.ts +45 -0
- package/src/embed/app.spec.ts +390 -183
- package/src/embed/app.ts +172 -65
- package/src/embed/conversation.spec.ts +243 -20
- package/src/embed/conversation.ts +233 -17
- package/src/embed/events.spec.ts +52 -0
- package/src/embed/host-events.spec.ts +70 -0
- package/src/embed/hostEventClient/contracts.ts +16 -0
- package/src/embed/hostEventClient/host-event-client.spec.ts +12 -0
- package/src/embed/hostEventClient/host-event-client.ts +1 -0
- package/src/embed/liveboard.spec.ts +108 -2
- package/src/embed/liveboard.ts +76 -14
- package/src/embed/spotter-utils.spec.ts +68 -1
- package/src/embed/spotter-utils.ts +16 -1
- package/src/embed/ts-embed.ts +18 -0
- package/src/index.ts +2 -1
- package/src/mixpanel-service.ts +4 -0
- package/src/types.ts +462 -14
package/src/embed/app.spec.ts
CHANGED
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
DataPanelCustomColumnGroupsAccordionState,
|
|
5
5
|
Page,
|
|
6
6
|
HomePageSearchBarMode,
|
|
7
|
-
PrimaryNavbarVersion,
|
|
8
7
|
HomePage,
|
|
9
8
|
ListPage,
|
|
10
9
|
} from './app';
|
|
@@ -139,7 +138,7 @@ describe('App embed tests', () => {
|
|
|
139
138
|
await executeAfterWait(() => {
|
|
140
139
|
expectUrlMatchesWithParams(
|
|
141
140
|
getIFrameSrc(),
|
|
142
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/home`,
|
|
141
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
143
142
|
);
|
|
144
143
|
});
|
|
145
144
|
});
|
|
@@ -153,7 +152,7 @@ describe('App embed tests', () => {
|
|
|
153
152
|
await executeAfterWait(() => {
|
|
154
153
|
expectUrlMatchesWithParams(
|
|
155
154
|
getIFrameSrc(),
|
|
156
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/home`,
|
|
155
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
157
156
|
);
|
|
158
157
|
});
|
|
159
158
|
});
|
|
@@ -167,7 +166,7 @@ describe('App embed tests', () => {
|
|
|
167
166
|
await executeAfterWait(() => {
|
|
168
167
|
expectUrlMatchesWithParams(
|
|
169
168
|
getIFrameSrc(),
|
|
170
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=true${defaultParams}${defaultParamsPost}#/home`,
|
|
169
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
171
170
|
);
|
|
172
171
|
});
|
|
173
172
|
});
|
|
@@ -181,7 +180,7 @@ describe('App embed tests', () => {
|
|
|
181
180
|
await executeAfterWait(() => {
|
|
182
181
|
expectUrlMatchesWithParams(
|
|
183
182
|
getIFrameSrc(),
|
|
184
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&applicationSwitcherHidden=true${defaultParams}${defaultParamsPost}#/home`,
|
|
183
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&applicationSwitcherHidden=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
185
184
|
);
|
|
186
185
|
});
|
|
187
186
|
});
|
|
@@ -195,7 +194,7 @@ describe('App embed tests', () => {
|
|
|
195
194
|
await executeAfterWait(() => {
|
|
196
195
|
expectUrlMatchesWithParams(
|
|
197
196
|
getIFrameSrc(),
|
|
198
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&orgSwitcherHidden=true${defaultParams}${defaultParamsPost}#/home`,
|
|
197
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&orgSwitcherHidden=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
199
198
|
);
|
|
200
199
|
});
|
|
201
200
|
});
|
|
@@ -229,7 +228,7 @@ describe('App embed tests', () => {
|
|
|
229
228
|
await executeAfterWait(() => {
|
|
230
229
|
expectUrlMatchesWithParams(
|
|
231
230
|
getIFrameSrc(),
|
|
232
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/${route}`,
|
|
231
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/${route}`,
|
|
233
232
|
);
|
|
234
233
|
cleanUp();
|
|
235
234
|
});
|
|
@@ -264,7 +263,7 @@ describe('App embed tests', () => {
|
|
|
264
263
|
await executeAfterWait(() => {
|
|
265
264
|
expectUrlMatchesWithParams(
|
|
266
265
|
getIFrameSrc(),
|
|
267
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/${route}`,
|
|
266
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/${route}`,
|
|
268
267
|
);
|
|
269
268
|
cleanUp();
|
|
270
269
|
});
|
|
@@ -281,7 +280,7 @@ describe('App embed tests', () => {
|
|
|
281
280
|
await executeAfterWait(() => {
|
|
282
281
|
expectUrlMatchesWithParams(
|
|
283
282
|
getIFrameSrc(),
|
|
284
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/foo/bar`,
|
|
283
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/foo/bar`,
|
|
285
284
|
);
|
|
286
285
|
});
|
|
287
286
|
});
|
|
@@ -304,7 +303,7 @@ describe('App embed tests', () => {
|
|
|
304
303
|
await executeAfterWait(() => {
|
|
305
304
|
expectUrlMatchesWithParams(
|
|
306
305
|
getIFrameSrc(),
|
|
307
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false&col1=sales&op1=EQ&val1=1000${defaultParams}${defaultParamsPost}#/home`,
|
|
306
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false&col1=sales&op1=EQ&val1=1000&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
308
307
|
);
|
|
309
308
|
});
|
|
310
309
|
});
|
|
@@ -327,7 +326,7 @@ describe('App embed tests', () => {
|
|
|
327
326
|
await executeAfterWait(() => {
|
|
328
327
|
expectUrlMatchesWithParams(
|
|
329
328
|
getIFrameSrc(),
|
|
330
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/home`,
|
|
329
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
331
330
|
);
|
|
332
331
|
});
|
|
333
332
|
});
|
|
@@ -351,7 +350,7 @@ describe('App embed tests', () => {
|
|
|
351
350
|
await executeAfterWait(() => {
|
|
352
351
|
expectUrlMatchesWithParams(
|
|
353
352
|
getIFrameSrc(),
|
|
354
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}&${runtimeFilter}#/home`,
|
|
353
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}&${runtimeFilter}#/home`,
|
|
355
354
|
);
|
|
356
355
|
});
|
|
357
356
|
});
|
|
@@ -369,7 +368,7 @@ describe('App embed tests', () => {
|
|
|
369
368
|
await executeAfterWait(() => {
|
|
370
369
|
expectUrlMatchesWithParams(
|
|
371
370
|
getIFrameSrc(),
|
|
372
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false&${defaultParamsWithoutHiddenActions}&disableAction=[%22save%22,%22update%22]&disableHint=Access%20denied&hideAction=[%22${Action.ReportError}%22,%22download%22]${defaultParamsPost}#/home`,
|
|
371
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3&${defaultParamsWithoutHiddenActions}&disableAction=[%22save%22,%22update%22]&disableHint=Access%20denied&hideAction=[%22${Action.ReportError}%22,%22download%22]${defaultParamsPost}#/home`,
|
|
373
372
|
);
|
|
374
373
|
});
|
|
375
374
|
});
|
|
@@ -384,7 +383,7 @@ describe('App embed tests', () => {
|
|
|
384
383
|
await executeAfterWait(() => {
|
|
385
384
|
expectUrlMatchesWithParams(
|
|
386
385
|
getIFrameSrc(),
|
|
387
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enable2ColumnLayout=true${defaultParamsPost}#/home`,
|
|
386
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enable2ColumnLayout=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
388
387
|
);
|
|
389
388
|
});
|
|
390
389
|
});
|
|
@@ -398,7 +397,7 @@ describe('App embed tests', () => {
|
|
|
398
397
|
await executeAfterWait(() => {
|
|
399
398
|
expectUrlMatchesWithParams(
|
|
400
399
|
getIFrameSrc(),
|
|
401
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&arePdfCoverFilterPageCheckboxesEnabled=false${defaultParamsPost}#/home`,
|
|
400
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&arePdfCoverFilterPageCheckboxesEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
402
401
|
);
|
|
403
402
|
});
|
|
404
403
|
});
|
|
@@ -412,7 +411,7 @@ describe('App embed tests', () => {
|
|
|
412
411
|
await executeAfterWait(() => {
|
|
413
412
|
expectUrlMatchesWithParams(
|
|
414
413
|
getIFrameSrc(),
|
|
415
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardStylingAndGroupingEnabled=true${defaultParamsPost}#/home`,
|
|
414
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardStylingAndGroupingEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
416
415
|
);
|
|
417
416
|
});
|
|
418
417
|
});
|
|
@@ -426,7 +425,7 @@ describe('App embed tests', () => {
|
|
|
426
425
|
await executeAfterWait(() => {
|
|
427
426
|
expectUrlMatchesWithParams(
|
|
428
427
|
getIFrameSrc(),
|
|
429
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isThisPeriodInDateFiltersEnabled=true${defaultParamsPost}#/home`,
|
|
428
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isThisPeriodInDateFiltersEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
430
429
|
);
|
|
431
430
|
});
|
|
432
431
|
});
|
|
@@ -440,7 +439,7 @@ describe('App embed tests', () => {
|
|
|
440
439
|
await executeAfterWait(() => {
|
|
441
440
|
expectUrlMatchesWithParams(
|
|
442
441
|
getIFrameSrc(),
|
|
443
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableHomepageAnnouncement=true${defaultParamsPost}#/home`,
|
|
442
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableHomepageAnnouncement=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
444
443
|
);
|
|
445
444
|
});
|
|
446
445
|
});
|
|
@@ -451,7 +450,7 @@ describe('App embed tests', () => {
|
|
|
451
450
|
await executeAfterWait(() => {
|
|
452
451
|
expectUrlMatchesWithParams(
|
|
453
452
|
getIFrameSrc(),
|
|
454
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableHomepageAnnouncement=false${defaultParamsPost}#/home`,
|
|
453
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableHomepageAnnouncement=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
455
454
|
);
|
|
456
455
|
});
|
|
457
456
|
});
|
|
@@ -465,7 +464,7 @@ describe('App embed tests', () => {
|
|
|
465
464
|
await executeAfterWait(() => {
|
|
466
465
|
expectUrlMatchesWithParams(
|
|
467
466
|
getIFrameSrc(),
|
|
468
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isPNGInScheduledEmailsEnabled=true${defaultParamsPost}#/home`,
|
|
467
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isPNGInScheduledEmailsEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
469
468
|
);
|
|
470
469
|
});
|
|
471
470
|
});
|
|
@@ -479,12 +478,12 @@ describe('App embed tests', () => {
|
|
|
479
478
|
await executeAfterWait(() => {
|
|
480
479
|
expectUrlMatchesWithParams(
|
|
481
480
|
getIFrameSrc(),
|
|
482
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isWYSIWYGLiveboardPDFEnabled=true${defaultParamsPost}#/home`,
|
|
481
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isWYSIWYGLiveboardPDFEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
483
482
|
);
|
|
484
483
|
});
|
|
485
484
|
});
|
|
486
485
|
|
|
487
|
-
test('should
|
|
486
|
+
test('should not set isWYSIWYGLiveboardPDFEnabled in url by default', async () => {
|
|
488
487
|
const appEmbed = new AppEmbed(getRootEl(), {
|
|
489
488
|
...defaultViewConfig,
|
|
490
489
|
} as AppViewConfig);
|
|
@@ -492,7 +491,7 @@ describe('App embed tests', () => {
|
|
|
492
491
|
await executeAfterWait(() => {
|
|
493
492
|
expectUrlMatchesWithParams(
|
|
494
493
|
getIFrameSrc(),
|
|
495
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&
|
|
494
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
496
495
|
);
|
|
497
496
|
});
|
|
498
497
|
});
|
|
@@ -506,7 +505,7 @@ describe('App embed tests', () => {
|
|
|
506
505
|
await executeAfterWait(() => {
|
|
507
506
|
expectUrlMatchesWithParams(
|
|
508
507
|
getIFrameSrc(),
|
|
509
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLinkParametersEnabled=true${defaultParamsPost}#/home`,
|
|
508
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLinkParametersEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
510
509
|
);
|
|
511
510
|
});
|
|
512
511
|
});
|
|
@@ -520,7 +519,7 @@ describe('App embed tests', () => {
|
|
|
520
519
|
await executeAfterWait(() => {
|
|
521
520
|
expectUrlMatchesWithParams(
|
|
522
521
|
getIFrameSrc(),
|
|
523
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLinkParametersEnabled=false${defaultParamsPost}#/home`,
|
|
522
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLinkParametersEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
524
523
|
);
|
|
525
524
|
});
|
|
526
525
|
});
|
|
@@ -533,7 +532,7 @@ describe('App embed tests', () => {
|
|
|
533
532
|
homePage: HomePage.Focused,
|
|
534
533
|
},
|
|
535
534
|
} as AppViewConfig,
|
|
536
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
535
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v4&updatedSpotterChatPrompt=true${defaultParams}${defaultParamsPost}#/home`,
|
|
537
536
|
);
|
|
538
537
|
});
|
|
539
538
|
|
|
@@ -546,7 +545,7 @@ describe('App embed tests', () => {
|
|
|
546
545
|
},
|
|
547
546
|
updatedSpotterChatPrompt: false,
|
|
548
547
|
} as AppViewConfig,
|
|
549
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
548
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v4&updatedSpotterChatPrompt=false${defaultParams}${defaultParamsPost}#/home`,
|
|
550
549
|
);
|
|
551
550
|
});
|
|
552
551
|
|
|
@@ -559,7 +558,7 @@ describe('App embed tests', () => {
|
|
|
559
558
|
await executeAfterWait(() => {
|
|
560
559
|
expectUrlMatchesWithParams(
|
|
561
560
|
getIFrameSrc(),
|
|
562
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardXLSXCSVDownloadEnabled=true${defaultParamsPost}#/home`,
|
|
561
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardXLSXCSVDownloadEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
563
562
|
);
|
|
564
563
|
});
|
|
565
564
|
});
|
|
@@ -573,7 +572,7 @@ describe('App embed tests', () => {
|
|
|
573
572
|
await executeAfterWait(() => {
|
|
574
573
|
expectUrlMatchesWithParams(
|
|
575
574
|
getIFrameSrc(),
|
|
576
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&updatedSpotterChatPrompt=true${defaultParamsPost}#/home`,
|
|
575
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&updatedSpotterChatPrompt=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
577
576
|
);
|
|
578
577
|
});
|
|
579
578
|
});
|
|
@@ -587,7 +586,35 @@ describe('App embed tests', () => {
|
|
|
587
586
|
await executeAfterWait(() => {
|
|
588
587
|
expectUrlMatchesWithParams(
|
|
589
588
|
getIFrameSrc(),
|
|
590
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&updatedSpotterChatPrompt=false${defaultParamsPost}#/home`,
|
|
589
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&updatedSpotterChatPrompt=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
590
|
+
);
|
|
591
|
+
});
|
|
592
|
+
});
|
|
593
|
+
|
|
594
|
+
test('should set showSpotterRadiance to true in url', async () => {
|
|
595
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
596
|
+
...defaultViewConfig,
|
|
597
|
+
showSpotterRadiance: true,
|
|
598
|
+
} as AppViewConfig);
|
|
599
|
+
appEmbed.render();
|
|
600
|
+
await executeAfterWait(() => {
|
|
601
|
+
expectUrlMatchesWithParams(
|
|
602
|
+
getIFrameSrc(),
|
|
603
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&showSpotterRadiance=true${defaultParamsPost}#/home`,
|
|
604
|
+
);
|
|
605
|
+
});
|
|
606
|
+
});
|
|
607
|
+
|
|
608
|
+
test('should set showSpotterRadiance to false in url', async () => {
|
|
609
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
610
|
+
...defaultViewConfig,
|
|
611
|
+
showSpotterRadiance: false,
|
|
612
|
+
} as AppViewConfig);
|
|
613
|
+
appEmbed.render();
|
|
614
|
+
await executeAfterWait(() => {
|
|
615
|
+
expectUrlMatchesWithParams(
|
|
616
|
+
getIFrameSrc(),
|
|
617
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&showSpotterRadiance=false${defaultParamsPost}#/home`,
|
|
591
618
|
);
|
|
592
619
|
});
|
|
593
620
|
});
|
|
@@ -630,11 +657,46 @@ describe('App embed tests', () => {
|
|
|
630
657
|
await executeAfterWait(() => {
|
|
631
658
|
expectUrlMatchesWithParams(
|
|
632
659
|
getIFrameSrc(),
|
|
633
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&hideToolResponseCardBranding=true${defaultParamsPost}#/home`,
|
|
660
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&hideToolResponseCardBranding=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
661
|
+
);
|
|
662
|
+
});
|
|
663
|
+
});
|
|
664
|
+
|
|
665
|
+
test('should set spotterDataSources to a list of Model GUIDs in url', async () => {
|
|
666
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
667
|
+
...defaultViewConfig,
|
|
668
|
+
spotterDataSources: ['model-guid-123', 'model-guid-456'],
|
|
669
|
+
} as AppViewConfig);
|
|
670
|
+
appEmbed.render();
|
|
671
|
+
await executeAfterWait(() => {
|
|
672
|
+
expectUrlMatchesWithParams(
|
|
673
|
+
getIFrameSrc(),
|
|
674
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&spotterDataSources=${encodeURIComponent(JSON.stringify(['model-guid-123', 'model-guid-456']))}${defaultParamsPost}#/home`,
|
|
634
675
|
);
|
|
635
676
|
});
|
|
636
677
|
});
|
|
637
678
|
|
|
679
|
+
test('should not add spotterDataSources to url when not provided', async () => {
|
|
680
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
681
|
+
...defaultViewConfig,
|
|
682
|
+
} as AppViewConfig);
|
|
683
|
+
appEmbed.render();
|
|
684
|
+
await executeAfterWait(() => {
|
|
685
|
+
expect(getIFrameSrc()).not.toContain('spotterDataSources');
|
|
686
|
+
});
|
|
687
|
+
});
|
|
688
|
+
|
|
689
|
+
test('should not add spotterDataSources to url when empty array', async () => {
|
|
690
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
691
|
+
...defaultViewConfig,
|
|
692
|
+
spotterDataSources: [],
|
|
693
|
+
} as AppViewConfig);
|
|
694
|
+
appEmbed.render();
|
|
695
|
+
await executeAfterWait(() => {
|
|
696
|
+
expect(getIFrameSrc()).not.toContain('spotterDataSources');
|
|
697
|
+
});
|
|
698
|
+
});
|
|
699
|
+
|
|
638
700
|
test('should include spotterVizConfig in APP_INIT embedParams when spotterViz is provided', async () => {
|
|
639
701
|
const spotterViz = {
|
|
640
702
|
brandName: 'MyBrand',
|
|
@@ -770,6 +832,104 @@ describe('App embed tests', () => {
|
|
|
770
832
|
});
|
|
771
833
|
});
|
|
772
834
|
|
|
835
|
+
test('should forward spotterChatPinConfig nested in spotterSidebarConfig in APP_INIT', async () => {
|
|
836
|
+
const spotterChatPinConfig = {
|
|
837
|
+
enabled: true,
|
|
838
|
+
pinLabel: 'Pin to top',
|
|
839
|
+
unpinLabel: 'Unpin',
|
|
840
|
+
};
|
|
841
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
842
|
+
...defaultViewConfig,
|
|
843
|
+
spotterSidebarConfig: {
|
|
844
|
+
enablePastConversationsSidebar: true,
|
|
845
|
+
spotterChatPinConfig,
|
|
846
|
+
},
|
|
847
|
+
} as AppViewConfig);
|
|
848
|
+
|
|
849
|
+
mockMessageChannel();
|
|
850
|
+
appEmbed.render();
|
|
851
|
+
|
|
852
|
+
const mockPort: any = { postMessage: jest.fn() };
|
|
853
|
+
await executeAfterWait(() => {
|
|
854
|
+
postMessageToParent(
|
|
855
|
+
getIFrameEl().contentWindow,
|
|
856
|
+
{ type: EmbedEvent.APP_INIT, data: {} },
|
|
857
|
+
mockPort,
|
|
858
|
+
);
|
|
859
|
+
});
|
|
860
|
+
await executeAfterWait(() => {
|
|
861
|
+
expect(mockPort.postMessage).toHaveBeenCalledWith({
|
|
862
|
+
type: EmbedEvent.APP_INIT,
|
|
863
|
+
data: expect.objectContaining({
|
|
864
|
+
embedParams: expect.objectContaining({
|
|
865
|
+
spotterSidebarConfig: expect.objectContaining({
|
|
866
|
+
spotterChatPinConfig,
|
|
867
|
+
}),
|
|
868
|
+
}),
|
|
869
|
+
}),
|
|
870
|
+
});
|
|
871
|
+
});
|
|
872
|
+
});
|
|
873
|
+
|
|
874
|
+
test('should include spotterShareConversationConfig in APP_INIT embedParams when provided', async () => {
|
|
875
|
+
const spotterShareConversationConfig = {
|
|
876
|
+
enableShareConversation: true,
|
|
877
|
+
spotterShareLabel: 'Share',
|
|
878
|
+
spotterShareModalTitle: 'Share conversation',
|
|
879
|
+
};
|
|
880
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
881
|
+
...defaultViewConfig,
|
|
882
|
+
spotterShareConversationConfig,
|
|
883
|
+
} as AppViewConfig);
|
|
884
|
+
|
|
885
|
+
mockMessageChannel();
|
|
886
|
+
appEmbed.render();
|
|
887
|
+
|
|
888
|
+
const mockPort: any = { postMessage: jest.fn() };
|
|
889
|
+
await executeAfterWait(() => {
|
|
890
|
+
postMessageToParent(
|
|
891
|
+
getIFrameEl().contentWindow,
|
|
892
|
+
{ type: EmbedEvent.APP_INIT, data: {} },
|
|
893
|
+
mockPort,
|
|
894
|
+
);
|
|
895
|
+
});
|
|
896
|
+
await executeAfterWait(() => {
|
|
897
|
+
expect(mockPort.postMessage).toHaveBeenCalledWith({
|
|
898
|
+
type: EmbedEvent.APP_INIT,
|
|
899
|
+
data: expect.objectContaining({
|
|
900
|
+
embedParams: expect.objectContaining({
|
|
901
|
+
spotterShareConversationConfig,
|
|
902
|
+
}),
|
|
903
|
+
}),
|
|
904
|
+
});
|
|
905
|
+
});
|
|
906
|
+
});
|
|
907
|
+
|
|
908
|
+
test('should not include spotterShareConversationConfig in APP_INIT when not provided', async () => {
|
|
909
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
910
|
+
...defaultViewConfig,
|
|
911
|
+
} as AppViewConfig);
|
|
912
|
+
|
|
913
|
+
mockMessageChannel();
|
|
914
|
+
appEmbed.render();
|
|
915
|
+
|
|
916
|
+
const mockPort: any = { postMessage: jest.fn() };
|
|
917
|
+
await executeAfterWait(() => {
|
|
918
|
+
postMessageToParent(
|
|
919
|
+
getIFrameEl().contentWindow,
|
|
920
|
+
{ type: EmbedEvent.APP_INIT, data: {} },
|
|
921
|
+
mockPort,
|
|
922
|
+
);
|
|
923
|
+
});
|
|
924
|
+
await executeAfterWait(() => {
|
|
925
|
+
const callArgs = mockPort.postMessage.mock.calls[0][0];
|
|
926
|
+
expect(callArgs.type).toBe(EmbedEvent.APP_INIT);
|
|
927
|
+
if (callArgs.data.embedParams) {
|
|
928
|
+
expect(callArgs.data.embedParams.spotterShareConversationConfig).toBeUndefined();
|
|
929
|
+
}
|
|
930
|
+
});
|
|
931
|
+
});
|
|
932
|
+
|
|
773
933
|
test('should set toolResponseCardBrandingLabel in url via spotterChatConfig', async () => {
|
|
774
934
|
const appEmbed = new AppEmbed(getRootEl(), {
|
|
775
935
|
...defaultViewConfig,
|
|
@@ -781,7 +941,7 @@ describe('App embed tests', () => {
|
|
|
781
941
|
await executeAfterWait(() => {
|
|
782
942
|
expectUrlMatchesWithParams(
|
|
783
943
|
getIFrameSrc(),
|
|
784
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&toolResponseCardBrandingLabel=MyBrand${defaultParamsPost}#/home`,
|
|
944
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&toolResponseCardBrandingLabel=MyBrand&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
785
945
|
);
|
|
786
946
|
});
|
|
787
947
|
});
|
|
@@ -795,7 +955,7 @@ describe('App embed tests', () => {
|
|
|
795
955
|
await executeAfterWait(() => {
|
|
796
956
|
expectUrlMatchesWithParams(
|
|
797
957
|
getIFrameSrc(),
|
|
798
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&spotterFileUploadEnabled=true${defaultParamsPost}#/home`,
|
|
958
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&spotterFileUploadEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
799
959
|
);
|
|
800
960
|
});
|
|
801
961
|
});
|
|
@@ -836,7 +996,7 @@ describe('App embed tests', () => {
|
|
|
836
996
|
await executeAfterWait(() => {
|
|
837
997
|
expectUrlMatchesWithParams(
|
|
838
998
|
getIFrameSrc(),
|
|
839
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardXLSXCSVDownloadEnabled=false${defaultParamsPost}#/home`,
|
|
999
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardXLSXCSVDownloadEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
840
1000
|
);
|
|
841
1001
|
});
|
|
842
1002
|
});
|
|
@@ -850,7 +1010,7 @@ describe('App embed tests', () => {
|
|
|
850
1010
|
await executeAfterWait(() => {
|
|
851
1011
|
expectUrlMatchesWithParams(
|
|
852
1012
|
getIFrameSrc(),
|
|
853
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isGranularXLSXCSVSchedulesEnabled=true${defaultParamsPost}#/home`,
|
|
1013
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isGranularXLSXCSVSchedulesEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
854
1014
|
);
|
|
855
1015
|
});
|
|
856
1016
|
});
|
|
@@ -864,7 +1024,7 @@ describe('App embed tests', () => {
|
|
|
864
1024
|
await executeAfterWait(() => {
|
|
865
1025
|
expectUrlMatchesWithParams(
|
|
866
1026
|
getIFrameSrc(),
|
|
867
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isGranularXLSXCSVSchedulesEnabled=false${defaultParamsPost}#/home`,
|
|
1027
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isGranularXLSXCSVSchedulesEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
868
1028
|
);
|
|
869
1029
|
});
|
|
870
1030
|
});
|
|
@@ -878,7 +1038,7 @@ describe('App embed tests', () => {
|
|
|
878
1038
|
await executeAfterWait(() => {
|
|
879
1039
|
expectUrlMatchesWithParams(
|
|
880
1040
|
getIFrameSrc(),
|
|
881
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isCentralizedLiveboardFilterUXEnabled=true${defaultParamsPost}#/home`,
|
|
1041
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isCentralizedLiveboardFilterUXEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
882
1042
|
);
|
|
883
1043
|
});
|
|
884
1044
|
});
|
|
@@ -892,11 +1052,49 @@ describe('App embed tests', () => {
|
|
|
892
1052
|
await executeAfterWait(() => {
|
|
893
1053
|
expectUrlMatchesWithParams(
|
|
894
1054
|
getIFrameSrc(),
|
|
895
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isCentralizedLiveboardFilterUXEnabled=false${defaultParamsPost}#/home`,
|
|
1055
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isCentralizedLiveboardFilterUXEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
896
1056
|
);
|
|
897
1057
|
});
|
|
898
1058
|
});
|
|
899
1059
|
|
|
1060
|
+
test('should set isScopedLiveboardFilteringEnabled to true in url', async () => {
|
|
1061
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
1062
|
+
...defaultViewConfig,
|
|
1063
|
+
isScopedLiveboardFilteringEnabled: true,
|
|
1064
|
+
} as AppViewConfig);
|
|
1065
|
+
appEmbed.render();
|
|
1066
|
+
await executeAfterWait(() => {
|
|
1067
|
+
expectUrlMatchesWithParams(
|
|
1068
|
+
getIFrameSrc(),
|
|
1069
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isScopedLiveboardFilteringEnabled=true${defaultParamsPost}#/home`,
|
|
1070
|
+
);
|
|
1071
|
+
});
|
|
1072
|
+
});
|
|
1073
|
+
|
|
1074
|
+
test('should set isScopedLiveboardFilteringEnabled to false in url', async () => {
|
|
1075
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
1076
|
+
...defaultViewConfig,
|
|
1077
|
+
isScopedLiveboardFilteringEnabled: false,
|
|
1078
|
+
} as AppViewConfig);
|
|
1079
|
+
appEmbed.render();
|
|
1080
|
+
await executeAfterWait(() => {
|
|
1081
|
+
expectUrlMatchesWithParams(
|
|
1082
|
+
getIFrameSrc(),
|
|
1083
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isScopedLiveboardFilteringEnabled=false${defaultParamsPost}#/home`,
|
|
1084
|
+
);
|
|
1085
|
+
});
|
|
1086
|
+
});
|
|
1087
|
+
|
|
1088
|
+
test('should not set isScopedLiveboardFilteringEnabled in url when undefined', async () => {
|
|
1089
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
1090
|
+
...defaultViewConfig,
|
|
1091
|
+
} as AppViewConfig);
|
|
1092
|
+
appEmbed.render();
|
|
1093
|
+
await executeAfterWait(() => {
|
|
1094
|
+
expect(getIFrameSrc()).not.toContain('isScopedLiveboardFilteringEnabled');
|
|
1095
|
+
});
|
|
1096
|
+
});
|
|
1097
|
+
|
|
900
1098
|
test('Should add the tag to the iframe src', async () => {
|
|
901
1099
|
const appEmbed = new AppEmbed(getRootEl(), {
|
|
902
1100
|
...defaultViewConfig,
|
|
@@ -908,7 +1106,7 @@ describe('App embed tests', () => {
|
|
|
908
1106
|
await executeAfterWait(() => {
|
|
909
1107
|
expectUrlMatchesWithParams(
|
|
910
1108
|
getIFrameSrc(),
|
|
911
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}&tag=Finance${defaultParamsPost}#/home`,
|
|
1109
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}&tag=Finance${defaultParamsPost}#/home`,
|
|
912
1110
|
);
|
|
913
1111
|
});
|
|
914
1112
|
});
|
|
@@ -924,7 +1122,7 @@ describe('App embed tests', () => {
|
|
|
924
1122
|
await executeAfterWait(() => {
|
|
925
1123
|
expectUrlMatchesWithParams(
|
|
926
1124
|
getIFrameSrc(),
|
|
927
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}&hideTagFilterChips=true${defaultParamsPost}#/home`,
|
|
1125
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}&hideTagFilterChips=true${defaultParamsPost}#/home`,
|
|
928
1126
|
);
|
|
929
1127
|
});
|
|
930
1128
|
});
|
|
@@ -939,7 +1137,7 @@ describe('App embed tests', () => {
|
|
|
939
1137
|
await executeAfterWait(() => {
|
|
940
1138
|
expectUrlMatchesWithParams(
|
|
941
1139
|
getIFrameSrc(),
|
|
942
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}&hideTagFilterChips=false${defaultParamsPost}#/home`,
|
|
1140
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}&hideTagFilterChips=false${defaultParamsPost}#/home`,
|
|
943
1141
|
);
|
|
944
1142
|
});
|
|
945
1143
|
});
|
|
@@ -953,7 +1151,7 @@ describe('App embed tests', () => {
|
|
|
953
1151
|
await executeAfterWait(() => {
|
|
954
1152
|
expectUrlMatchesWithParams(
|
|
955
1153
|
getIFrameSrc(),
|
|
956
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/home`,
|
|
1154
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
957
1155
|
);
|
|
958
1156
|
});
|
|
959
1157
|
});
|
|
@@ -969,7 +1167,7 @@ describe('App embed tests', () => {
|
|
|
969
1167
|
await executeAfterWait(() => {
|
|
970
1168
|
expectUrlMatchesWithParams(
|
|
971
1169
|
getIFrameSrc(),
|
|
972
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showMaskedFilterChip=true${defaultParams}${defaultParamsPost}#/home`,
|
|
1170
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showMaskedFilterChip=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
973
1171
|
);
|
|
974
1172
|
});
|
|
975
1173
|
});
|
|
@@ -985,7 +1183,7 @@ describe('App embed tests', () => {
|
|
|
985
1183
|
await executeAfterWait(() => {
|
|
986
1184
|
expectUrlMatchesWithParams(
|
|
987
1185
|
getIFrameSrc(),
|
|
988
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showMaskedFilterChip=false${defaultParams}${defaultParamsPost}#/home`,
|
|
1186
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showMaskedFilterChip=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
989
1187
|
);
|
|
990
1188
|
});
|
|
991
1189
|
});
|
|
@@ -1000,7 +1198,7 @@ describe('App embed tests', () => {
|
|
|
1000
1198
|
await executeAfterWait(() => {
|
|
1001
1199
|
expectUrlMatchesWithParams(
|
|
1002
1200
|
getIFrameSrc(),
|
|
1003
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showMaskedFilterChip=false${defaultParams}${defaultParamsPost}#/home`,
|
|
1201
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showMaskedFilterChip=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1004
1202
|
);
|
|
1005
1203
|
});
|
|
1006
1204
|
});
|
|
@@ -1016,7 +1214,7 @@ describe('App embed tests', () => {
|
|
|
1016
1214
|
await executeAfterWait(() => {
|
|
1017
1215
|
expectUrlMatchesWithParams(
|
|
1018
1216
|
getIFrameSrc(),
|
|
1019
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardMasterpiecesEnabled=true${defaultParams}${defaultParamsPost}#/home`,
|
|
1217
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardMasterpiecesEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1020
1218
|
);
|
|
1021
1219
|
});
|
|
1022
1220
|
});
|
|
@@ -1032,22 +1230,7 @@ describe('App embed tests', () => {
|
|
|
1032
1230
|
await executeAfterWait(() => {
|
|
1033
1231
|
expectUrlMatchesWithParams(
|
|
1034
1232
|
getIFrameSrc(),
|
|
1035
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardMasterpiecesEnabled=false${defaultParams}${defaultParamsPost}#/home`,
|
|
1036
|
-
);
|
|
1037
|
-
});
|
|
1038
|
-
});
|
|
1039
|
-
|
|
1040
|
-
test('Should add default isLiveboardMasterpiecesEnabled false when not specified', async () => {
|
|
1041
|
-
const appEmbed = new AppEmbed(getRootEl(), {
|
|
1042
|
-
...defaultViewConfig,
|
|
1043
|
-
showPrimaryNavbar: false,
|
|
1044
|
-
} as AppViewConfig);
|
|
1045
|
-
|
|
1046
|
-
appEmbed.render();
|
|
1047
|
-
await executeAfterWait(() => {
|
|
1048
|
-
expectUrlMatchesWithParams(
|
|
1049
|
-
getIFrameSrc(),
|
|
1050
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardMasterpiecesEnabled=false${defaultParams}${defaultParamsPost}#/home`,
|
|
1233
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardMasterpiecesEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1051
1234
|
);
|
|
1052
1235
|
});
|
|
1053
1236
|
});
|
|
@@ -1063,7 +1246,7 @@ describe('App embed tests', () => {
|
|
|
1063
1246
|
await executeAfterWait(() => {
|
|
1064
1247
|
expectUrlMatchesWithParams(
|
|
1065
1248
|
getIFrameSrc(),
|
|
1066
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&muzeChartPhase1EnabledGA=true${defaultParams}${defaultParamsPost}#/home`,
|
|
1249
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&muzeChartPhase1EnabledGA=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1067
1250
|
);
|
|
1068
1251
|
});
|
|
1069
1252
|
});
|
|
@@ -1079,7 +1262,7 @@ describe('App embed tests', () => {
|
|
|
1079
1262
|
await executeAfterWait(() => {
|
|
1080
1263
|
expectUrlMatchesWithParams(
|
|
1081
1264
|
getIFrameSrc(),
|
|
1082
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&muzeChartPhase1EnabledGA=false${defaultParams}${defaultParamsPost}#/home`,
|
|
1265
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&muzeChartPhase1EnabledGA=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1083
1266
|
);
|
|
1084
1267
|
});
|
|
1085
1268
|
});
|
|
@@ -1094,7 +1277,7 @@ describe('App embed tests', () => {
|
|
|
1094
1277
|
await executeAfterWait(() => {
|
|
1095
1278
|
expectUrlMatchesWithParams(
|
|
1096
1279
|
getIFrameSrc(),
|
|
1097
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/home`,
|
|
1280
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1098
1281
|
);
|
|
1099
1282
|
});
|
|
1100
1283
|
});
|
|
@@ -1109,7 +1292,7 @@ describe('App embed tests', () => {
|
|
|
1109
1292
|
await executeAfterWait(() => {
|
|
1110
1293
|
expectUrlMatchesWithParams(
|
|
1111
1294
|
getIFrameSrc(),
|
|
1112
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&enableSearchAssist=true${defaultParams}${defaultParamsPost}#/home`,
|
|
1295
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&enableSearchAssist=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1113
1296
|
);
|
|
1114
1297
|
});
|
|
1115
1298
|
});
|
|
@@ -1124,7 +1307,7 @@ describe('App embed tests', () => {
|
|
|
1124
1307
|
await executeAfterWait(() => {
|
|
1125
1308
|
expectUrlMatchesWithParams(
|
|
1126
1309
|
getIFrameSrc(),
|
|
1127
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&enableDataPanelV2=true${defaultParams}${defaultParamsPost}#/home`,
|
|
1310
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&enableDataPanelV2=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1128
1311
|
);
|
|
1129
1312
|
});
|
|
1130
1313
|
});
|
|
@@ -1139,7 +1322,7 @@ describe('App embed tests', () => {
|
|
|
1139
1322
|
await executeAfterWait(() => {
|
|
1140
1323
|
expectUrlMatchesWithParams(
|
|
1141
1324
|
getIFrameSrc(),
|
|
1142
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardHeaderSticky=false${defaultParams}${defaultParamsPost}#/home`,
|
|
1325
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardHeaderSticky=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1143
1326
|
);
|
|
1144
1327
|
});
|
|
1145
1328
|
});
|
|
@@ -1154,7 +1337,7 @@ describe('App embed tests', () => {
|
|
|
1154
1337
|
await executeAfterWait(() => {
|
|
1155
1338
|
expectUrlMatchesWithParams(
|
|
1156
1339
|
getIFrameSrc(),
|
|
1157
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardHeaderV2Enabled=false${defaultParams}${defaultParamsPost}#/home`,
|
|
1340
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardHeaderV2Enabled=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1158
1341
|
);
|
|
1159
1342
|
});
|
|
1160
1343
|
});
|
|
@@ -1169,7 +1352,7 @@ describe('App embed tests', () => {
|
|
|
1169
1352
|
await executeAfterWait(() => {
|
|
1170
1353
|
expectUrlMatchesWithParams(
|
|
1171
1354
|
getIFrameSrc(),
|
|
1172
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showLiveboardReverifyBanner=false${defaultParams}${defaultParamsPost}#/home`,
|
|
1355
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showLiveboardReverifyBanner=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1173
1356
|
);
|
|
1174
1357
|
});
|
|
1175
1358
|
});
|
|
@@ -1185,7 +1368,7 @@ describe('App embed tests', () => {
|
|
|
1185
1368
|
await executeAfterWait(() => {
|
|
1186
1369
|
expectUrlMatchesWithParams(
|
|
1187
1370
|
getIFrameSrc(),
|
|
1188
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=true${defaultParams}${defaultParamsPost}#/home`,
|
|
1371
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1189
1372
|
);
|
|
1190
1373
|
});
|
|
1191
1374
|
appEmbedTrue.destroy();
|
|
@@ -1200,7 +1383,7 @@ describe('App embed tests', () => {
|
|
|
1200
1383
|
await executeAfterWait(() => {
|
|
1201
1384
|
expectUrlMatchesWithParams(
|
|
1202
1385
|
getIFrameSrc(),
|
|
1203
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=false${defaultParams}${defaultParamsPost}#/home`,
|
|
1386
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1204
1387
|
);
|
|
1205
1388
|
});
|
|
1206
1389
|
appEmbedFalse.destroy();
|
|
@@ -1214,7 +1397,7 @@ describe('App embed tests', () => {
|
|
|
1214
1397
|
await executeAfterWait(() => {
|
|
1215
1398
|
expectUrlMatchesWithParams(
|
|
1216
1399
|
getIFrameSrc(),
|
|
1217
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=true${defaultParams}${defaultParamsPost}#/home`,
|
|
1400
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1218
1401
|
);
|
|
1219
1402
|
});
|
|
1220
1403
|
});
|
|
@@ -1270,7 +1453,7 @@ describe('App embed tests', () => {
|
|
|
1270
1453
|
await executeAfterWait(() => {
|
|
1271
1454
|
expectUrlMatchesWithParams(
|
|
1272
1455
|
getIFrameSrc(),
|
|
1273
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&hideIrrelevantFiltersAtTabLevel=false${defaultParams}${defaultParamsPost}#/home`,
|
|
1456
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&hideIrrelevantFiltersAtTabLevel=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1274
1457
|
);
|
|
1275
1458
|
});
|
|
1276
1459
|
});
|
|
@@ -1285,7 +1468,7 @@ describe('App embed tests', () => {
|
|
|
1285
1468
|
await executeAfterWait(() => {
|
|
1286
1469
|
expectUrlMatchesWithParams(
|
|
1287
1470
|
getIFrameSrc(),
|
|
1288
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showLiveboardVerifiedBadge=false${defaultParams}${defaultParamsPost}#/home`,
|
|
1471
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showLiveboardVerifiedBadge=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1289
1472
|
);
|
|
1290
1473
|
});
|
|
1291
1474
|
});
|
|
@@ -1299,7 +1482,7 @@ describe('App embed tests', () => {
|
|
|
1299
1482
|
await executeAfterWait(() => {
|
|
1300
1483
|
expectUrlMatchesWithParams(
|
|
1301
1484
|
getIFrameSrc(),
|
|
1302
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardPermissionV2Enabled=false${defaultParams}${defaultParamsPost}#/home`,
|
|
1485
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardPermissionV2Enabled=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1303
1486
|
);
|
|
1304
1487
|
});
|
|
1305
1488
|
});
|
|
@@ -1313,7 +1496,7 @@ describe('App embed tests', () => {
|
|
|
1313
1496
|
await executeAfterWait(() => {
|
|
1314
1497
|
expectUrlMatchesWithParams(
|
|
1315
1498
|
getIFrameSrc(),
|
|
1316
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardHeaderSticky=true&hideLiveboardHeader=false&showLiveboardDescription=true&showLiveboardTitle=true${defaultParams}${defaultParamsPost}#/home`,
|
|
1499
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardHeaderSticky=true&hideLiveboardHeader=false&showLiveboardDescription=true&showLiveboardTitle=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1317
1500
|
);
|
|
1318
1501
|
});
|
|
1319
1502
|
});
|
|
@@ -1328,7 +1511,7 @@ describe('App embed tests', () => {
|
|
|
1328
1511
|
await executeAfterWait(() => {
|
|
1329
1512
|
expectUrlMatchesWithParams(
|
|
1330
1513
|
getIFrameSrc(),
|
|
1331
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true${defaultParams}${defaultParamsPost}#/home`,
|
|
1514
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1332
1515
|
);
|
|
1333
1516
|
});
|
|
1334
1517
|
});
|
|
@@ -1343,7 +1526,7 @@ describe('App embed tests', () => {
|
|
|
1343
1526
|
await executeAfterWait(() => {
|
|
1344
1527
|
expectUrlMatchesWithParams(
|
|
1345
1528
|
getIFrameSrc(),
|
|
1346
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1529
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&hideHomepageLeftNav=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1347
1530
|
);
|
|
1348
1531
|
});
|
|
1349
1532
|
});
|
|
@@ -1360,7 +1543,7 @@ describe('App embed tests', () => {
|
|
|
1360
1543
|
await executeAfterWait(() => {
|
|
1361
1544
|
expectUrlMatchesWithParams(
|
|
1362
1545
|
getIFrameSrc(),
|
|
1363
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1546
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&hideHamburger=true&hideObjectSearch=true&hideNotification=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1364
1547
|
);
|
|
1365
1548
|
});
|
|
1366
1549
|
});
|
|
@@ -1377,93 +1560,18 @@ describe('App embed tests', () => {
|
|
|
1377
1560
|
await executeAfterWait(() => {
|
|
1378
1561
|
expectUrlMatchesWithParams(
|
|
1379
1562
|
getIFrameSrc(),
|
|
1380
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1563
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1381
1564
|
);
|
|
1382
1565
|
});
|
|
1383
1566
|
});
|
|
1384
1567
|
|
|
1385
|
-
test('Should add navigationVersion=v3 when primaryNavbarVersion is Sliding to the iframe src', async () => {
|
|
1386
|
-
await testUrlParams(
|
|
1387
|
-
{
|
|
1388
|
-
...defaultViewConfig,
|
|
1389
|
-
discoveryExperience: {
|
|
1390
|
-
primaryNavbarVersion: PrimaryNavbarVersion.Sliding,
|
|
1391
|
-
homePage: HomePage.Modular,
|
|
1392
|
-
},
|
|
1393
|
-
} as AppViewConfig,
|
|
1394
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true&navigationVersion=v3${defaultParams}${defaultParamsPost}#/home`
|
|
1395
|
-
);
|
|
1396
|
-
});
|
|
1397
|
-
|
|
1398
|
-
test('Should not add navigationVersion=v3 when primaryNavbarVersion is not added to the iframe src', async () => {
|
|
1399
|
-
await testUrlParams(
|
|
1400
|
-
{
|
|
1401
|
-
...defaultViewConfig,
|
|
1402
|
-
discoveryExperience: {
|
|
1403
|
-
homePage: HomePage.Modular,
|
|
1404
|
-
},
|
|
1405
|
-
} as AppViewConfig,
|
|
1406
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true${defaultParams}${defaultParamsPost}#/home`
|
|
1407
|
-
);
|
|
1408
|
-
});
|
|
1409
|
-
|
|
1410
|
-
test('Should add navigationVersion=v3 & modularHomeExperience=true when primaryNavbarVersion is Sliding to the iframe src', async () => {
|
|
1411
|
-
await testUrlParams(
|
|
1412
|
-
{
|
|
1413
|
-
...defaultViewConfig,
|
|
1414
|
-
// homePage v2 config not included under discoveryExperience
|
|
1415
|
-
discoveryExperience: {
|
|
1416
|
-
primaryNavbarVersion: PrimaryNavbarVersion.Sliding,
|
|
1417
|
-
},
|
|
1418
|
-
} as AppViewConfig,
|
|
1419
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true&navigationVersion=v3${defaultParams}${defaultParamsPost}#/home`
|
|
1420
|
-
);
|
|
1421
|
-
});
|
|
1422
|
-
|
|
1423
|
-
test('Should add homepageVersion=v3 & navigationVersion=v3 & modularHomeExperience=true when Sliding and ModularWithStylingChanges configured in the iframe src', async () => {
|
|
1424
|
-
await testUrlParams(
|
|
1425
|
-
{
|
|
1426
|
-
...defaultViewConfig,
|
|
1427
|
-
discoveryExperience: {
|
|
1428
|
-
primaryNavbarVersion: PrimaryNavbarVersion.Sliding,
|
|
1429
|
-
homePage: HomePage.ModularWithStylingChanges,
|
|
1430
|
-
},
|
|
1431
|
-
} as AppViewConfig,
|
|
1432
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`
|
|
1433
|
-
);
|
|
1434
|
-
});
|
|
1435
|
-
|
|
1436
|
-
test('Should add homepageVersion=v3 & navigationVersion=v3 & modularHomeExperience=true when homePage is ModularWithStylingChanges to the iframe src', async () => {
|
|
1437
|
-
await testUrlParams(
|
|
1438
|
-
{
|
|
1439
|
-
...defaultViewConfig,
|
|
1440
|
-
// primaryNavbarVersion is not included under
|
|
1441
|
-
// discoveryExperience, then it set navigationVersion=v2 and
|
|
1442
|
-
// modularHomeExperience=false.
|
|
1443
|
-
discoveryExperience: {
|
|
1444
|
-
homePage: HomePage.ModularWithStylingChanges,
|
|
1445
|
-
},
|
|
1446
|
-
} as AppViewConfig,
|
|
1447
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&navigationVersion=v2&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`
|
|
1448
|
-
);
|
|
1449
|
-
});
|
|
1450
|
-
|
|
1451
|
-
test('Should add navigationVersion=v2 when primaryNavbarVersion is not added to the iframe src', async () => {
|
|
1452
|
-
await testUrlParams(
|
|
1453
|
-
{
|
|
1454
|
-
...defaultViewConfig,
|
|
1455
|
-
} as AppViewConfig,
|
|
1456
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&navigationVersion=v2${defaultParams}${defaultParamsPost}#/home`
|
|
1457
|
-
);
|
|
1458
|
-
});
|
|
1459
|
-
|
|
1460
1568
|
test('Should add enableAskSage flag to the iframe src', async () => {
|
|
1461
1569
|
await testUrlParams(
|
|
1462
1570
|
{
|
|
1463
1571
|
...defaultViewConfig,
|
|
1464
1572
|
enableAskSage: true,
|
|
1465
1573
|
} as AppViewConfig,
|
|
1466
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1574
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&enableAskSage=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`
|
|
1467
1575
|
);
|
|
1468
1576
|
});
|
|
1469
1577
|
|
|
@@ -1475,30 +1583,28 @@ describe('App embed tests', () => {
|
|
|
1475
1583
|
listPageVersion: ListPage.ListWithUXChanges,
|
|
1476
1584
|
},
|
|
1477
1585
|
} as AppViewConfig,
|
|
1478
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1586
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&listpageVersion=v3&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`
|
|
1479
1587
|
);
|
|
1480
1588
|
});
|
|
1481
1589
|
|
|
1482
|
-
test('Should
|
|
1590
|
+
test('Should send navigationVersion=v3 & homepageVersion=v3 by default when no discoveryExperience is provided', async () => {
|
|
1483
1591
|
await testUrlParams(
|
|
1484
1592
|
{
|
|
1485
1593
|
...defaultViewConfig,
|
|
1486
1594
|
} as AppViewConfig,
|
|
1487
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1595
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`
|
|
1488
1596
|
);
|
|
1489
1597
|
});
|
|
1490
1598
|
|
|
1491
|
-
test('Should
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true&navigationVersion=v3${defaultParams}${defaultParamsPost}#/home`
|
|
1501
|
-
);
|
|
1599
|
+
test('Should not send modularHomeExperience param by default when not specified', async () => {
|
|
1600
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
1601
|
+
...defaultViewConfig,
|
|
1602
|
+
} as AppViewConfig);
|
|
1603
|
+
appEmbed.render();
|
|
1604
|
+
await executeAfterWait(() => {
|
|
1605
|
+
const url = new URL(getIFrameSrc());
|
|
1606
|
+
expect(url.searchParams.has('modularHomeExperience')).toBe(false);
|
|
1607
|
+
});
|
|
1502
1608
|
});
|
|
1503
1609
|
|
|
1504
1610
|
|
|
@@ -1507,12 +1613,10 @@ describe('App embed tests', () => {
|
|
|
1507
1613
|
{
|
|
1508
1614
|
...defaultViewConfig,
|
|
1509
1615
|
discoveryExperience: {
|
|
1510
|
-
primaryNavbarVersion: PrimaryNavbarVersion.Sliding,
|
|
1511
|
-
homePage: HomePage.Modular,
|
|
1512
1616
|
listPageVersion: ListPage.ListWithUXChanges,
|
|
1513
1617
|
},
|
|
1514
1618
|
} as AppViewConfig,
|
|
1515
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1619
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3&listpageVersion=v3${defaultParams}${defaultParamsPost}#/home`
|
|
1516
1620
|
);
|
|
1517
1621
|
});
|
|
1518
1622
|
|
|
@@ -1525,7 +1629,7 @@ describe('App embed tests', () => {
|
|
|
1525
1629
|
await executeAfterWait(() => {
|
|
1526
1630
|
expectUrlMatchesWithParams(
|
|
1527
1631
|
getIFrameSrc(),
|
|
1528
|
-
`http://${thoughtSpotHost}/?enablePendoHelp=true&embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1632
|
+
`http://${thoughtSpotHost}/?enablePendoHelp=true&embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1529
1633
|
);
|
|
1530
1634
|
});
|
|
1531
1635
|
|
|
@@ -1538,7 +1642,7 @@ describe('App embed tests', () => {
|
|
|
1538
1642
|
await executeAfterWait(() => {
|
|
1539
1643
|
expectUrlMatchesWithParams(
|
|
1540
1644
|
getIFrameSrc(),
|
|
1541
|
-
`http://${thoughtSpotHost}/?enablePendoHelp=false&embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1645
|
+
`http://${thoughtSpotHost}/?enablePendoHelp=false&embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1542
1646
|
);
|
|
1543
1647
|
});
|
|
1544
1648
|
});
|
|
@@ -1552,7 +1656,7 @@ describe('App embed tests', () => {
|
|
|
1552
1656
|
await executeAfterWait(() => {
|
|
1553
1657
|
expectUrlMatchesWithParams(
|
|
1554
1658
|
getIFrameSrc(),
|
|
1555
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableLiveboardDataCache=true${defaultParamsPost}#/home`,
|
|
1659
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableLiveboardDataCache=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
1556
1660
|
);
|
|
1557
1661
|
});
|
|
1558
1662
|
});
|
|
@@ -1566,7 +1670,7 @@ describe('App embed tests', () => {
|
|
|
1566
1670
|
await executeAfterWait(() => {
|
|
1567
1671
|
expectUrlMatchesWithParams(
|
|
1568
1672
|
getIFrameSrc(),
|
|
1569
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableLiveboardDataCache=false${defaultParamsPost}#/home`,
|
|
1673
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableLiveboardDataCache=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
1570
1674
|
);
|
|
1571
1675
|
});
|
|
1572
1676
|
});
|
|
@@ -1591,7 +1695,7 @@ describe('App embed tests', () => {
|
|
|
1591
1695
|
await executeAfterWait(() => {
|
|
1592
1696
|
expectUrlMatchesWithParams(
|
|
1593
1697
|
getIFrameSrc(),
|
|
1594
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1698
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&homePageSearchBarMode=objectSearch&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1595
1699
|
);
|
|
1596
1700
|
});
|
|
1597
1701
|
});
|
|
@@ -1606,7 +1710,7 @@ describe('App embed tests', () => {
|
|
|
1606
1710
|
await executeAfterWait(() => {
|
|
1607
1711
|
expectUrlMatchesWithParams(
|
|
1608
1712
|
getIFrameSrc(),
|
|
1609
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1713
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&homePageSearchBarMode=aiAnswer&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1610
1714
|
);
|
|
1611
1715
|
});
|
|
1612
1716
|
});
|
|
@@ -1621,7 +1725,7 @@ describe('App embed tests', () => {
|
|
|
1621
1725
|
await executeAfterWait(() => {
|
|
1622
1726
|
expectUrlMatchesWithParams(
|
|
1623
1727
|
getIFrameSrc(),
|
|
1624
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1728
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&homePageSearchBarMode=none&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1625
1729
|
);
|
|
1626
1730
|
});
|
|
1627
1731
|
});
|
|
@@ -1638,7 +1742,7 @@ describe('App embed tests', () => {
|
|
|
1638
1742
|
await executeAfterWait(() => {
|
|
1639
1743
|
expectUrlMatchesWithParams(
|
|
1640
1744
|
getIFrameSrc(),
|
|
1641
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1745
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&dataPanelCustomGroupsAccordionInitialState=EXPAND_FIRST&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`,
|
|
1642
1746
|
);
|
|
1643
1747
|
});
|
|
1644
1748
|
});
|
|
@@ -1699,7 +1803,7 @@ describe('App embed tests', () => {
|
|
|
1699
1803
|
appEmbed.navigateToPage(path);
|
|
1700
1804
|
expectUrlMatchesWithParams(
|
|
1701
1805
|
getIFrameSrc(),
|
|
1702
|
-
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&${defaultParamsForPinboardEmbed}${defaultParamsPost}#/${path}`,
|
|
1806
|
+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3&${defaultParamsForPinboardEmbed}${defaultParamsPost}#/${path}`,
|
|
1703
1807
|
);
|
|
1704
1808
|
});
|
|
1705
1809
|
|
|
@@ -2473,3 +2577,106 @@ describe('AppEmbed visualOverrides tests', () => {
|
|
|
2473
2577
|
await testVisualOverridesInEmbed(appEmbed, visualOverrides);
|
|
2474
2578
|
});
|
|
2475
2579
|
});
|
|
2580
|
+
|
|
2581
|
+
describe('AppEmbed getEmbedParamsObject', () => {
|
|
2582
|
+
beforeEach(() => {
|
|
2583
|
+
cleanUp();
|
|
2584
|
+
jest.spyOn(TsEmbed.prototype as any, 'getAppInitData').mockResolvedValue({});
|
|
2585
|
+
});
|
|
2586
|
+
|
|
2587
|
+
afterEach(() => {
|
|
2588
|
+
jest.restoreAllMocks();
|
|
2589
|
+
});
|
|
2590
|
+
|
|
2591
|
+
test('getEmbedParams should use getEmbedParamsObject internally', async () => {
|
|
2592
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
2593
|
+
...defaultViewConfig,
|
|
2594
|
+
fullHeight: true,
|
|
2595
|
+
} as AppViewConfig);
|
|
2596
|
+
|
|
2597
|
+
const getEmbedParamsObjectSpy = jest.spyOn(appEmbed as any, 'getEmbedParamsObject');
|
|
2598
|
+
|
|
2599
|
+
await appEmbed.render();
|
|
2600
|
+
|
|
2601
|
+
expect(getEmbedParamsObjectSpy).toHaveBeenCalled();
|
|
2602
|
+
});
|
|
2603
|
+
|
|
2604
|
+
test('getEmbedParamsObject should contain isFullHeightPinboard when fullHeight is true', () => {
|
|
2605
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
2606
|
+
...defaultViewConfig,
|
|
2607
|
+
fullHeight: true,
|
|
2608
|
+
} as AppViewConfig);
|
|
2609
|
+
|
|
2610
|
+
const params = (appEmbed as any).getEmbedParamsObject();
|
|
2611
|
+
|
|
2612
|
+
expect(params.isFullHeightPinboard).toBe(true);
|
|
2613
|
+
expect(params.fullHeight).toBeUndefined();
|
|
2614
|
+
});
|
|
2615
|
+
|
|
2616
|
+
test('getEmbedParamsObject should not contain isFullHeightPinboard when fullHeight is false', () => {
|
|
2617
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
2618
|
+
...defaultViewConfig,
|
|
2619
|
+
fullHeight: false,
|
|
2620
|
+
} as AppViewConfig);
|
|
2621
|
+
|
|
2622
|
+
const params = (appEmbed as any).getEmbedParamsObject();
|
|
2623
|
+
|
|
2624
|
+
expect(params.isFullHeightPinboard).toBeUndefined();
|
|
2625
|
+
});
|
|
2626
|
+
|
|
2627
|
+
test('getUpdateEmbedParamsObject should contain isFullHeightPinboard when fullHeight is true', async () => {
|
|
2628
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
2629
|
+
...defaultViewConfig,
|
|
2630
|
+
fullHeight: true,
|
|
2631
|
+
} as AppViewConfig);
|
|
2632
|
+
|
|
2633
|
+
const params = await (appEmbed as any).getUpdateEmbedParamsObject();
|
|
2634
|
+
|
|
2635
|
+
expect(params.isFullHeightPinboard).toBe(true);
|
|
2636
|
+
});
|
|
2637
|
+
|
|
2638
|
+
test('getUpdateEmbedParamsObject should not contain isFullHeightPinboard when fullHeight is false', async () => {
|
|
2639
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
2640
|
+
...defaultViewConfig,
|
|
2641
|
+
fullHeight: false,
|
|
2642
|
+
} as AppViewConfig);
|
|
2643
|
+
|
|
2644
|
+
const params = await (appEmbed as any).getUpdateEmbedParamsObject();
|
|
2645
|
+
|
|
2646
|
+
expect(params.isFullHeightPinboard).toBeUndefined();
|
|
2647
|
+
});
|
|
2648
|
+
});
|
|
2649
|
+
|
|
2650
|
+
describe('AppEmbed updatedSpotterExperience tests', () => {
|
|
2651
|
+
beforeEach(() => {
|
|
2652
|
+
cleanUp();
|
|
2653
|
+
});
|
|
2654
|
+
|
|
2655
|
+
test('should set updatedSpotterExperience to true in url', async () => {
|
|
2656
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
2657
|
+
...defaultViewConfig,
|
|
2658
|
+
updatedSpotterExperience: true,
|
|
2659
|
+
} as AppViewConfig);
|
|
2660
|
+
appEmbed.render();
|
|
2661
|
+
await executeAfterWait(() => {
|
|
2662
|
+
expectUrlMatchesWithParams(
|
|
2663
|
+
getIFrameSrc(),
|
|
2664
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&updatedSpotterExperience=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
2665
|
+
);
|
|
2666
|
+
});
|
|
2667
|
+
});
|
|
2668
|
+
|
|
2669
|
+
test('should set updatedSpotterExperience to false in url', async () => {
|
|
2670
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
2671
|
+
...defaultViewConfig,
|
|
2672
|
+
updatedSpotterExperience: false,
|
|
2673
|
+
} as AppViewConfig);
|
|
2674
|
+
appEmbed.render();
|
|
2675
|
+
await executeAfterWait(() => {
|
|
2676
|
+
expectUrlMatchesWithParams(
|
|
2677
|
+
getIFrameSrc(),
|
|
2678
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&updatedSpotterExperience=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`,
|
|
2679
|
+
);
|
|
2680
|
+
});
|
|
2681
|
+
});
|
|
2682
|
+
});
|