Skip to content

Commit 6226a26

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

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
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;

static/typedoc/typedoc.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11914,7 +11914,7 @@
1191411914
"sources": [
1191511915
{
1191611916
"fileName": "embed/app.ts",
11917-
"line": 990,
11917+
"line": 993,
1191811918
"character": 11
1191911919
}
1192011920
],
@@ -12031,7 +12031,7 @@
1203112031
"sources": [
1203212032
{
1203312033
"fileName": "embed/app.ts",
12034-
"line": 859,
12034+
"line": 862,
1203512035
"character": 11
1203612036
}
1203712037
],
@@ -12368,7 +12368,7 @@
1236812368
"sources": [
1236912369
{
1237012370
"fileName": "embed/app.ts",
12371-
"line": 964,
12371+
"line": 967,
1237212372
"character": 11
1237312373
}
1237412374
],
@@ -12744,7 +12744,7 @@
1274412744
"sources": [
1274512745
{
1274612746
"fileName": "embed/app.ts",
12747-
"line": 1019,
12747+
"line": 1022,
1274812748
"character": 17
1274912749
}
1275012750
],

0 commit comments

Comments
 (0)