Skip to content

Commit c40505a

Browse files
authored
SCAL-276900 Added action for liveboardStylePanel (#327)
1 parent a88052e commit c40505a

File tree

3 files changed

+3118
-3139
lines changed

3 files changed

+3118
-3139
lines changed

src/embed/liveboard.spec.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
defaultParams,
1717
defaultParamsWithoutHiddenActions,
1818
expectUrlMatchesWithParams,
19+
expectUrlToHaveParamsWithValues,
1920
postMessageToParent,
2021
getIFrameEl,
2122
mockMessageChannel,
@@ -138,6 +139,20 @@ describe('Liveboard/viz embed tests', () => {
138139
});
139140
});
140141

142+
test('should set LiveboardStylePanel in visible actions', async () => {
143+
const liveboardEmbed = new LiveboardEmbed(getRootEl(), {
144+
visibleActions: [Action.LiveboardStylePanel],
145+
...defaultViewConfig,
146+
liveboardId,
147+
} as LiveboardViewConfig);
148+
liveboardEmbed.render();
149+
await executeAfterWait(() => {
150+
expectUrlToHaveParamsWithValues(getIFrameSrc(), {
151+
visibleAction: JSON.stringify([Action.LiveboardStylePanel]),
152+
});
153+
});
154+
});
155+
141156
test('should set enable2ColumnLayout to true in url', async () => {
142157
const liveboardEmbed = new LiveboardEmbed(getRootEl(), {
143158
enable2ColumnLayout: true,

src/types.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5709,6 +5709,16 @@ export enum Action {
57095709
* @version SDK: 1.42.0 | ThoughtSpot Cloud: 10.14.0.cl
57105710
*/
57115711
RemoveAttachment = 'removeAttachment',
5712+
/**
5713+
* The **Style panel** on a Liveboard.
5714+
* Controls the visibility of the Liveboard style panel.
5715+
* @example
5716+
* ```js
5717+
* hiddenActions: [Action.LiveboardStylePanel]
5718+
* ```
5719+
* @version SDK: 1.43.0 | ThoughtSpot Cloud: 10.15.0.cl
5720+
*/
5721+
LiveboardStylePanel = 'liveboardStylePanel',
57125722
}
57135723

57145724
export interface AnswerServiceType {

0 commit comments

Comments
 (0)