@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppEmbed, DataPanelCustomColumnGroupsAccordionState, Page, HomePageSearchBarMode,
|
|
1
|
+
import { AppEmbed, DataPanelCustomColumnGroupsAccordionState, Page, HomePageSearchBarMode, HomePage, ListPage, } from './app';
|
|
2
2
|
import { SpotterQueryMode } from './conversation';
|
|
3
3
|
import { init } from '../index';
|
|
4
4
|
import { Action, AuthType, EmbedEvent, HostEvent, RuntimeFilterOp } from '../types';
|
|
@@ -98,7 +98,7 @@ describe('App embed tests', () => {
|
|
|
98
98
|
const appEmbed = new AppEmbed(getRootEl(), defaultViewConfig);
|
|
99
99
|
appEmbed.render();
|
|
100
100
|
await executeAfterWait(() => {
|
|
101
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/home`);
|
|
101
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
102
102
|
});
|
|
103
103
|
});
|
|
104
104
|
test('should hide the primary nav bar', async () => {
|
|
@@ -108,7 +108,7 @@ describe('App embed tests', () => {
|
|
|
108
108
|
});
|
|
109
109
|
appEmbed.render();
|
|
110
110
|
await executeAfterWait(() => {
|
|
111
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/home`);
|
|
111
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
112
112
|
});
|
|
113
113
|
});
|
|
114
114
|
test('should hide the help and profile buttons from nav bar', async () => {
|
|
@@ -118,7 +118,7 @@ describe('App embed tests', () => {
|
|
|
118
118
|
});
|
|
119
119
|
appEmbed.render();
|
|
120
120
|
await executeAfterWait(() => {
|
|
121
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=true${defaultParams}${defaultParamsPost}#/home`);
|
|
121
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
122
122
|
});
|
|
123
123
|
});
|
|
124
124
|
test('should hide the application switcher button from nav bar', async () => {
|
|
@@ -128,7 +128,7 @@ describe('App embed tests', () => {
|
|
|
128
128
|
});
|
|
129
129
|
appEmbed.render();
|
|
130
130
|
await executeAfterWait(() => {
|
|
131
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&applicationSwitcherHidden=true${defaultParams}${defaultParamsPost}#/home`);
|
|
131
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&applicationSwitcherHidden=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
132
132
|
});
|
|
133
133
|
});
|
|
134
134
|
test('should hide the org switcher button from nav bar', async () => {
|
|
@@ -138,7 +138,7 @@ describe('App embed tests', () => {
|
|
|
138
138
|
});
|
|
139
139
|
appEmbed.render();
|
|
140
140
|
await executeAfterWait(() => {
|
|
141
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&orgSwitcherHidden=true${defaultParams}${defaultParamsPost}#/home`);
|
|
141
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&orgSwitcherHidden=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
142
142
|
});
|
|
143
143
|
});
|
|
144
144
|
describe('should render the correct routes for pages', () => {
|
|
@@ -164,7 +164,7 @@ describe('App embed tests', () => {
|
|
|
164
164
|
});
|
|
165
165
|
appEmbed.render();
|
|
166
166
|
await executeAfterWait(() => {
|
|
167
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/${route}`);
|
|
167
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/${route}`);
|
|
168
168
|
cleanUp();
|
|
169
169
|
});
|
|
170
170
|
});
|
|
@@ -192,7 +192,7 @@ describe('App embed tests', () => {
|
|
|
192
192
|
});
|
|
193
193
|
appEmbed.render();
|
|
194
194
|
await executeAfterWait(() => {
|
|
195
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/${route}`);
|
|
195
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/${route}`);
|
|
196
196
|
cleanUp();
|
|
197
197
|
});
|
|
198
198
|
});
|
|
@@ -205,7 +205,7 @@ describe('App embed tests', () => {
|
|
|
205
205
|
});
|
|
206
206
|
appEmbed.render();
|
|
207
207
|
await executeAfterWait(() => {
|
|
208
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/foo/bar`);
|
|
208
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/foo/bar`);
|
|
209
209
|
});
|
|
210
210
|
});
|
|
211
211
|
test('should apply runtime filters', async () => {
|
|
@@ -223,7 +223,7 @@ describe('App embed tests', () => {
|
|
|
223
223
|
});
|
|
224
224
|
appEmbed.render();
|
|
225
225
|
await executeAfterWait(() => {
|
|
226
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false&col1=sales&op1=EQ&val1=1000${defaultParams}${defaultParamsPost}#/home`);
|
|
226
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false&col1=sales&op1=EQ&val1=1000&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
227
227
|
});
|
|
228
228
|
});
|
|
229
229
|
test('should not append runtime filters in URL if excludeRuntimeFiltersfromURL is true', async () => {
|
|
@@ -241,7 +241,7 @@ describe('App embed tests', () => {
|
|
|
241
241
|
});
|
|
242
242
|
appEmbed.render();
|
|
243
243
|
await executeAfterWait(() => {
|
|
244
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/home`);
|
|
244
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
245
245
|
});
|
|
246
246
|
});
|
|
247
247
|
test('should append runtime filters in URL if excludeRuntimeFiltersfromURL is undefined', async () => {
|
|
@@ -260,7 +260,7 @@ describe('App embed tests', () => {
|
|
|
260
260
|
appEmbed.render();
|
|
261
261
|
const runtimeFilter = 'col1=sales&op1=EQ&val1=1000';
|
|
262
262
|
await executeAfterWait(() => {
|
|
263
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}&${runtimeFilter}#/home`);
|
|
263
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}&${runtimeFilter}#/home`);
|
|
264
264
|
});
|
|
265
265
|
});
|
|
266
266
|
test('should disable and hide actions', async () => {
|
|
@@ -273,7 +273,7 @@ describe('App embed tests', () => {
|
|
|
273
273
|
});
|
|
274
274
|
appEmbed.render();
|
|
275
275
|
await executeAfterWait(() => {
|
|
276
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `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`);
|
|
276
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `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`);
|
|
277
277
|
});
|
|
278
278
|
});
|
|
279
279
|
test('should set enable2ColumnLayout to true in url', async () => {
|
|
@@ -283,7 +283,7 @@ describe('App embed tests', () => {
|
|
|
283
283
|
});
|
|
284
284
|
appEmbed.render();
|
|
285
285
|
await executeAfterWait(() => {
|
|
286
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enable2ColumnLayout=true${defaultParamsPost}#/home`);
|
|
286
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enable2ColumnLayout=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
287
287
|
});
|
|
288
288
|
});
|
|
289
289
|
test('should set coverAndFilterOptionInPDF to false in url', async () => {
|
|
@@ -293,7 +293,7 @@ describe('App embed tests', () => {
|
|
|
293
293
|
});
|
|
294
294
|
appEmbed.render();
|
|
295
295
|
await executeAfterWait(() => {
|
|
296
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&arePdfCoverFilterPageCheckboxesEnabled=false${defaultParamsPost}#/home`);
|
|
296
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&arePdfCoverFilterPageCheckboxesEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
297
297
|
});
|
|
298
298
|
});
|
|
299
299
|
test('should set isLiveboardStylingAndGroupingEnabled to true in url (deprecated, use isLiveboardMasterpiecesEnabled)', async () => {
|
|
@@ -303,7 +303,7 @@ describe('App embed tests', () => {
|
|
|
303
303
|
});
|
|
304
304
|
appEmbed.render();
|
|
305
305
|
await executeAfterWait(() => {
|
|
306
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardStylingAndGroupingEnabled=true${defaultParamsPost}#/home`);
|
|
306
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardStylingAndGroupingEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
307
307
|
});
|
|
308
308
|
});
|
|
309
309
|
test('should set isThisPeriodInDateFiltersEnabled to true in url', async () => {
|
|
@@ -313,7 +313,7 @@ describe('App embed tests', () => {
|
|
|
313
313
|
});
|
|
314
314
|
appEmbed.render();
|
|
315
315
|
await executeAfterWait(() => {
|
|
316
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isThisPeriodInDateFiltersEnabled=true${defaultParamsPost}#/home`);
|
|
316
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isThisPeriodInDateFiltersEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
317
317
|
});
|
|
318
318
|
});
|
|
319
319
|
test('should set enableHomepageAnnouncement to true in url', async () => {
|
|
@@ -323,14 +323,14 @@ describe('App embed tests', () => {
|
|
|
323
323
|
});
|
|
324
324
|
appEmbed.render();
|
|
325
325
|
await executeAfterWait(() => {
|
|
326
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableHomepageAnnouncement=true${defaultParamsPost}#/home`);
|
|
326
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableHomepageAnnouncement=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
327
327
|
});
|
|
328
328
|
});
|
|
329
329
|
test('should set enableHomepageAnnouncement to false in url when not provided in AppViewConfig', async () => {
|
|
330
330
|
const appEmbed = new AppEmbed(getRootEl(), defaultViewConfig);
|
|
331
331
|
appEmbed.render();
|
|
332
332
|
await executeAfterWait(() => {
|
|
333
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableHomepageAnnouncement=false${defaultParamsPost}#/home`);
|
|
333
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableHomepageAnnouncement=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
334
334
|
});
|
|
335
335
|
});
|
|
336
336
|
test('should set isPNGInScheduledEmailsEnabled to true in url', async () => {
|
|
@@ -340,7 +340,7 @@ describe('App embed tests', () => {
|
|
|
340
340
|
});
|
|
341
341
|
appEmbed.render();
|
|
342
342
|
await executeAfterWait(() => {
|
|
343
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isPNGInScheduledEmailsEnabled=true${defaultParamsPost}#/home`);
|
|
343
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isPNGInScheduledEmailsEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
344
344
|
});
|
|
345
345
|
});
|
|
346
346
|
test('should set isWYSIWYGLiveboardPDFEnabled to true in url', async () => {
|
|
@@ -350,16 +350,16 @@ describe('App embed tests', () => {
|
|
|
350
350
|
});
|
|
351
351
|
appEmbed.render();
|
|
352
352
|
await executeAfterWait(() => {
|
|
353
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isWYSIWYGLiveboardPDFEnabled=true${defaultParamsPost}#/home`);
|
|
353
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isWYSIWYGLiveboardPDFEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
354
354
|
});
|
|
355
355
|
});
|
|
356
|
-
test('should
|
|
356
|
+
test('should not set isWYSIWYGLiveboardPDFEnabled in url by default', async () => {
|
|
357
357
|
const appEmbed = new AppEmbed(getRootEl(), {
|
|
358
358
|
...defaultViewConfig,
|
|
359
359
|
});
|
|
360
360
|
appEmbed.render();
|
|
361
361
|
await executeAfterWait(() => {
|
|
362
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&
|
|
362
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
363
363
|
});
|
|
364
364
|
});
|
|
365
365
|
test('should set isLinkParametersEnabled to true in url', async () => {
|
|
@@ -369,7 +369,7 @@ describe('App embed tests', () => {
|
|
|
369
369
|
});
|
|
370
370
|
appEmbed.render();
|
|
371
371
|
await executeAfterWait(() => {
|
|
372
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLinkParametersEnabled=true${defaultParamsPost}#/home`);
|
|
372
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLinkParametersEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
373
373
|
});
|
|
374
374
|
});
|
|
375
375
|
test('should set isLinkParametersEnabled to false in url', async () => {
|
|
@@ -379,7 +379,7 @@ describe('App embed tests', () => {
|
|
|
379
379
|
});
|
|
380
380
|
appEmbed.render();
|
|
381
381
|
await executeAfterWait(() => {
|
|
382
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLinkParametersEnabled=false${defaultParamsPost}#/home`);
|
|
382
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLinkParametersEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
383
383
|
});
|
|
384
384
|
});
|
|
385
385
|
test('Should add homepageVersion=v4 and updatedSpotterChatPrompt=true when homePage is Focused to the iframe src', async () => {
|
|
@@ -388,7 +388,7 @@ describe('App embed tests', () => {
|
|
|
388
388
|
discoveryExperience: {
|
|
389
389
|
homePage: HomePage.Focused,
|
|
390
390
|
},
|
|
391
|
-
}, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
391
|
+
}, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v4&updatedSpotterChatPrompt=true${defaultParams}${defaultParamsPost}#/home`);
|
|
392
392
|
});
|
|
393
393
|
test('Should respect explicit updatedSpotterChatPrompt=false even when homePage is Focused', async () => {
|
|
394
394
|
await testUrlParams({
|
|
@@ -397,7 +397,7 @@ describe('App embed tests', () => {
|
|
|
397
397
|
homePage: HomePage.Focused,
|
|
398
398
|
},
|
|
399
399
|
updatedSpotterChatPrompt: false,
|
|
400
|
-
}, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
400
|
+
}, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v4&updatedSpotterChatPrompt=false${defaultParams}${defaultParamsPost}#/home`);
|
|
401
401
|
});
|
|
402
402
|
test('should set isLiveboardXLSXCSVDownloadEnabled to true in url', async () => {
|
|
403
403
|
const appEmbed = new AppEmbed(getRootEl(), {
|
|
@@ -406,7 +406,7 @@ describe('App embed tests', () => {
|
|
|
406
406
|
});
|
|
407
407
|
appEmbed.render();
|
|
408
408
|
await executeAfterWait(() => {
|
|
409
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardXLSXCSVDownloadEnabled=true${defaultParamsPost}#/home`);
|
|
409
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardXLSXCSVDownloadEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
410
410
|
});
|
|
411
411
|
});
|
|
412
412
|
test('should set updatedSpotterChatPrompt to true in url', async () => {
|
|
@@ -416,7 +416,7 @@ describe('App embed tests', () => {
|
|
|
416
416
|
});
|
|
417
417
|
appEmbed.render();
|
|
418
418
|
await executeAfterWait(() => {
|
|
419
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&updatedSpotterChatPrompt=true${defaultParamsPost}#/home`);
|
|
419
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&updatedSpotterChatPrompt=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
420
420
|
});
|
|
421
421
|
});
|
|
422
422
|
test('should set updatedSpotterChatPrompt to false in url', async () => {
|
|
@@ -426,7 +426,27 @@ describe('App embed tests', () => {
|
|
|
426
426
|
});
|
|
427
427
|
appEmbed.render();
|
|
428
428
|
await executeAfterWait(() => {
|
|
429
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&updatedSpotterChatPrompt=false${defaultParamsPost}#/home`);
|
|
429
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&updatedSpotterChatPrompt=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
430
|
+
});
|
|
431
|
+
});
|
|
432
|
+
test('should set showSpotterRadiance to true in url', async () => {
|
|
433
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
434
|
+
...defaultViewConfig,
|
|
435
|
+
showSpotterRadiance: true,
|
|
436
|
+
});
|
|
437
|
+
appEmbed.render();
|
|
438
|
+
await executeAfterWait(() => {
|
|
439
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&showSpotterRadiance=true${defaultParamsPost}#/home`);
|
|
440
|
+
});
|
|
441
|
+
});
|
|
442
|
+
test('should set showSpotterRadiance to false in url', async () => {
|
|
443
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
444
|
+
...defaultViewConfig,
|
|
445
|
+
showSpotterRadiance: false,
|
|
446
|
+
});
|
|
447
|
+
appEmbed.render();
|
|
448
|
+
await executeAfterWait(() => {
|
|
449
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&showSpotterRadiance=false${defaultParamsPost}#/home`);
|
|
430
450
|
});
|
|
431
451
|
});
|
|
432
452
|
test('should set defaultQueryMode to research in url', async () => {
|
|
@@ -457,7 +477,36 @@ describe('App embed tests', () => {
|
|
|
457
477
|
});
|
|
458
478
|
appEmbed.render();
|
|
459
479
|
await executeAfterWait(() => {
|
|
460
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&hideToolResponseCardBranding=true${defaultParamsPost}#/home`);
|
|
480
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&hideToolResponseCardBranding=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
481
|
+
});
|
|
482
|
+
});
|
|
483
|
+
test('should set spotterDataSources to a list of Model GUIDs in url', async () => {
|
|
484
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
485
|
+
...defaultViewConfig,
|
|
486
|
+
spotterDataSources: ['model-guid-123', 'model-guid-456'],
|
|
487
|
+
});
|
|
488
|
+
appEmbed.render();
|
|
489
|
+
await executeAfterWait(() => {
|
|
490
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&spotterDataSources=${encodeURIComponent(JSON.stringify(['model-guid-123', 'model-guid-456']))}${defaultParamsPost}#/home`);
|
|
491
|
+
});
|
|
492
|
+
});
|
|
493
|
+
test('should not add spotterDataSources to url when not provided', async () => {
|
|
494
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
495
|
+
...defaultViewConfig,
|
|
496
|
+
});
|
|
497
|
+
appEmbed.render();
|
|
498
|
+
await executeAfterWait(() => {
|
|
499
|
+
expect(getIFrameSrc()).not.toContain('spotterDataSources');
|
|
500
|
+
});
|
|
501
|
+
});
|
|
502
|
+
test('should not add spotterDataSources to url when empty array', async () => {
|
|
503
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
504
|
+
...defaultViewConfig,
|
|
505
|
+
spotterDataSources: [],
|
|
506
|
+
});
|
|
507
|
+
appEmbed.render();
|
|
508
|
+
await executeAfterWait(() => {
|
|
509
|
+
expect(getIFrameSrc()).not.toContain('spotterDataSources');
|
|
461
510
|
});
|
|
462
511
|
});
|
|
463
512
|
test('should include spotterVizConfig in APP_INIT embedParams when spotterViz is provided', async () => {
|
|
@@ -567,6 +616,83 @@ describe('App embed tests', () => {
|
|
|
567
616
|
});
|
|
568
617
|
});
|
|
569
618
|
});
|
|
619
|
+
test('should forward spotterChatPinConfig nested in spotterSidebarConfig in APP_INIT', async () => {
|
|
620
|
+
const spotterChatPinConfig = {
|
|
621
|
+
enabled: true,
|
|
622
|
+
pinLabel: 'Pin to top',
|
|
623
|
+
unpinLabel: 'Unpin',
|
|
624
|
+
};
|
|
625
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
626
|
+
...defaultViewConfig,
|
|
627
|
+
spotterSidebarConfig: {
|
|
628
|
+
enablePastConversationsSidebar: true,
|
|
629
|
+
spotterChatPinConfig,
|
|
630
|
+
},
|
|
631
|
+
});
|
|
632
|
+
mockMessageChannel();
|
|
633
|
+
appEmbed.render();
|
|
634
|
+
const mockPort = { postMessage: jest.fn() };
|
|
635
|
+
await executeAfterWait(() => {
|
|
636
|
+
postMessageToParent(getIFrameEl().contentWindow, { type: EmbedEvent.APP_INIT, data: {} }, mockPort);
|
|
637
|
+
});
|
|
638
|
+
await executeAfterWait(() => {
|
|
639
|
+
expect(mockPort.postMessage).toHaveBeenCalledWith({
|
|
640
|
+
type: EmbedEvent.APP_INIT,
|
|
641
|
+
data: expect.objectContaining({
|
|
642
|
+
embedParams: expect.objectContaining({
|
|
643
|
+
spotterSidebarConfig: expect.objectContaining({
|
|
644
|
+
spotterChatPinConfig,
|
|
645
|
+
}),
|
|
646
|
+
}),
|
|
647
|
+
}),
|
|
648
|
+
});
|
|
649
|
+
});
|
|
650
|
+
});
|
|
651
|
+
test('should include spotterShareConversationConfig in APP_INIT embedParams when provided', async () => {
|
|
652
|
+
const spotterShareConversationConfig = {
|
|
653
|
+
enableShareConversation: true,
|
|
654
|
+
spotterShareLabel: 'Share',
|
|
655
|
+
spotterShareModalTitle: 'Share conversation',
|
|
656
|
+
};
|
|
657
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
658
|
+
...defaultViewConfig,
|
|
659
|
+
spotterShareConversationConfig,
|
|
660
|
+
});
|
|
661
|
+
mockMessageChannel();
|
|
662
|
+
appEmbed.render();
|
|
663
|
+
const mockPort = { postMessage: jest.fn() };
|
|
664
|
+
await executeAfterWait(() => {
|
|
665
|
+
postMessageToParent(getIFrameEl().contentWindow, { type: EmbedEvent.APP_INIT, data: {} }, mockPort);
|
|
666
|
+
});
|
|
667
|
+
await executeAfterWait(() => {
|
|
668
|
+
expect(mockPort.postMessage).toHaveBeenCalledWith({
|
|
669
|
+
type: EmbedEvent.APP_INIT,
|
|
670
|
+
data: expect.objectContaining({
|
|
671
|
+
embedParams: expect.objectContaining({
|
|
672
|
+
spotterShareConversationConfig,
|
|
673
|
+
}),
|
|
674
|
+
}),
|
|
675
|
+
});
|
|
676
|
+
});
|
|
677
|
+
});
|
|
678
|
+
test('should not include spotterShareConversationConfig in APP_INIT when not provided', async () => {
|
|
679
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
680
|
+
...defaultViewConfig,
|
|
681
|
+
});
|
|
682
|
+
mockMessageChannel();
|
|
683
|
+
appEmbed.render();
|
|
684
|
+
const mockPort = { postMessage: jest.fn() };
|
|
685
|
+
await executeAfterWait(() => {
|
|
686
|
+
postMessageToParent(getIFrameEl().contentWindow, { type: EmbedEvent.APP_INIT, data: {} }, mockPort);
|
|
687
|
+
});
|
|
688
|
+
await executeAfterWait(() => {
|
|
689
|
+
const callArgs = mockPort.postMessage.mock.calls[0][0];
|
|
690
|
+
expect(callArgs.type).toBe(EmbedEvent.APP_INIT);
|
|
691
|
+
if (callArgs.data.embedParams) {
|
|
692
|
+
expect(callArgs.data.embedParams.spotterShareConversationConfig).toBeUndefined();
|
|
693
|
+
}
|
|
694
|
+
});
|
|
695
|
+
});
|
|
570
696
|
test('should set toolResponseCardBrandingLabel in url via spotterChatConfig', async () => {
|
|
571
697
|
const appEmbed = new AppEmbed(getRootEl(), {
|
|
572
698
|
...defaultViewConfig,
|
|
@@ -576,7 +702,7 @@ describe('App embed tests', () => {
|
|
|
576
702
|
});
|
|
577
703
|
appEmbed.render();
|
|
578
704
|
await executeAfterWait(() => {
|
|
579
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&toolResponseCardBrandingLabel=MyBrand${defaultParamsPost}#/home`);
|
|
705
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&toolResponseCardBrandingLabel=MyBrand&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
580
706
|
});
|
|
581
707
|
});
|
|
582
708
|
test('should set spotterFileUploadEnabled to true in url', async () => {
|
|
@@ -586,7 +712,7 @@ describe('App embed tests', () => {
|
|
|
586
712
|
});
|
|
587
713
|
appEmbed.render();
|
|
588
714
|
await executeAfterWait(() => {
|
|
589
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&spotterFileUploadEnabled=true${defaultParamsPost}#/home`);
|
|
715
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&spotterFileUploadEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
590
716
|
});
|
|
591
717
|
});
|
|
592
718
|
test('should set enableStarterPrompts to true in url', async () => {
|
|
@@ -618,7 +744,7 @@ describe('App embed tests', () => {
|
|
|
618
744
|
});
|
|
619
745
|
appEmbed.render();
|
|
620
746
|
await executeAfterWait(() => {
|
|
621
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardXLSXCSVDownloadEnabled=false${defaultParamsPost}#/home`);
|
|
747
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardXLSXCSVDownloadEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
622
748
|
});
|
|
623
749
|
});
|
|
624
750
|
test('should set isGranularXLSXCSVSchedulesEnabled to true in url', async () => {
|
|
@@ -628,7 +754,7 @@ describe('App embed tests', () => {
|
|
|
628
754
|
});
|
|
629
755
|
appEmbed.render();
|
|
630
756
|
await executeAfterWait(() => {
|
|
631
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isGranularXLSXCSVSchedulesEnabled=true${defaultParamsPost}#/home`);
|
|
757
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isGranularXLSXCSVSchedulesEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
632
758
|
});
|
|
633
759
|
});
|
|
634
760
|
test('should set isGranularXLSXCSVSchedulesEnabled to false in url', async () => {
|
|
@@ -638,7 +764,7 @@ describe('App embed tests', () => {
|
|
|
638
764
|
});
|
|
639
765
|
appEmbed.render();
|
|
640
766
|
await executeAfterWait(() => {
|
|
641
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isGranularXLSXCSVSchedulesEnabled=false${defaultParamsPost}#/home`);
|
|
767
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isGranularXLSXCSVSchedulesEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
642
768
|
});
|
|
643
769
|
});
|
|
644
770
|
test('should set isCentralizedLiveboardFilterUXEnabled to true in url', async () => {
|
|
@@ -648,7 +774,7 @@ describe('App embed tests', () => {
|
|
|
648
774
|
});
|
|
649
775
|
appEmbed.render();
|
|
650
776
|
await executeAfterWait(() => {
|
|
651
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isCentralizedLiveboardFilterUXEnabled=true${defaultParamsPost}#/home`);
|
|
777
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isCentralizedLiveboardFilterUXEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
652
778
|
});
|
|
653
779
|
});
|
|
654
780
|
test('should set isCentralizedLiveboardFilterUXEnabled to false in url', async () => {
|
|
@@ -658,7 +784,36 @@ describe('App embed tests', () => {
|
|
|
658
784
|
});
|
|
659
785
|
appEmbed.render();
|
|
660
786
|
await executeAfterWait(() => {
|
|
661
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isCentralizedLiveboardFilterUXEnabled=false${defaultParamsPost}#/home`);
|
|
787
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isCentralizedLiveboardFilterUXEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
788
|
+
});
|
|
789
|
+
});
|
|
790
|
+
test('should set isScopedLiveboardFilteringEnabled to true in url', async () => {
|
|
791
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
792
|
+
...defaultViewConfig,
|
|
793
|
+
isScopedLiveboardFilteringEnabled: true,
|
|
794
|
+
});
|
|
795
|
+
appEmbed.render();
|
|
796
|
+
await executeAfterWait(() => {
|
|
797
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isScopedLiveboardFilteringEnabled=true${defaultParamsPost}#/home`);
|
|
798
|
+
});
|
|
799
|
+
});
|
|
800
|
+
test('should set isScopedLiveboardFilteringEnabled to false in url', async () => {
|
|
801
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
802
|
+
...defaultViewConfig,
|
|
803
|
+
isScopedLiveboardFilteringEnabled: false,
|
|
804
|
+
});
|
|
805
|
+
appEmbed.render();
|
|
806
|
+
await executeAfterWait(() => {
|
|
807
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isScopedLiveboardFilteringEnabled=false${defaultParamsPost}#/home`);
|
|
808
|
+
});
|
|
809
|
+
});
|
|
810
|
+
test('should not set isScopedLiveboardFilteringEnabled in url when undefined', async () => {
|
|
811
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
812
|
+
...defaultViewConfig,
|
|
813
|
+
});
|
|
814
|
+
appEmbed.render();
|
|
815
|
+
await executeAfterWait(() => {
|
|
816
|
+
expect(getIFrameSrc()).not.toContain('isScopedLiveboardFilteringEnabled');
|
|
662
817
|
});
|
|
663
818
|
});
|
|
664
819
|
test('Should add the tag to the iframe src', async () => {
|
|
@@ -669,7 +824,7 @@ describe('App embed tests', () => {
|
|
|
669
824
|
});
|
|
670
825
|
appEmbed.render();
|
|
671
826
|
await executeAfterWait(() => {
|
|
672
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}&tag=Finance${defaultParamsPost}#/home`);
|
|
827
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}&tag=Finance${defaultParamsPost}#/home`);
|
|
673
828
|
});
|
|
674
829
|
});
|
|
675
830
|
test('Should add the hideTagFilterChips true to the iframe src', async () => {
|
|
@@ -680,7 +835,7 @@ describe('App embed tests', () => {
|
|
|
680
835
|
});
|
|
681
836
|
appEmbed.render();
|
|
682
837
|
await executeAfterWait(() => {
|
|
683
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}&hideTagFilterChips=true${defaultParamsPost}#/home`);
|
|
838
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}&hideTagFilterChips=true${defaultParamsPost}#/home`);
|
|
684
839
|
});
|
|
685
840
|
});
|
|
686
841
|
test('Should add the hideTagFilterChips false to the iframe src', async () => {
|
|
@@ -691,7 +846,7 @@ describe('App embed tests', () => {
|
|
|
691
846
|
});
|
|
692
847
|
appEmbed.render();
|
|
693
848
|
await executeAfterWait(() => {
|
|
694
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}&hideTagFilterChips=false${defaultParamsPost}#/home`);
|
|
849
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}&hideTagFilterChips=false${defaultParamsPost}#/home`);
|
|
695
850
|
});
|
|
696
851
|
});
|
|
697
852
|
test('Should not add hideTagFilterChips if it is undefined', async () => {
|
|
@@ -701,7 +856,7 @@ describe('App embed tests', () => {
|
|
|
701
856
|
});
|
|
702
857
|
appEmbed.render();
|
|
703
858
|
await executeAfterWait(() => {
|
|
704
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/home`);
|
|
859
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
705
860
|
});
|
|
706
861
|
});
|
|
707
862
|
test('Should add showMaskedFilterChip true to the iframe src', async () => {
|
|
@@ -712,7 +867,7 @@ describe('App embed tests', () => {
|
|
|
712
867
|
});
|
|
713
868
|
appEmbed.render();
|
|
714
869
|
await executeAfterWait(() => {
|
|
715
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showMaskedFilterChip=true${defaultParams}${defaultParamsPost}#/home`);
|
|
870
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showMaskedFilterChip=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
716
871
|
});
|
|
717
872
|
});
|
|
718
873
|
test('Should add showMaskedFilterChip false to the iframe src', async () => {
|
|
@@ -723,7 +878,7 @@ describe('App embed tests', () => {
|
|
|
723
878
|
});
|
|
724
879
|
appEmbed.render();
|
|
725
880
|
await executeAfterWait(() => {
|
|
726
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showMaskedFilterChip=false${defaultParams}${defaultParamsPost}#/home`);
|
|
881
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showMaskedFilterChip=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
727
882
|
});
|
|
728
883
|
});
|
|
729
884
|
test('Should add default showMaskedFilterChip false when not specified', async () => {
|
|
@@ -733,7 +888,7 @@ describe('App embed tests', () => {
|
|
|
733
888
|
});
|
|
734
889
|
appEmbed.render();
|
|
735
890
|
await executeAfterWait(() => {
|
|
736
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showMaskedFilterChip=false${defaultParams}${defaultParamsPost}#/home`);
|
|
891
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showMaskedFilterChip=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
737
892
|
});
|
|
738
893
|
});
|
|
739
894
|
test('Should add isLiveboardMasterpiecesEnabled true to the iframe src', async () => {
|
|
@@ -744,7 +899,7 @@ describe('App embed tests', () => {
|
|
|
744
899
|
});
|
|
745
900
|
appEmbed.render();
|
|
746
901
|
await executeAfterWait(() => {
|
|
747
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardMasterpiecesEnabled=true${defaultParams}${defaultParamsPost}#/home`);
|
|
902
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardMasterpiecesEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
748
903
|
});
|
|
749
904
|
});
|
|
750
905
|
test('Should add isLiveboardMasterpiecesEnabled false to the iframe src', async () => {
|
|
@@ -755,17 +910,7 @@ describe('App embed tests', () => {
|
|
|
755
910
|
});
|
|
756
911
|
appEmbed.render();
|
|
757
912
|
await executeAfterWait(() => {
|
|
758
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardMasterpiecesEnabled=false${defaultParams}${defaultParamsPost}#/home`);
|
|
759
|
-
});
|
|
760
|
-
});
|
|
761
|
-
test('Should add default isLiveboardMasterpiecesEnabled false when not specified', async () => {
|
|
762
|
-
const appEmbed = new AppEmbed(getRootEl(), {
|
|
763
|
-
...defaultViewConfig,
|
|
764
|
-
showPrimaryNavbar: false,
|
|
765
|
-
});
|
|
766
|
-
appEmbed.render();
|
|
767
|
-
await executeAfterWait(() => {
|
|
768
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardMasterpiecesEnabled=false${defaultParams}${defaultParamsPost}#/home`);
|
|
913
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardMasterpiecesEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
769
914
|
});
|
|
770
915
|
});
|
|
771
916
|
test('Should add newChartsLibrary true to the iframe src', async () => {
|
|
@@ -776,7 +921,7 @@ describe('App embed tests', () => {
|
|
|
776
921
|
});
|
|
777
922
|
appEmbed.render();
|
|
778
923
|
await executeAfterWait(() => {
|
|
779
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&muzeChartPhase1EnabledGA=true${defaultParams}${defaultParamsPost}#/home`);
|
|
924
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&muzeChartPhase1EnabledGA=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
780
925
|
});
|
|
781
926
|
});
|
|
782
927
|
test('Should add newChartsLibrary false to the iframe src', async () => {
|
|
@@ -787,7 +932,7 @@ describe('App embed tests', () => {
|
|
|
787
932
|
});
|
|
788
933
|
appEmbed.render();
|
|
789
934
|
await executeAfterWait(() => {
|
|
790
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&muzeChartPhase1EnabledGA=false${defaultParams}${defaultParamsPost}#/home`);
|
|
935
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&muzeChartPhase1EnabledGA=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
791
936
|
});
|
|
792
937
|
});
|
|
793
938
|
test('Should not add newChartsLibrary to the iframe src when not specified', async () => {
|
|
@@ -797,7 +942,7 @@ describe('App embed tests', () => {
|
|
|
797
942
|
});
|
|
798
943
|
appEmbed.render();
|
|
799
944
|
await executeAfterWait(() => {
|
|
800
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/home`);
|
|
945
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
801
946
|
});
|
|
802
947
|
});
|
|
803
948
|
test('Should add enableSearchAssist flagto the iframe src', async () => {
|
|
@@ -807,7 +952,7 @@ describe('App embed tests', () => {
|
|
|
807
952
|
});
|
|
808
953
|
appEmbed.render();
|
|
809
954
|
await executeAfterWait(() => {
|
|
810
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&enableSearchAssist=true${defaultParams}${defaultParamsPost}#/home`);
|
|
955
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&enableSearchAssist=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
811
956
|
});
|
|
812
957
|
});
|
|
813
958
|
test('Should add enableDataPanelV2 flag to the iframe src', async () => {
|
|
@@ -817,7 +962,7 @@ describe('App embed tests', () => {
|
|
|
817
962
|
});
|
|
818
963
|
appEmbed.render();
|
|
819
964
|
await executeAfterWait(() => {
|
|
820
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&enableDataPanelV2=true${defaultParams}${defaultParamsPost}#/home`);
|
|
965
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&enableDataPanelV2=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
821
966
|
});
|
|
822
967
|
});
|
|
823
968
|
test('Should add isLiveboardHeaderSticky flag to the iframe src', async () => {
|
|
@@ -827,7 +972,7 @@ describe('App embed tests', () => {
|
|
|
827
972
|
});
|
|
828
973
|
appEmbed.render();
|
|
829
974
|
await executeAfterWait(() => {
|
|
830
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardHeaderSticky=false${defaultParams}${defaultParamsPost}#/home`);
|
|
975
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardHeaderSticky=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
831
976
|
});
|
|
832
977
|
});
|
|
833
978
|
test('Should add isLiveboardCompactHeaderEnabled flag to the iframe src', async () => {
|
|
@@ -837,7 +982,7 @@ describe('App embed tests', () => {
|
|
|
837
982
|
});
|
|
838
983
|
appEmbed.render();
|
|
839
984
|
await executeAfterWait(() => {
|
|
840
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardHeaderV2Enabled=false${defaultParams}${defaultParamsPost}#/home`);
|
|
985
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardHeaderV2Enabled=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
841
986
|
});
|
|
842
987
|
});
|
|
843
988
|
test('Should add showLiveboardReverifyBanner flag to the iframe src', async () => {
|
|
@@ -847,7 +992,7 @@ describe('App embed tests', () => {
|
|
|
847
992
|
});
|
|
848
993
|
appEmbed.render();
|
|
849
994
|
await executeAfterWait(() => {
|
|
850
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showLiveboardReverifyBanner=false${defaultParams}${defaultParamsPost}#/home`);
|
|
995
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showLiveboardReverifyBanner=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
851
996
|
});
|
|
852
997
|
});
|
|
853
998
|
test('Should add isUnifiedSearchExperienceEnabled flag to the iframe src', async () => {
|
|
@@ -858,7 +1003,7 @@ describe('App embed tests', () => {
|
|
|
858
1003
|
});
|
|
859
1004
|
appEmbedTrue.render();
|
|
860
1005
|
await executeAfterWait(() => {
|
|
861
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=true${defaultParams}${defaultParamsPost}#/home`);
|
|
1006
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
862
1007
|
});
|
|
863
1008
|
appEmbedTrue.destroy();
|
|
864
1009
|
// Case 2: explicitly false
|
|
@@ -868,7 +1013,7 @@ describe('App embed tests', () => {
|
|
|
868
1013
|
});
|
|
869
1014
|
appEmbedFalse.render();
|
|
870
1015
|
await executeAfterWait(() => {
|
|
871
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=false${defaultParams}${defaultParamsPost}#/home`);
|
|
1016
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
872
1017
|
});
|
|
873
1018
|
appEmbedFalse.destroy();
|
|
874
1019
|
// Case 3: not provided — defaults to false
|
|
@@ -877,7 +1022,7 @@ describe('App embed tests', () => {
|
|
|
877
1022
|
});
|
|
878
1023
|
appEmbedDefault.render();
|
|
879
1024
|
await executeAfterWait(() => {
|
|
880
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=true${defaultParams}${defaultParamsPost}#/home`);
|
|
1025
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
881
1026
|
});
|
|
882
1027
|
});
|
|
883
1028
|
test('should set newConnectionsExperience to true in url', async () => {
|
|
@@ -916,7 +1061,7 @@ describe('App embed tests', () => {
|
|
|
916
1061
|
});
|
|
917
1062
|
appEmbed.render();
|
|
918
1063
|
await executeAfterWait(() => {
|
|
919
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&hideIrrelevantFiltersAtTabLevel=false${defaultParams}${defaultParamsPost}#/home`);
|
|
1064
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&hideIrrelevantFiltersAtTabLevel=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
920
1065
|
});
|
|
921
1066
|
});
|
|
922
1067
|
test('Should add showLiveboardVerifiedBadge flag to the iframe src', async () => {
|
|
@@ -926,7 +1071,7 @@ describe('App embed tests', () => {
|
|
|
926
1071
|
});
|
|
927
1072
|
appEmbed.render();
|
|
928
1073
|
await executeAfterWait(() => {
|
|
929
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showLiveboardVerifiedBadge=false${defaultParams}${defaultParamsPost}#/home`);
|
|
1074
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showLiveboardVerifiedBadge=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
930
1075
|
});
|
|
931
1076
|
});
|
|
932
1077
|
test('Should add isLiveboardPermissionV2Enabled flag to the iframe src', async () => {
|
|
@@ -936,7 +1081,7 @@ describe('App embed tests', () => {
|
|
|
936
1081
|
});
|
|
937
1082
|
appEmbed.render();
|
|
938
1083
|
await executeAfterWait(() => {
|
|
939
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardPermissionV2Enabled=false${defaultParams}${defaultParamsPost}#/home`);
|
|
1084
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardPermissionV2Enabled=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
940
1085
|
});
|
|
941
1086
|
});
|
|
942
1087
|
test('Should add default values of flags to the iframe src', async () => {
|
|
@@ -945,7 +1090,7 @@ describe('App embed tests', () => {
|
|
|
945
1090
|
});
|
|
946
1091
|
appEmbed.render();
|
|
947
1092
|
await executeAfterWait(() => {
|
|
948
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardHeaderSticky=true&hideLiveboardHeader=false&showLiveboardDescription=true&showLiveboardTitle=true${defaultParams}${defaultParamsPost}#/home`);
|
|
1093
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardHeaderSticky=true&hideLiveboardHeader=false&showLiveboardDescription=true&showLiveboardTitle=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
949
1094
|
});
|
|
950
1095
|
});
|
|
951
1096
|
test('Should add modularHomeExperience flag to the iframe src', async () => {
|
|
@@ -955,7 +1100,7 @@ describe('App embed tests', () => {
|
|
|
955
1100
|
});
|
|
956
1101
|
appEmbed.render();
|
|
957
1102
|
await executeAfterWait(() => {
|
|
958
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true${defaultParams}${defaultParamsPost}#/home`);
|
|
1103
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
959
1104
|
});
|
|
960
1105
|
});
|
|
961
1106
|
test('Should add hideHomepageLeftNav flag to the iframe src', async () => {
|
|
@@ -965,7 +1110,7 @@ describe('App embed tests', () => {
|
|
|
965
1110
|
});
|
|
966
1111
|
appEmbed.render();
|
|
967
1112
|
await executeAfterWait(() => {
|
|
968
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1113
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&hideHomepageLeftNav=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
969
1114
|
});
|
|
970
1115
|
});
|
|
971
1116
|
test('Should add hideHamburger, hideObjectSearch, hideNotification flags to the iframe src', async () => {
|
|
@@ -977,7 +1122,7 @@ describe('App embed tests', () => {
|
|
|
977
1122
|
});
|
|
978
1123
|
appEmbed.render();
|
|
979
1124
|
await executeAfterWait(() => {
|
|
980
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1125
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&hideHamburger=true&hideObjectSearch=true&hideNotification=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
981
1126
|
});
|
|
982
1127
|
});
|
|
983
1128
|
test('Should not add when hideHamburger, hideObjectSearch, hideNotification values are not true to the iframe src', async () => {
|
|
@@ -989,65 +1134,14 @@ describe('App embed tests', () => {
|
|
|
989
1134
|
});
|
|
990
1135
|
appEmbed.render();
|
|
991
1136
|
await executeAfterWait(() => {
|
|
992
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1137
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
993
1138
|
});
|
|
994
1139
|
});
|
|
995
|
-
test('Should add navigationVersion=v3 when primaryNavbarVersion is Sliding to the iframe src', async () => {
|
|
996
|
-
await testUrlParams({
|
|
997
|
-
...defaultViewConfig,
|
|
998
|
-
discoveryExperience: {
|
|
999
|
-
primaryNavbarVersion: PrimaryNavbarVersion.Sliding,
|
|
1000
|
-
homePage: HomePage.Modular,
|
|
1001
|
-
},
|
|
1002
|
-
}, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true&navigationVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
1003
|
-
});
|
|
1004
|
-
test('Should not add navigationVersion=v3 when primaryNavbarVersion is not added to the iframe src', async () => {
|
|
1005
|
-
await testUrlParams({
|
|
1006
|
-
...defaultViewConfig,
|
|
1007
|
-
discoveryExperience: {
|
|
1008
|
-
homePage: HomePage.Modular,
|
|
1009
|
-
},
|
|
1010
|
-
}, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true${defaultParams}${defaultParamsPost}#/home`);
|
|
1011
|
-
});
|
|
1012
|
-
test('Should add navigationVersion=v3 & modularHomeExperience=true when primaryNavbarVersion is Sliding to the iframe src', async () => {
|
|
1013
|
-
await testUrlParams({
|
|
1014
|
-
...defaultViewConfig,
|
|
1015
|
-
// homePage v2 config not included under discoveryExperience
|
|
1016
|
-
discoveryExperience: {
|
|
1017
|
-
primaryNavbarVersion: PrimaryNavbarVersion.Sliding,
|
|
1018
|
-
},
|
|
1019
|
-
}, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true&navigationVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
1020
|
-
});
|
|
1021
|
-
test('Should add homepageVersion=v3 & navigationVersion=v3 & modularHomeExperience=true when Sliding and ModularWithStylingChanges configured in the iframe src', async () => {
|
|
1022
|
-
await testUrlParams({
|
|
1023
|
-
...defaultViewConfig,
|
|
1024
|
-
discoveryExperience: {
|
|
1025
|
-
primaryNavbarVersion: PrimaryNavbarVersion.Sliding,
|
|
1026
|
-
homePage: HomePage.ModularWithStylingChanges,
|
|
1027
|
-
},
|
|
1028
|
-
}, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
1029
|
-
});
|
|
1030
|
-
test('Should add homepageVersion=v3 & navigationVersion=v3 & modularHomeExperience=true when homePage is ModularWithStylingChanges to the iframe src', async () => {
|
|
1031
|
-
await testUrlParams({
|
|
1032
|
-
...defaultViewConfig,
|
|
1033
|
-
// primaryNavbarVersion is not included under
|
|
1034
|
-
// discoveryExperience, then it set navigationVersion=v2 and
|
|
1035
|
-
// modularHomeExperience=false.
|
|
1036
|
-
discoveryExperience: {
|
|
1037
|
-
homePage: HomePage.ModularWithStylingChanges,
|
|
1038
|
-
},
|
|
1039
|
-
}, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&navigationVersion=v2&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
1040
|
-
});
|
|
1041
|
-
test('Should add navigationVersion=v2 when primaryNavbarVersion is not added to the iframe src', async () => {
|
|
1042
|
-
await testUrlParams({
|
|
1043
|
-
...defaultViewConfig,
|
|
1044
|
-
}, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&navigationVersion=v2${defaultParams}${defaultParamsPost}#/home`);
|
|
1045
|
-
});
|
|
1046
1140
|
test('Should add enableAskSage flag to the iframe src', async () => {
|
|
1047
1141
|
await testUrlParams({
|
|
1048
1142
|
...defaultViewConfig,
|
|
1049
1143
|
enableAskSage: true,
|
|
1050
|
-
}, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1144
|
+
}, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&enableAskSage=true&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
1051
1145
|
});
|
|
1052
1146
|
test('Should add listpageVersion=v3 when listPageVersion is ListWithUXChanges to the iframe src', async () => {
|
|
1053
1147
|
await testUrlParams({
|
|
@@ -1055,31 +1149,30 @@ describe('App embed tests', () => {
|
|
|
1055
1149
|
discoveryExperience: {
|
|
1056
1150
|
listPageVersion: ListPage.ListWithUXChanges,
|
|
1057
1151
|
},
|
|
1058
|
-
}, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1152
|
+
}, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&listpageVersion=v3&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
1059
1153
|
});
|
|
1060
|
-
test('Should
|
|
1154
|
+
test('Should send navigationVersion=v3 & homepageVersion=v3 by default when no discoveryExperience is provided', async () => {
|
|
1061
1155
|
await testUrlParams({
|
|
1062
1156
|
...defaultViewConfig,
|
|
1063
|
-
}, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1157
|
+
}, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
1064
1158
|
});
|
|
1065
|
-
test('Should
|
|
1066
|
-
|
|
1159
|
+
test('Should not send modularHomeExperience param by default when not specified', async () => {
|
|
1160
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
1067
1161
|
...defaultViewConfig,
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1162
|
+
});
|
|
1163
|
+
appEmbed.render();
|
|
1164
|
+
await executeAfterWait(() => {
|
|
1165
|
+
const url = new URL(getIFrameSrc());
|
|
1166
|
+
expect(url.searchParams.has('modularHomeExperience')).toBe(false);
|
|
1167
|
+
});
|
|
1073
1168
|
});
|
|
1074
1169
|
test('Should add listpageVersion=v3 combined with other discoveryExperience options to the iframe src', async () => {
|
|
1075
1170
|
await testUrlParams({
|
|
1076
1171
|
...defaultViewConfig,
|
|
1077
1172
|
discoveryExperience: {
|
|
1078
|
-
primaryNavbarVersion: PrimaryNavbarVersion.Sliding,
|
|
1079
|
-
homePage: HomePage.Modular,
|
|
1080
1173
|
listPageVersion: ListPage.ListWithUXChanges,
|
|
1081
1174
|
},
|
|
1082
|
-
}, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1175
|
+
}, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3&listpageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
1083
1176
|
});
|
|
1084
1177
|
test('Should add enablePendoHelp flag to the iframe src conditional on navbar', async () => {
|
|
1085
1178
|
const appEmbed = new AppEmbed(getRootEl(), {
|
|
@@ -1087,7 +1180,7 @@ describe('App embed tests', () => {
|
|
|
1087
1180
|
});
|
|
1088
1181
|
appEmbed.render();
|
|
1089
1182
|
await executeAfterWait(() => {
|
|
1090
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?enablePendoHelp=true&embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1183
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?enablePendoHelp=true&embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
1091
1184
|
});
|
|
1092
1185
|
const noNavEmbed = new AppEmbed(getRootEl(), {
|
|
1093
1186
|
...defaultViewConfig,
|
|
@@ -1095,7 +1188,7 @@ describe('App embed tests', () => {
|
|
|
1095
1188
|
});
|
|
1096
1189
|
noNavEmbed.render();
|
|
1097
1190
|
await executeAfterWait(() => {
|
|
1098
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?enablePendoHelp=false&embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1191
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?enablePendoHelp=false&embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
1099
1192
|
});
|
|
1100
1193
|
});
|
|
1101
1194
|
test('should set enableLiveboardDataCache to true in url', async () => {
|
|
@@ -1105,7 +1198,7 @@ describe('App embed tests', () => {
|
|
|
1105
1198
|
});
|
|
1106
1199
|
appEmbed.render();
|
|
1107
1200
|
await executeAfterWait(() => {
|
|
1108
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableLiveboardDataCache=true${defaultParamsPost}#/home`);
|
|
1201
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableLiveboardDataCache=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
1109
1202
|
});
|
|
1110
1203
|
});
|
|
1111
1204
|
test('should set enableLiveboardDataCache to false in url', async () => {
|
|
@@ -1115,7 +1208,7 @@ describe('App embed tests', () => {
|
|
|
1115
1208
|
});
|
|
1116
1209
|
appEmbed.render();
|
|
1117
1210
|
await executeAfterWait(() => {
|
|
1118
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableLiveboardDataCache=false${defaultParamsPost}#/home`);
|
|
1211
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableLiveboardDataCache=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
1119
1212
|
});
|
|
1120
1213
|
});
|
|
1121
1214
|
test('should not set enableLiveboardDataCache in url when not provided', async () => {
|
|
@@ -1134,7 +1227,7 @@ describe('App embed tests', () => {
|
|
|
1134
1227
|
});
|
|
1135
1228
|
await appEmbed.render();
|
|
1136
1229
|
await executeAfterWait(() => {
|
|
1137
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1230
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&homePageSearchBarMode=objectSearch&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
1138
1231
|
});
|
|
1139
1232
|
});
|
|
1140
1233
|
test('Should add HomePageSearchBarMode flag with ai answer to the iframe src', async () => {
|
|
@@ -1144,7 +1237,7 @@ describe('App embed tests', () => {
|
|
|
1144
1237
|
});
|
|
1145
1238
|
await appEmbed.render();
|
|
1146
1239
|
await executeAfterWait(() => {
|
|
1147
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1240
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&homePageSearchBarMode=aiAnswer&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
1148
1241
|
});
|
|
1149
1242
|
});
|
|
1150
1243
|
test('Should add HomePageSearchBarMode flag with none to the iframe src', async () => {
|
|
@@ -1154,7 +1247,7 @@ describe('App embed tests', () => {
|
|
|
1154
1247
|
});
|
|
1155
1248
|
await appEmbed.render();
|
|
1156
1249
|
await executeAfterWait(() => {
|
|
1157
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1250
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&homePageSearchBarMode=none&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
1158
1251
|
});
|
|
1159
1252
|
});
|
|
1160
1253
|
test('Should add dataPanelCustomGroupsAccordionInitialState flag to the iframe src', async () => {
|
|
@@ -1164,7 +1257,7 @@ describe('App embed tests', () => {
|
|
|
1164
1257
|
});
|
|
1165
1258
|
appEmbed.render();
|
|
1166
1259
|
await executeAfterWait(() => {
|
|
1167
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&
|
|
1260
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&dataPanelCustomGroupsAccordionInitialState=EXPAND_FIRST&navigationVersion=v3&homepageVersion=v3${defaultParams}${defaultParamsPost}#/home`);
|
|
1168
1261
|
});
|
|
1169
1262
|
});
|
|
1170
1263
|
test('should register event handlers to adjust iframe height', async () => {
|
|
@@ -1216,7 +1309,7 @@ describe('App embed tests', () => {
|
|
|
1216
1309
|
});
|
|
1217
1310
|
await appEmbed.render();
|
|
1218
1311
|
appEmbed.navigateToPage(path);
|
|
1219
|
-
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&${defaultParamsForPinboardEmbed}${defaultParamsPost}#/${path}`);
|
|
1312
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3&${defaultParamsForPinboardEmbed}${defaultParamsPost}#/${path}`);
|
|
1220
1313
|
});
|
|
1221
1314
|
test('navigateToPage with noReload should trigger the appropriate event', async () => {
|
|
1222
1315
|
mockMessageChannel();
|
|
@@ -1844,4 +1937,80 @@ describe('AppEmbed visualOverrides tests', () => {
|
|
|
1844
1937
|
await testVisualOverridesInEmbed(appEmbed, visualOverrides);
|
|
1845
1938
|
});
|
|
1846
1939
|
});
|
|
1940
|
+
describe('AppEmbed getEmbedParamsObject', () => {
|
|
1941
|
+
beforeEach(() => {
|
|
1942
|
+
cleanUp();
|
|
1943
|
+
jest.spyOn(TsEmbed.prototype, 'getAppInitData').mockResolvedValue({});
|
|
1944
|
+
});
|
|
1945
|
+
afterEach(() => {
|
|
1946
|
+
jest.restoreAllMocks();
|
|
1947
|
+
});
|
|
1948
|
+
test('getEmbedParams should use getEmbedParamsObject internally', async () => {
|
|
1949
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
1950
|
+
...defaultViewConfig,
|
|
1951
|
+
fullHeight: true,
|
|
1952
|
+
});
|
|
1953
|
+
const getEmbedParamsObjectSpy = jest.spyOn(appEmbed, 'getEmbedParamsObject');
|
|
1954
|
+
await appEmbed.render();
|
|
1955
|
+
expect(getEmbedParamsObjectSpy).toHaveBeenCalled();
|
|
1956
|
+
});
|
|
1957
|
+
test('getEmbedParamsObject should contain isFullHeightPinboard when fullHeight is true', () => {
|
|
1958
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
1959
|
+
...defaultViewConfig,
|
|
1960
|
+
fullHeight: true,
|
|
1961
|
+
});
|
|
1962
|
+
const params = appEmbed.getEmbedParamsObject();
|
|
1963
|
+
expect(params.isFullHeightPinboard).toBe(true);
|
|
1964
|
+
expect(params.fullHeight).toBeUndefined();
|
|
1965
|
+
});
|
|
1966
|
+
test('getEmbedParamsObject should not contain isFullHeightPinboard when fullHeight is false', () => {
|
|
1967
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
1968
|
+
...defaultViewConfig,
|
|
1969
|
+
fullHeight: false,
|
|
1970
|
+
});
|
|
1971
|
+
const params = appEmbed.getEmbedParamsObject();
|
|
1972
|
+
expect(params.isFullHeightPinboard).toBeUndefined();
|
|
1973
|
+
});
|
|
1974
|
+
test('getUpdateEmbedParamsObject should contain isFullHeightPinboard when fullHeight is true', async () => {
|
|
1975
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
1976
|
+
...defaultViewConfig,
|
|
1977
|
+
fullHeight: true,
|
|
1978
|
+
});
|
|
1979
|
+
const params = await appEmbed.getUpdateEmbedParamsObject();
|
|
1980
|
+
expect(params.isFullHeightPinboard).toBe(true);
|
|
1981
|
+
});
|
|
1982
|
+
test('getUpdateEmbedParamsObject should not contain isFullHeightPinboard when fullHeight is false', async () => {
|
|
1983
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
1984
|
+
...defaultViewConfig,
|
|
1985
|
+
fullHeight: false,
|
|
1986
|
+
});
|
|
1987
|
+
const params = await appEmbed.getUpdateEmbedParamsObject();
|
|
1988
|
+
expect(params.isFullHeightPinboard).toBeUndefined();
|
|
1989
|
+
});
|
|
1990
|
+
});
|
|
1991
|
+
describe('AppEmbed updatedSpotterExperience tests', () => {
|
|
1992
|
+
beforeEach(() => {
|
|
1993
|
+
cleanUp();
|
|
1994
|
+
});
|
|
1995
|
+
test('should set updatedSpotterExperience to true in url', async () => {
|
|
1996
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
1997
|
+
...defaultViewConfig,
|
|
1998
|
+
updatedSpotterExperience: true,
|
|
1999
|
+
});
|
|
2000
|
+
appEmbed.render();
|
|
2001
|
+
await executeAfterWait(() => {
|
|
2002
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&updatedSpotterExperience=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
2003
|
+
});
|
|
2004
|
+
});
|
|
2005
|
+
test('should set updatedSpotterExperience to false in url', async () => {
|
|
2006
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
2007
|
+
...defaultViewConfig,
|
|
2008
|
+
updatedSpotterExperience: false,
|
|
2009
|
+
});
|
|
2010
|
+
appEmbed.render();
|
|
2011
|
+
await executeAfterWait(() => {
|
|
2012
|
+
expectUrlMatchesWithParams(getIFrameSrc(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&updatedSpotterExperience=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
|
|
2013
|
+
});
|
|
2014
|
+
});
|
|
2015
|
+
});
|
|
1847
2016
|
//# sourceMappingURL=app.spec.js.map
|