Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/embed/app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,21 @@ describe('App embed tests', () => {
});
});

test('Should add isUnifiedSearchExperienceEnabled flag to the iframe src', async () => {
const appEmbed = new AppEmbed(getRootEl(), {
...defaultViewConfig,
isUnifiedSearchExperienceEnabled: false,
} as AppViewConfig);

appEmbed.render();
await executeAfterWait(() => {
expectUrlMatchesWithParams(
getIFrameSrc(),
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=false${defaultParams}${defaultParamsPost}#/home`,
);
});
});

test('Should add showLiveboardVerifiedBadge flag to the iframe src', async () => {
const appEmbed = new AppEmbed(getRootEl(), {
...defaultViewConfig,
Expand Down
16 changes: 16 additions & 0 deletions src/embed/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,20 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
* ```
*/
showLiveboardReverifyBanner?: boolean;
/**
* This flag is used to enable unified search experience for full app embed.
* @type {boolean}
* @default true
* @version SDK: 1.34.0 | ThoughtSpot:10.5.0.cl
* @example
* ```js
* const embed = new AppEmbed('#embed-container', {
* ... // other options
* isUnifiedSearchExperienceEnabled: true,
* })
* ```
*/
isUnifiedSearchExperienceEnabled?: boolean;
}

/**
Expand Down Expand Up @@ -487,6 +501,7 @@ export class AppEmbed extends V1Embed {
showLiveboardVerifiedBadge = true,
showLiveboardReverifyBanner = true,
homePageSearchBarMode,
isUnifiedSearchExperienceEnabled = true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will make it enabled by default. Is that expected use-case?

} = this.viewConfig;

let params = {};
Expand All @@ -503,6 +518,7 @@ export class AppEmbed extends V1Embed {
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;

params = this.getBaseQueryParams(params);

Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3256,6 +3256,7 @@ export enum Param {
ShowLiveboardReverifyBanner = 'showLiveboardReverifyBanner',
LiveboardHeaderV2 = 'isLiveboardHeaderV2Enabled',
SpotterEnabled = 'isSpotterExperienceEnabled',
IsUnifiedSearchExperienceEnabled = 'isUnifiedSearchExperienceEnabled',
}

/**
Expand Down
Loading