Skip to content

Commit e98108a

Browse files
SCAL-274111 Add test for undefined hideTagFilterChips and update parameter handling in AppEmbed
1 parent ec7c7fb commit e98108a

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

src/embed/app.spec.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,20 @@ describe('App embed tests', () => {
433433
});
434434
});
435435

436+
test('Should not add hideTagFilterChips if it is undefined', async () => {
437+
const appEmbed = new AppEmbed(getRootEl(), {
438+
...defaultViewConfig,
439+
showPrimaryNavbar: false,
440+
} as AppViewConfig);
441+
appEmbed.render();
442+
await executeAfterWait(() => {
443+
expectUrlMatchesWithParams(
444+
getIFrameSrc(),
445+
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}${defaultParamsPost}#/home`,
446+
);
447+
});
448+
});
449+
436450
test('Should add enableSearchAssist flagto the iframe src', async () => {
437451
const appEmbed = new AppEmbed(getRootEl(), {
438452
...defaultViewConfig,

src/embed/app.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,6 @@ export class AppEmbed extends V1Embed {
703703
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
704704
params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
705705
params[Param.LiveboardXLSXCSVDownload] = !!liveboardXLSXCSVDownload;
706-
params[Param.HideTagFilterChips] = hideTagFilterChips;
707706

708707
params = this.getBaseQueryParams(params);
709708

@@ -771,6 +770,10 @@ export class AppEmbed extends V1Embed {
771770
if (isPNGInScheduledEmailsEnabled !== undefined) {
772771
params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
773772
}
773+
774+
if (hideTagFilterChips !== undefined) {
775+
params[Param.HideTagFilterChips] = hideTagFilterChips;
776+
}
774777

775778
params[Param.DataPanelV2Enabled] = dataPanelV2;
776779
params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;

0 commit comments

Comments
 (0)