@thoughtspot/visual-embed-sdk 1.50.0 → 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.
Files changed (222) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/css-variables.d.ts +95 -0
  3. package/cjs/src/css-variables.d.ts.map +1 -1
  4. package/cjs/src/embed/app.d.ts +136 -15
  5. package/cjs/src/embed/app.d.ts.map +1 -1
  6. package/cjs/src/embed/app.js +59 -37
  7. package/cjs/src/embed/app.js.map +1 -1
  8. package/cjs/src/embed/app.spec.js +419 -149
  9. package/cjs/src/embed/app.spec.js.map +1 -1
  10. package/cjs/src/embed/conversation.d.ts +230 -1
  11. package/cjs/src/embed/conversation.d.ts.map +1 -1
  12. package/cjs/src/embed/conversation.js +30 -16
  13. package/cjs/src/embed/conversation.js.map +1 -1
  14. package/cjs/src/embed/conversation.spec.js +221 -17
  15. package/cjs/src/embed/conversation.spec.js.map +1 -1
  16. package/cjs/src/embed/events.spec.js +635 -0
  17. package/cjs/src/embed/events.spec.js.map +1 -1
  18. package/cjs/src/embed/host-events.spec.js +151 -0
  19. package/cjs/src/embed/host-events.spec.js.map +1 -1
  20. package/cjs/src/embed/hostEventClient/contracts.d.ts +51 -14
  21. package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  22. package/cjs/src/embed/hostEventClient/contracts.js +11 -1
  23. package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
  24. package/cjs/src/embed/hostEventClient/host-event-client.d.ts +1 -0
  25. package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  26. package/cjs/src/embed/hostEventClient/host-event-client.js +9 -0
  27. package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
  28. package/cjs/src/embed/hostEventClient/host-event-client.spec.js +218 -0
  29. package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  30. package/cjs/src/embed/hostEventClient/utils.d.ts +2 -0
  31. package/cjs/src/embed/hostEventClient/utils.d.ts.map +1 -1
  32. package/cjs/src/embed/hostEventClient/utils.js +32 -2
  33. package/cjs/src/embed/hostEventClient/utils.js.map +1 -1
  34. package/cjs/src/embed/hostEventClient/utils.spec.js +178 -0
  35. package/cjs/src/embed/hostEventClient/utils.spec.js.map +1 -1
  36. package/cjs/src/embed/liveboard.d.ts +42 -1
  37. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  38. package/cjs/src/embed/liveboard.js +26 -6
  39. package/cjs/src/embed/liveboard.js.map +1 -1
  40. package/cjs/src/embed/liveboard.spec.js +83 -2
  41. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  42. package/cjs/src/embed/spotter-utils.d.ts +8 -1
  43. package/cjs/src/embed/spotter-utils.d.ts.map +1 -1
  44. package/cjs/src/embed/spotter-utils.js +14 -1
  45. package/cjs/src/embed/spotter-utils.js.map +1 -1
  46. package/cjs/src/embed/spotter-utils.spec.js +61 -0
  47. package/cjs/src/embed/spotter-utils.spec.js.map +1 -1
  48. package/cjs/src/embed/spotter-viz-utils.d.ts +34 -0
  49. package/cjs/src/embed/spotter-viz-utils.d.ts.map +1 -1
  50. package/cjs/src/embed/spotter-viz-utils.js.map +1 -1
  51. package/cjs/src/embed/spotter-viz-utils.spec.js +17 -0
  52. package/cjs/src/embed/spotter-viz-utils.spec.js.map +1 -1
  53. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  54. package/cjs/src/embed/ts-embed.js +29 -7
  55. package/cjs/src/embed/ts-embed.js.map +1 -1
  56. package/cjs/src/embed/ts-embed.spec.js +146 -0
  57. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  58. package/cjs/src/errors.d.ts +1 -0
  59. package/cjs/src/errors.d.ts.map +1 -1
  60. package/cjs/src/errors.js +1 -0
  61. package/cjs/src/errors.js.map +1 -1
  62. package/cjs/src/index.d.ts +2 -2
  63. package/cjs/src/index.d.ts.map +1 -1
  64. package/cjs/src/index.js +3 -2
  65. package/cjs/src/index.js.map +1 -1
  66. package/cjs/src/mixpanel-service.d.ts +4 -0
  67. package/cjs/src/mixpanel-service.d.ts.map +1 -1
  68. package/cjs/src/mixpanel-service.js +4 -0
  69. package/cjs/src/mixpanel-service.js.map +1 -1
  70. package/cjs/src/react/util.spec.js +251 -0
  71. package/cjs/src/react/util.spec.js.map +1 -1
  72. package/cjs/src/types.d.ts +573 -11
  73. package/cjs/src/types.d.ts.map +1 -1
  74. package/cjs/src/types.js +519 -2
  75. package/cjs/src/types.js.map +1 -1
  76. package/cjs/src/utils/processData.spec.js +93 -0
  77. package/cjs/src/utils/processData.spec.js.map +1 -1
  78. package/cjs/src/utils/processTrigger.spec.js +61 -0
  79. package/cjs/src/utils/processTrigger.spec.js.map +1 -1
  80. package/dist/{index-B5xoN6Cp.js → index-aBzH5ZwF.js} +1 -1
  81. package/dist/src/css-variables.d.ts +95 -0
  82. package/dist/src/css-variables.d.ts.map +1 -1
  83. package/dist/src/embed/app.d.ts +136 -15
  84. package/dist/src/embed/app.d.ts.map +1 -1
  85. package/dist/src/embed/conversation.d.ts +230 -1
  86. package/dist/src/embed/conversation.d.ts.map +1 -1
  87. package/dist/src/embed/hostEventClient/contracts.d.ts +51 -14
  88. package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  89. package/dist/src/embed/hostEventClient/host-event-client.d.ts +1 -0
  90. package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  91. package/dist/src/embed/hostEventClient/utils.d.ts +2 -0
  92. package/dist/src/embed/hostEventClient/utils.d.ts.map +1 -1
  93. package/dist/src/embed/liveboard.d.ts +42 -1
  94. package/dist/src/embed/liveboard.d.ts.map +1 -1
  95. package/dist/src/embed/spotter-utils.d.ts +8 -1
  96. package/dist/src/embed/spotter-utils.d.ts.map +1 -1
  97. package/dist/src/embed/spotter-viz-utils.d.ts +34 -0
  98. package/dist/src/embed/spotter-viz-utils.d.ts.map +1 -1
  99. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  100. package/dist/src/errors.d.ts +1 -0
  101. package/dist/src/errors.d.ts.map +1 -1
  102. package/dist/src/index.d.ts +2 -2
  103. package/dist/src/index.d.ts.map +1 -1
  104. package/dist/src/mixpanel-service.d.ts +4 -0
  105. package/dist/src/mixpanel-service.d.ts.map +1 -1
  106. package/dist/src/types.d.ts +573 -11
  107. package/dist/src/types.d.ts.map +1 -1
  108. package/dist/tsembed-react.es.js +936 -142
  109. package/dist/tsembed-react.js +935 -141
  110. package/dist/tsembed.es.js +935 -142
  111. package/dist/tsembed.js +933 -140
  112. package/dist/visual-embed-sdk-react-full.d.ts +1147 -44
  113. package/dist/visual-embed-sdk-react.d.ts +1153 -46
  114. package/dist/visual-embed-sdk.d.ts +1161 -46
  115. package/lib/package.json +1 -1
  116. package/lib/src/css-variables.d.ts +95 -0
  117. package/lib/src/css-variables.d.ts.map +1 -1
  118. package/lib/src/embed/app.d.ts +136 -15
  119. package/lib/src/embed/app.d.ts.map +1 -1
  120. package/lib/src/embed/app.js +60 -38
  121. package/lib/src/embed/app.js.map +1 -1
  122. package/lib/src/embed/app.spec.js +420 -150
  123. package/lib/src/embed/app.spec.js.map +1 -1
  124. package/lib/src/embed/conversation.d.ts +230 -1
  125. package/lib/src/embed/conversation.d.ts.map +1 -1
  126. package/lib/src/embed/conversation.js +31 -17
  127. package/lib/src/embed/conversation.js.map +1 -1
  128. package/lib/src/embed/conversation.spec.js +222 -18
  129. package/lib/src/embed/conversation.spec.js.map +1 -1
  130. package/lib/src/embed/events.spec.js +635 -0
  131. package/lib/src/embed/events.spec.js.map +1 -1
  132. package/lib/src/embed/host-events.spec.js +152 -1
  133. package/lib/src/embed/host-events.spec.js.map +1 -1
  134. package/lib/src/embed/hostEventClient/contracts.d.ts +51 -14
  135. package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  136. package/lib/src/embed/hostEventClient/contracts.js +10 -0
  137. package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
  138. package/lib/src/embed/hostEventClient/host-event-client.d.ts +1 -0
  139. package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  140. package/lib/src/embed/hostEventClient/host-event-client.js +10 -1
  141. package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
  142. package/lib/src/embed/hostEventClient/host-event-client.spec.js +218 -0
  143. package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  144. package/lib/src/embed/hostEventClient/utils.d.ts +2 -0
  145. package/lib/src/embed/hostEventClient/utils.d.ts.map +1 -1
  146. package/lib/src/embed/hostEventClient/utils.js +28 -1
  147. package/lib/src/embed/hostEventClient/utils.js.map +1 -1
  148. package/lib/src/embed/hostEventClient/utils.spec.js +179 -1
  149. package/lib/src/embed/hostEventClient/utils.spec.js.map +1 -1
  150. package/lib/src/embed/liveboard.d.ts +42 -1
  151. package/lib/src/embed/liveboard.d.ts.map +1 -1
  152. package/lib/src/embed/liveboard.js +26 -6
  153. package/lib/src/embed/liveboard.js.map +1 -1
  154. package/lib/src/embed/liveboard.spec.js +83 -2
  155. package/lib/src/embed/liveboard.spec.js.map +1 -1
  156. package/lib/src/embed/spotter-utils.d.ts +8 -1
  157. package/lib/src/embed/spotter-utils.d.ts.map +1 -1
  158. package/lib/src/embed/spotter-utils.js +12 -0
  159. package/lib/src/embed/spotter-utils.js.map +1 -1
  160. package/lib/src/embed/spotter-utils.spec.js +62 -1
  161. package/lib/src/embed/spotter-utils.spec.js.map +1 -1
  162. package/lib/src/embed/spotter-viz-utils.d.ts +34 -0
  163. package/lib/src/embed/spotter-viz-utils.d.ts.map +1 -1
  164. package/lib/src/embed/spotter-viz-utils.js.map +1 -1
  165. package/lib/src/embed/spotter-viz-utils.spec.js +17 -0
  166. package/lib/src/embed/spotter-viz-utils.spec.js.map +1 -1
  167. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  168. package/lib/src/embed/ts-embed.js +29 -7
  169. package/lib/src/embed/ts-embed.js.map +1 -1
  170. package/lib/src/embed/ts-embed.spec.js +146 -0
  171. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  172. package/lib/src/errors.d.ts +1 -0
  173. package/lib/src/errors.d.ts.map +1 -1
  174. package/lib/src/errors.js +1 -0
  175. package/lib/src/errors.js.map +1 -1
  176. package/lib/src/index.d.ts +2 -2
  177. package/lib/src/index.d.ts.map +1 -1
  178. package/lib/src/index.js +2 -2
  179. package/lib/src/index.js.map +1 -1
  180. package/lib/src/mixpanel-service.d.ts +4 -0
  181. package/lib/src/mixpanel-service.d.ts.map +1 -1
  182. package/lib/src/mixpanel-service.js +4 -0
  183. package/lib/src/mixpanel-service.js.map +1 -1
  184. package/lib/src/react/util.spec.js +251 -0
  185. package/lib/src/react/util.spec.js.map +1 -1
  186. package/lib/src/types.d.ts +573 -11
  187. package/lib/src/types.d.ts.map +1 -1
  188. package/lib/src/types.js +519 -2
  189. package/lib/src/types.js.map +1 -1
  190. package/lib/src/utils/processData.spec.js +93 -0
  191. package/lib/src/utils/processData.spec.js.map +1 -1
  192. package/lib/src/utils/processTrigger.spec.js +61 -0
  193. package/lib/src/utils/processTrigger.spec.js.map +1 -1
  194. package/lib/src/visual-embed-sdk.d.ts +1161 -46
  195. package/package.json +1 -1
  196. package/src/css-variables.ts +118 -0
  197. package/src/embed/app.spec.ts +530 -183
  198. package/src/embed/app.ts +209 -66
  199. package/src/embed/conversation.spec.ts +275 -21
  200. package/src/embed/conversation.ts +262 -17
  201. package/src/embed/events.spec.ts +757 -1
  202. package/src/embed/host-events.spec.ts +194 -0
  203. package/src/embed/hostEventClient/contracts.ts +57 -14
  204. package/src/embed/hostEventClient/host-event-client.spec.ts +338 -0
  205. package/src/embed/hostEventClient/host-event-client.ts +16 -0
  206. package/src/embed/hostEventClient/utils.spec.ts +204 -0
  207. package/src/embed/hostEventClient/utils.ts +37 -10
  208. package/src/embed/liveboard.spec.ts +108 -2
  209. package/src/embed/liveboard.ts +82 -14
  210. package/src/embed/spotter-utils.spec.ts +68 -1
  211. package/src/embed/spotter-utils.ts +16 -1
  212. package/src/embed/spotter-viz-utils.spec.ts +17 -0
  213. package/src/embed/spotter-viz-utils.ts +34 -0
  214. package/src/embed/ts-embed.spec.ts +186 -0
  215. package/src/embed/ts-embed.ts +30 -4
  216. package/src/errors.ts +1 -0
  217. package/src/index.ts +3 -1
  218. package/src/mixpanel-service.ts +4 -0
  219. package/src/react/util.spec.tsx +255 -0
  220. package/src/types.ts +575 -8
  221. package/src/utils/processData.spec.ts +97 -0
  222. package/src/utils/processTrigger.spec.ts +91 -0
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const app_1 = require("./app");
5
+ const conversation_1 = require("./conversation");
5
6
  const index_1 = require("../index");
6
7
  const types_1 = require("../types");
7
8
  const test_utils_1 = require("../test/test-utils");
@@ -100,7 +101,7 @@ describe('App embed tests', () => {
100
101
  const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), defaultViewConfig);
101
102
  appEmbed.render();
102
103
  await (0, test_utils_1.executeAfterWait)(() => {
103
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
104
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
104
105
  });
105
106
  });
106
107
  test('should hide the primary nav bar', async () => {
@@ -110,7 +111,7 @@ describe('App embed tests', () => {
110
111
  });
111
112
  appEmbed.render();
112
113
  await (0, test_utils_1.executeAfterWait)(() => {
113
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
114
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
114
115
  });
115
116
  });
116
117
  test('should hide the help and profile buttons from nav bar', async () => {
@@ -120,7 +121,7 @@ describe('App embed tests', () => {
120
121
  });
121
122
  appEmbed.render();
122
123
  await (0, test_utils_1.executeAfterWait)(() => {
123
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=true${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
124
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=true&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
124
125
  });
125
126
  });
126
127
  test('should hide the application switcher button from nav bar', async () => {
@@ -130,7 +131,7 @@ describe('App embed tests', () => {
130
131
  });
131
132
  appEmbed.render();
132
133
  await (0, test_utils_1.executeAfterWait)(() => {
133
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&applicationSwitcherHidden=true${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
134
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&applicationSwitcherHidden=true&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
134
135
  });
135
136
  });
136
137
  test('should hide the org switcher button from nav bar', async () => {
@@ -140,7 +141,7 @@ describe('App embed tests', () => {
140
141
  });
141
142
  appEmbed.render();
142
143
  await (0, test_utils_1.executeAfterWait)(() => {
143
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&orgSwitcherHidden=true${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
144
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&orgSwitcherHidden=true&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
144
145
  });
145
146
  });
146
147
  describe('should render the correct routes for pages', () => {
@@ -153,6 +154,7 @@ describe('App embed tests', () => {
153
154
  [app_1.Page.Home]: 'home',
154
155
  [app_1.Page.SpotIQ]: 'insights/results',
155
156
  [app_1.Page.Monitor]: 'insights/monitor-alerts',
157
+ [app_1.Page.Collections]: 'collections',
156
158
  };
157
159
  const pageIds = Object.keys(pageRouteMap);
158
160
  for (let i = 0; i < pageIds.length; i++) {
@@ -165,7 +167,7 @@ describe('App embed tests', () => {
165
167
  });
166
168
  appEmbed.render();
167
169
  await (0, test_utils_1.executeAfterWait)(() => {
168
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${test_utils_1.defaultParams}${defaultParamsPost}#/${route}`);
170
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/${route}`);
169
171
  cleanUp();
170
172
  });
171
173
  });
@@ -179,6 +181,7 @@ describe('App embed tests', () => {
179
181
  [app_1.Page.Home]: 'home',
180
182
  [app_1.Page.SpotIQ]: 'home/spotiq-analysis',
181
183
  [app_1.Page.Monitor]: 'home/monitor-alerts',
184
+ [app_1.Page.Collections]: 'collections',
182
185
  };
183
186
  const pageIdsForModularHomes = Object.keys(pageRouteMapForModularHome);
184
187
  for (let i = 0; i < pageIdsForModularHomes.length; i++) {
@@ -192,7 +195,7 @@ describe('App embed tests', () => {
192
195
  });
193
196
  appEmbed.render();
194
197
  await (0, test_utils_1.executeAfterWait)(() => {
195
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${test_utils_1.defaultParams}${defaultParamsPost}#/${route}`);
198
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/${route}`);
196
199
  cleanUp();
197
200
  });
198
201
  });
@@ -205,7 +208,7 @@ describe('App embed tests', () => {
205
208
  });
206
209
  appEmbed.render();
207
210
  await (0, test_utils_1.executeAfterWait)(() => {
208
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${test_utils_1.defaultParams}${defaultParamsPost}#/foo/bar`);
211
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/foo/bar`);
209
212
  });
210
213
  });
211
214
  test('should apply runtime filters', async () => {
@@ -223,7 +226,7 @@ describe('App embed tests', () => {
223
226
  });
224
227
  appEmbed.render();
225
228
  await (0, test_utils_1.executeAfterWait)(() => {
226
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false&col1=sales&op1=EQ&val1=1000${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
229
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false&col1=sales&op1=EQ&val1=1000&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
227
230
  });
228
231
  });
229
232
  test('should not append runtime filters in URL if excludeRuntimeFiltersfromURL is true', async () => {
@@ -241,7 +244,7 @@ describe('App embed tests', () => {
241
244
  });
242
245
  appEmbed.render();
243
246
  await (0, test_utils_1.executeAfterWait)(() => {
244
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
247
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
245
248
  });
246
249
  });
247
250
  test('should append runtime filters in URL if excludeRuntimeFiltersfromURL is undefined', async () => {
@@ -260,7 +263,7 @@ describe('App embed tests', () => {
260
263
  appEmbed.render();
261
264
  const runtimeFilter = 'col1=sales&op1=EQ&val1=1000';
262
265
  await (0, test_utils_1.executeAfterWait)(() => {
263
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false${test_utils_1.defaultParams}${defaultParamsPost}&${runtimeFilter}#/home`);
266
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}&${runtimeFilter}#/home`);
264
267
  });
265
268
  });
266
269
  test('should disable and hide actions', async () => {
@@ -273,7 +276,7 @@ describe('App embed tests', () => {
273
276
  });
274
277
  appEmbed.render();
275
278
  await (0, test_utils_1.executeAfterWait)(() => {
276
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false&${test_utils_1.defaultParamsWithoutHiddenActions}&disableAction=[%22save%22,%22update%22]&disableHint=Access%20denied&hideAction=[%22${types_1.Action.ReportError}%22,%22download%22]${defaultParamsPost}#/home`);
279
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=false&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3&${test_utils_1.defaultParamsWithoutHiddenActions}&disableAction=[%22save%22,%22update%22]&disableHint=Access%20denied&hideAction=[%22${types_1.Action.ReportError}%22,%22download%22]${defaultParamsPost}#/home`);
277
280
  });
278
281
  });
279
282
  test('should set enable2ColumnLayout to true in url', async () => {
@@ -283,7 +286,7 @@ describe('App embed tests', () => {
283
286
  });
284
287
  appEmbed.render();
285
288
  await (0, test_utils_1.executeAfterWait)(() => {
286
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enable2ColumnLayout=true${defaultParamsPost}#/home`);
289
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enable2ColumnLayout=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
287
290
  });
288
291
  });
289
292
  test('should set coverAndFilterOptionInPDF to false in url', async () => {
@@ -293,7 +296,7 @@ describe('App embed tests', () => {
293
296
  });
294
297
  appEmbed.render();
295
298
  await (0, test_utils_1.executeAfterWait)(() => {
296
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&arePdfCoverFilterPageCheckboxesEnabled=false${defaultParamsPost}#/home`);
299
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&arePdfCoverFilterPageCheckboxesEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
297
300
  });
298
301
  });
299
302
  test('should set isLiveboardStylingAndGroupingEnabled to true in url (deprecated, use isLiveboardMasterpiecesEnabled)', async () => {
@@ -303,7 +306,7 @@ describe('App embed tests', () => {
303
306
  });
304
307
  appEmbed.render();
305
308
  await (0, test_utils_1.executeAfterWait)(() => {
306
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardStylingAndGroupingEnabled=true${defaultParamsPost}#/home`);
309
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardStylingAndGroupingEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
307
310
  });
308
311
  });
309
312
  test('should set isThisPeriodInDateFiltersEnabled to true in url', async () => {
@@ -313,7 +316,7 @@ describe('App embed tests', () => {
313
316
  });
314
317
  appEmbed.render();
315
318
  await (0, test_utils_1.executeAfterWait)(() => {
316
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isThisPeriodInDateFiltersEnabled=true${defaultParamsPost}#/home`);
319
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isThisPeriodInDateFiltersEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
317
320
  });
318
321
  });
319
322
  test('should set enableHomepageAnnouncement to true in url', async () => {
@@ -323,14 +326,14 @@ describe('App embed tests', () => {
323
326
  });
324
327
  appEmbed.render();
325
328
  await (0, test_utils_1.executeAfterWait)(() => {
326
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableHomepageAnnouncement=true${defaultParamsPost}#/home`);
329
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableHomepageAnnouncement=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
327
330
  });
328
331
  });
329
332
  test('should set enableHomepageAnnouncement to false in url when not provided in AppViewConfig', async () => {
330
333
  const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), defaultViewConfig);
331
334
  appEmbed.render();
332
335
  await (0, test_utils_1.executeAfterWait)(() => {
333
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableHomepageAnnouncement=false${defaultParamsPost}#/home`);
336
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableHomepageAnnouncement=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
334
337
  });
335
338
  });
336
339
  test('should set isPNGInScheduledEmailsEnabled to true in url', async () => {
@@ -340,7 +343,7 @@ describe('App embed tests', () => {
340
343
  });
341
344
  appEmbed.render();
342
345
  await (0, test_utils_1.executeAfterWait)(() => {
343
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isPNGInScheduledEmailsEnabled=true${defaultParamsPost}#/home`);
346
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isPNGInScheduledEmailsEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
344
347
  });
345
348
  });
346
349
  test('should set isWYSIWYGLiveboardPDFEnabled to true in url', async () => {
@@ -350,16 +353,16 @@ describe('App embed tests', () => {
350
353
  });
351
354
  appEmbed.render();
352
355
  await (0, test_utils_1.executeAfterWait)(() => {
353
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isWYSIWYGLiveboardPDFEnabled=true${defaultParamsPost}#/home`);
356
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isWYSIWYGLiveboardPDFEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
354
357
  });
355
358
  });
356
- test('should disable isWYSIWYGLiveboardPDFEnabled by default in url', async () => {
359
+ test('should not set isWYSIWYGLiveboardPDFEnabled in url by default', async () => {
357
360
  const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
358
361
  ...defaultViewConfig,
359
362
  });
360
363
  appEmbed.render();
361
364
  await (0, test_utils_1.executeAfterWait)(() => {
362
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isWYSIWYGLiveboardPDFEnabled=false${defaultParamsPost}#/home`);
365
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
363
366
  });
364
367
  });
365
368
  test('should set isLinkParametersEnabled to true in url', async () => {
@@ -369,7 +372,7 @@ describe('App embed tests', () => {
369
372
  });
370
373
  appEmbed.render();
371
374
  await (0, test_utils_1.executeAfterWait)(() => {
372
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLinkParametersEnabled=true${defaultParamsPost}#/home`);
375
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLinkParametersEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
373
376
  });
374
377
  });
375
378
  test('should set isLinkParametersEnabled to false in url', async () => {
@@ -379,7 +382,7 @@ describe('App embed tests', () => {
379
382
  });
380
383
  appEmbed.render();
381
384
  await (0, test_utils_1.executeAfterWait)(() => {
382
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLinkParametersEnabled=false${defaultParamsPost}#/home`);
385
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLinkParametersEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
383
386
  });
384
387
  });
385
388
  test('Should add homepageVersion=v4 and updatedSpotterChatPrompt=true when homePage is Focused to the iframe src', async () => {
@@ -388,7 +391,7 @@ describe('App embed tests', () => {
388
391
  discoveryExperience: {
389
392
  homePage: app_1.HomePage.Focused,
390
393
  },
391
- }, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&navigationVersion=v2&homepageVersion=v4&updatedSpotterChatPrompt=true${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
394
+ }, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v4&updatedSpotterChatPrompt=true${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
392
395
  });
393
396
  test('Should respect explicit updatedSpotterChatPrompt=false even when homePage is Focused', async () => {
394
397
  await testUrlParams({
@@ -397,7 +400,7 @@ describe('App embed tests', () => {
397
400
  homePage: app_1.HomePage.Focused,
398
401
  },
399
402
  updatedSpotterChatPrompt: false,
400
- }, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&navigationVersion=v2&homepageVersion=v4&updatedSpotterChatPrompt=false${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
403
+ }, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v4&updatedSpotterChatPrompt=false${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
401
404
  });
402
405
  test('should set isLiveboardXLSXCSVDownloadEnabled to true in url', async () => {
403
406
  const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
@@ -406,7 +409,7 @@ describe('App embed tests', () => {
406
409
  });
407
410
  appEmbed.render();
408
411
  await (0, test_utils_1.executeAfterWait)(() => {
409
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardXLSXCSVDownloadEnabled=true${defaultParamsPost}#/home`);
412
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardXLSXCSVDownloadEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
410
413
  });
411
414
  });
412
415
  test('should set updatedSpotterChatPrompt to true in url', async () => {
@@ -416,7 +419,7 @@ describe('App embed tests', () => {
416
419
  });
417
420
  appEmbed.render();
418
421
  await (0, test_utils_1.executeAfterWait)(() => {
419
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&updatedSpotterChatPrompt=true${defaultParamsPost}#/home`);
422
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&updatedSpotterChatPrompt=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
420
423
  });
421
424
  });
422
425
  test('should set updatedSpotterChatPrompt to false in url', async () => {
@@ -426,7 +429,46 @@ describe('App embed tests', () => {
426
429
  });
427
430
  appEmbed.render();
428
431
  await (0, test_utils_1.executeAfterWait)(() => {
429
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&updatedSpotterChatPrompt=false${defaultParamsPost}#/home`);
432
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&updatedSpotterChatPrompt=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
433
+ });
434
+ });
435
+ test('should set showSpotterRadiance to true in url', async () => {
436
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
437
+ ...defaultViewConfig,
438
+ showSpotterRadiance: true,
439
+ });
440
+ appEmbed.render();
441
+ await (0, test_utils_1.executeAfterWait)(() => {
442
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&showSpotterRadiance=true${defaultParamsPost}#/home`);
443
+ });
444
+ });
445
+ test('should set showSpotterRadiance to false in url', async () => {
446
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
447
+ ...defaultViewConfig,
448
+ showSpotterRadiance: false,
449
+ });
450
+ appEmbed.render();
451
+ await (0, test_utils_1.executeAfterWait)(() => {
452
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&showSpotterRadiance=false${defaultParamsPost}#/home`);
453
+ });
454
+ });
455
+ test('should set defaultQueryMode to research in url', async () => {
456
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
457
+ ...defaultViewConfig,
458
+ defaultQueryMode: conversation_1.SpotterQueryMode.RESEARCH,
459
+ });
460
+ appEmbed.render();
461
+ await (0, test_utils_1.executeAfterWait)(() => {
462
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&defaultQueryMode=research${defaultParamsPost}#/home`);
463
+ });
464
+ });
465
+ test('should not set defaultQueryMode in url when unset', async () => {
466
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
467
+ ...defaultViewConfig,
468
+ });
469
+ appEmbed.render();
470
+ await (0, test_utils_1.executeAfterWait)(() => {
471
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false${defaultParamsPost}#/home`);
430
472
  });
431
473
  });
432
474
  test('should set hideToolResponseCardBranding to true in url via spotterChatConfig', async () => {
@@ -438,7 +480,36 @@ describe('App embed tests', () => {
438
480
  });
439
481
  appEmbed.render();
440
482
  await (0, test_utils_1.executeAfterWait)(() => {
441
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&hideToolResponseCardBranding=true${defaultParamsPost}#/home`);
483
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&hideToolResponseCardBranding=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
484
+ });
485
+ });
486
+ test('should set spotterDataSources to a list of Model GUIDs in url', async () => {
487
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
488
+ ...defaultViewConfig,
489
+ spotterDataSources: ['model-guid-123', 'model-guid-456'],
490
+ });
491
+ appEmbed.render();
492
+ await (0, test_utils_1.executeAfterWait)(() => {
493
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&spotterDataSources=${encodeURIComponent(JSON.stringify(['model-guid-123', 'model-guid-456']))}${defaultParamsPost}#/home`);
494
+ });
495
+ });
496
+ test('should not add spotterDataSources to url when not provided', async () => {
497
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
498
+ ...defaultViewConfig,
499
+ });
500
+ appEmbed.render();
501
+ await (0, test_utils_1.executeAfterWait)(() => {
502
+ expect((0, test_utils_1.getIFrameSrc)()).not.toContain('spotterDataSources');
503
+ });
504
+ });
505
+ test('should not add spotterDataSources to url when empty array', async () => {
506
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
507
+ ...defaultViewConfig,
508
+ spotterDataSources: [],
509
+ });
510
+ appEmbed.render();
511
+ await (0, test_utils_1.executeAfterWait)(() => {
512
+ expect((0, test_utils_1.getIFrameSrc)()).not.toContain('spotterDataSources');
442
513
  });
443
514
  });
444
515
  test('should include spotterVizConfig in APP_INIT embedParams when spotterViz is provided', async () => {
@@ -548,6 +619,83 @@ describe('App embed tests', () => {
548
619
  });
549
620
  });
550
621
  });
622
+ test('should forward spotterChatPinConfig nested in spotterSidebarConfig in APP_INIT', async () => {
623
+ const spotterChatPinConfig = {
624
+ enabled: true,
625
+ pinLabel: 'Pin to top',
626
+ unpinLabel: 'Unpin',
627
+ };
628
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
629
+ ...defaultViewConfig,
630
+ spotterSidebarConfig: {
631
+ enablePastConversationsSidebar: true,
632
+ spotterChatPinConfig,
633
+ },
634
+ });
635
+ (0, test_utils_1.mockMessageChannel)();
636
+ appEmbed.render();
637
+ const mockPort = { postMessage: jest.fn() };
638
+ await (0, test_utils_1.executeAfterWait)(() => {
639
+ (0, test_utils_1.postMessageToParent)((0, test_utils_1.getIFrameEl)().contentWindow, { type: types_1.EmbedEvent.APP_INIT, data: {} }, mockPort);
640
+ });
641
+ await (0, test_utils_1.executeAfterWait)(() => {
642
+ expect(mockPort.postMessage).toHaveBeenCalledWith({
643
+ type: types_1.EmbedEvent.APP_INIT,
644
+ data: expect.objectContaining({
645
+ embedParams: expect.objectContaining({
646
+ spotterSidebarConfig: expect.objectContaining({
647
+ spotterChatPinConfig,
648
+ }),
649
+ }),
650
+ }),
651
+ });
652
+ });
653
+ });
654
+ test('should include spotterShareConversationConfig in APP_INIT embedParams when provided', async () => {
655
+ const spotterShareConversationConfig = {
656
+ enableShareConversation: true,
657
+ spotterShareLabel: 'Share',
658
+ spotterShareModalTitle: 'Share conversation',
659
+ };
660
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
661
+ ...defaultViewConfig,
662
+ spotterShareConversationConfig,
663
+ });
664
+ (0, test_utils_1.mockMessageChannel)();
665
+ appEmbed.render();
666
+ const mockPort = { postMessage: jest.fn() };
667
+ await (0, test_utils_1.executeAfterWait)(() => {
668
+ (0, test_utils_1.postMessageToParent)((0, test_utils_1.getIFrameEl)().contentWindow, { type: types_1.EmbedEvent.APP_INIT, data: {} }, mockPort);
669
+ });
670
+ await (0, test_utils_1.executeAfterWait)(() => {
671
+ expect(mockPort.postMessage).toHaveBeenCalledWith({
672
+ type: types_1.EmbedEvent.APP_INIT,
673
+ data: expect.objectContaining({
674
+ embedParams: expect.objectContaining({
675
+ spotterShareConversationConfig,
676
+ }),
677
+ }),
678
+ });
679
+ });
680
+ });
681
+ test('should not include spotterShareConversationConfig in APP_INIT when not provided', async () => {
682
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
683
+ ...defaultViewConfig,
684
+ });
685
+ (0, test_utils_1.mockMessageChannel)();
686
+ appEmbed.render();
687
+ const mockPort = { postMessage: jest.fn() };
688
+ await (0, test_utils_1.executeAfterWait)(() => {
689
+ (0, test_utils_1.postMessageToParent)((0, test_utils_1.getIFrameEl)().contentWindow, { type: types_1.EmbedEvent.APP_INIT, data: {} }, mockPort);
690
+ });
691
+ await (0, test_utils_1.executeAfterWait)(() => {
692
+ const callArgs = mockPort.postMessage.mock.calls[0][0];
693
+ expect(callArgs.type).toBe(types_1.EmbedEvent.APP_INIT);
694
+ if (callArgs.data.embedParams) {
695
+ expect(callArgs.data.embedParams.spotterShareConversationConfig).toBeUndefined();
696
+ }
697
+ });
698
+ });
551
699
  test('should set toolResponseCardBrandingLabel in url via spotterChatConfig', async () => {
552
700
  const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
553
701
  ...defaultViewConfig,
@@ -557,7 +705,7 @@ describe('App embed tests', () => {
557
705
  });
558
706
  appEmbed.render();
559
707
  await (0, test_utils_1.executeAfterWait)(() => {
560
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&toolResponseCardBrandingLabel=MyBrand${defaultParamsPost}#/home`);
708
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&toolResponseCardBrandingLabel=MyBrand&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
561
709
  });
562
710
  });
563
711
  test('should set spotterFileUploadEnabled to true in url', async () => {
@@ -567,7 +715,7 @@ describe('App embed tests', () => {
567
715
  });
568
716
  appEmbed.render();
569
717
  await (0, test_utils_1.executeAfterWait)(() => {
570
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&spotterFileUploadEnabled=true${defaultParamsPost}#/home`);
718
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&spotterFileUploadEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
571
719
  });
572
720
  });
573
721
  test('should set enableStarterPrompts to true in url', async () => {
@@ -599,7 +747,7 @@ describe('App embed tests', () => {
599
747
  });
600
748
  appEmbed.render();
601
749
  await (0, test_utils_1.executeAfterWait)(() => {
602
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardXLSXCSVDownloadEnabled=false${defaultParamsPost}#/home`);
750
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardXLSXCSVDownloadEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
603
751
  });
604
752
  });
605
753
  test('should set isGranularXLSXCSVSchedulesEnabled to true in url', async () => {
@@ -609,7 +757,7 @@ describe('App embed tests', () => {
609
757
  });
610
758
  appEmbed.render();
611
759
  await (0, test_utils_1.executeAfterWait)(() => {
612
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isGranularXLSXCSVSchedulesEnabled=true${defaultParamsPost}#/home`);
760
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isGranularXLSXCSVSchedulesEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
613
761
  });
614
762
  });
615
763
  test('should set isGranularXLSXCSVSchedulesEnabled to false in url', async () => {
@@ -619,7 +767,7 @@ describe('App embed tests', () => {
619
767
  });
620
768
  appEmbed.render();
621
769
  await (0, test_utils_1.executeAfterWait)(() => {
622
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isGranularXLSXCSVSchedulesEnabled=false${defaultParamsPost}#/home`);
770
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isGranularXLSXCSVSchedulesEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
623
771
  });
624
772
  });
625
773
  test('should set isCentralizedLiveboardFilterUXEnabled to true in url', async () => {
@@ -629,7 +777,7 @@ describe('App embed tests', () => {
629
777
  });
630
778
  appEmbed.render();
631
779
  await (0, test_utils_1.executeAfterWait)(() => {
632
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isCentralizedLiveboardFilterUXEnabled=true${defaultParamsPost}#/home`);
780
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isCentralizedLiveboardFilterUXEnabled=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
633
781
  });
634
782
  });
635
783
  test('should set isCentralizedLiveboardFilterUXEnabled to false in url', async () => {
@@ -639,7 +787,36 @@ describe('App embed tests', () => {
639
787
  });
640
788
  appEmbed.render();
641
789
  await (0, test_utils_1.executeAfterWait)(() => {
642
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isCentralizedLiveboardFilterUXEnabled=false${defaultParamsPost}#/home`);
790
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isCentralizedLiveboardFilterUXEnabled=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
791
+ });
792
+ });
793
+ test('should set isScopedLiveboardFilteringEnabled to true in url', async () => {
794
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
795
+ ...defaultViewConfig,
796
+ isScopedLiveboardFilteringEnabled: true,
797
+ });
798
+ appEmbed.render();
799
+ await (0, test_utils_1.executeAfterWait)(() => {
800
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isScopedLiveboardFilteringEnabled=true${defaultParamsPost}#/home`);
801
+ });
802
+ });
803
+ test('should set isScopedLiveboardFilteringEnabled to false in url', async () => {
804
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
805
+ ...defaultViewConfig,
806
+ isScopedLiveboardFilteringEnabled: false,
807
+ });
808
+ appEmbed.render();
809
+ await (0, test_utils_1.executeAfterWait)(() => {
810
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isScopedLiveboardFilteringEnabled=false${defaultParamsPost}#/home`);
811
+ });
812
+ });
813
+ test('should not set isScopedLiveboardFilteringEnabled in url when undefined', async () => {
814
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
815
+ ...defaultViewConfig,
816
+ });
817
+ appEmbed.render();
818
+ await (0, test_utils_1.executeAfterWait)(() => {
819
+ expect((0, test_utils_1.getIFrameSrc)()).not.toContain('isScopedLiveboardFilteringEnabled');
643
820
  });
644
821
  });
645
822
  test('Should add the tag to the iframe src', async () => {
@@ -650,7 +827,7 @@ describe('App embed tests', () => {
650
827
  });
651
828
  appEmbed.render();
652
829
  await (0, test_utils_1.executeAfterWait)(() => {
653
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${test_utils_1.defaultParams}&tag=Finance${defaultParamsPost}#/home`);
830
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}&tag=Finance${defaultParamsPost}#/home`);
654
831
  });
655
832
  });
656
833
  test('Should add the hideTagFilterChips true to the iframe src', async () => {
@@ -661,7 +838,7 @@ describe('App embed tests', () => {
661
838
  });
662
839
  appEmbed.render();
663
840
  await (0, test_utils_1.executeAfterWait)(() => {
664
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${test_utils_1.defaultParams}&hideTagFilterChips=true${defaultParamsPost}#/home`);
841
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}&hideTagFilterChips=true${defaultParamsPost}#/home`);
665
842
  });
666
843
  });
667
844
  test('Should add the hideTagFilterChips false to the iframe src', async () => {
@@ -672,7 +849,7 @@ describe('App embed tests', () => {
672
849
  });
673
850
  appEmbed.render();
674
851
  await (0, test_utils_1.executeAfterWait)(() => {
675
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${test_utils_1.defaultParams}&hideTagFilterChips=false${defaultParamsPost}#/home`);
852
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}&hideTagFilterChips=false${defaultParamsPost}#/home`);
676
853
  });
677
854
  });
678
855
  test('Should not add hideTagFilterChips if it is undefined', async () => {
@@ -682,7 +859,7 @@ describe('App embed tests', () => {
682
859
  });
683
860
  appEmbed.render();
684
861
  await (0, test_utils_1.executeAfterWait)(() => {
685
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
862
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
686
863
  });
687
864
  });
688
865
  test('Should add showMaskedFilterChip true to the iframe src', async () => {
@@ -693,7 +870,7 @@ describe('App embed tests', () => {
693
870
  });
694
871
  appEmbed.render();
695
872
  await (0, test_utils_1.executeAfterWait)(() => {
696
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showMaskedFilterChip=true${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
873
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showMaskedFilterChip=true&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
697
874
  });
698
875
  });
699
876
  test('Should add showMaskedFilterChip false to the iframe src', async () => {
@@ -704,7 +881,7 @@ describe('App embed tests', () => {
704
881
  });
705
882
  appEmbed.render();
706
883
  await (0, test_utils_1.executeAfterWait)(() => {
707
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showMaskedFilterChip=false${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
884
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showMaskedFilterChip=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
708
885
  });
709
886
  });
710
887
  test('Should add default showMaskedFilterChip false when not specified', async () => {
@@ -714,7 +891,7 @@ describe('App embed tests', () => {
714
891
  });
715
892
  appEmbed.render();
716
893
  await (0, test_utils_1.executeAfterWait)(() => {
717
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showMaskedFilterChip=false${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
894
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showMaskedFilterChip=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
718
895
  });
719
896
  });
720
897
  test('Should add isLiveboardMasterpiecesEnabled true to the iframe src', async () => {
@@ -725,7 +902,7 @@ describe('App embed tests', () => {
725
902
  });
726
903
  appEmbed.render();
727
904
  await (0, test_utils_1.executeAfterWait)(() => {
728
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardMasterpiecesEnabled=true${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
905
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardMasterpiecesEnabled=true&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
729
906
  });
730
907
  });
731
908
  test('Should add isLiveboardMasterpiecesEnabled false to the iframe src', async () => {
@@ -736,17 +913,7 @@ describe('App embed tests', () => {
736
913
  });
737
914
  appEmbed.render();
738
915
  await (0, test_utils_1.executeAfterWait)(() => {
739
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardMasterpiecesEnabled=false${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
740
- });
741
- });
742
- test('Should add default isLiveboardMasterpiecesEnabled false when not specified', async () => {
743
- const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
744
- ...defaultViewConfig,
745
- showPrimaryNavbar: false,
746
- });
747
- appEmbed.render();
748
- await (0, test_utils_1.executeAfterWait)(() => {
749
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardMasterpiecesEnabled=false${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
916
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardMasterpiecesEnabled=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
750
917
  });
751
918
  });
752
919
  test('Should add newChartsLibrary true to the iframe src', async () => {
@@ -757,7 +924,7 @@ describe('App embed tests', () => {
757
924
  });
758
925
  appEmbed.render();
759
926
  await (0, test_utils_1.executeAfterWait)(() => {
760
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&muzeChartPhase1EnabledGA=true${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
927
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&muzeChartPhase1EnabledGA=true&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
761
928
  });
762
929
  });
763
930
  test('Should add newChartsLibrary false to the iframe src', async () => {
@@ -768,7 +935,7 @@ describe('App embed tests', () => {
768
935
  });
769
936
  appEmbed.render();
770
937
  await (0, test_utils_1.executeAfterWait)(() => {
771
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&muzeChartPhase1EnabledGA=false${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
938
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&muzeChartPhase1EnabledGA=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
772
939
  });
773
940
  });
774
941
  test('Should not add newChartsLibrary to the iframe src when not specified', async () => {
@@ -778,7 +945,7 @@ describe('App embed tests', () => {
778
945
  });
779
946
  appEmbed.render();
780
947
  await (0, test_utils_1.executeAfterWait)(() => {
781
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
948
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
782
949
  });
783
950
  });
784
951
  test('Should add enableSearchAssist flagto the iframe src', async () => {
@@ -788,7 +955,7 @@ describe('App embed tests', () => {
788
955
  });
789
956
  appEmbed.render();
790
957
  await (0, test_utils_1.executeAfterWait)(() => {
791
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&enableSearchAssist=true${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
958
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&enableSearchAssist=true&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
792
959
  });
793
960
  });
794
961
  test('Should add enableDataPanelV2 flag to the iframe src', async () => {
@@ -798,7 +965,7 @@ describe('App embed tests', () => {
798
965
  });
799
966
  appEmbed.render();
800
967
  await (0, test_utils_1.executeAfterWait)(() => {
801
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&enableDataPanelV2=true${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
968
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&enableDataPanelV2=true&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
802
969
  });
803
970
  });
804
971
  test('Should add isLiveboardHeaderSticky flag to the iframe src', async () => {
@@ -808,7 +975,7 @@ describe('App embed tests', () => {
808
975
  });
809
976
  appEmbed.render();
810
977
  await (0, test_utils_1.executeAfterWait)(() => {
811
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardHeaderSticky=false${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
978
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardHeaderSticky=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
812
979
  });
813
980
  });
814
981
  test('Should add isLiveboardCompactHeaderEnabled flag to the iframe src', async () => {
@@ -818,7 +985,7 @@ describe('App embed tests', () => {
818
985
  });
819
986
  appEmbed.render();
820
987
  await (0, test_utils_1.executeAfterWait)(() => {
821
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardHeaderV2Enabled=false${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
988
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardHeaderV2Enabled=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
822
989
  });
823
990
  });
824
991
  test('Should add showLiveboardReverifyBanner flag to the iframe src', async () => {
@@ -828,7 +995,7 @@ describe('App embed tests', () => {
828
995
  });
829
996
  appEmbed.render();
830
997
  await (0, test_utils_1.executeAfterWait)(() => {
831
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showLiveboardReverifyBanner=false${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
998
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showLiveboardReverifyBanner=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
832
999
  });
833
1000
  });
834
1001
  test('Should add isUnifiedSearchExperienceEnabled flag to the iframe src', async () => {
@@ -839,7 +1006,7 @@ describe('App embed tests', () => {
839
1006
  });
840
1007
  appEmbedTrue.render();
841
1008
  await (0, test_utils_1.executeAfterWait)(() => {
842
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=true${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1009
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=true&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
843
1010
  });
844
1011
  appEmbedTrue.destroy();
845
1012
  // Case 2: explicitly false
@@ -849,7 +1016,7 @@ describe('App embed tests', () => {
849
1016
  });
850
1017
  appEmbedFalse.render();
851
1018
  await (0, test_utils_1.executeAfterWait)(() => {
852
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=false${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1019
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
853
1020
  });
854
1021
  appEmbedFalse.destroy();
855
1022
  // Case 3: not provided — defaults to false
@@ -858,7 +1025,7 @@ describe('App embed tests', () => {
858
1025
  });
859
1026
  appEmbedDefault.render();
860
1027
  await (0, test_utils_1.executeAfterWait)(() => {
861
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=true${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1028
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isUnifiedSearchExperienceEnabled=true&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
862
1029
  });
863
1030
  });
864
1031
  test('should set newConnectionsExperience to true in url', async () => {
@@ -897,7 +1064,7 @@ describe('App embed tests', () => {
897
1064
  });
898
1065
  appEmbed.render();
899
1066
  await (0, test_utils_1.executeAfterWait)(() => {
900
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&hideIrrelevantFiltersAtTabLevel=false${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1067
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&hideIrrelevantFiltersAtTabLevel=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
901
1068
  });
902
1069
  });
903
1070
  test('Should add showLiveboardVerifiedBadge flag to the iframe src', async () => {
@@ -907,7 +1074,7 @@ describe('App embed tests', () => {
907
1074
  });
908
1075
  appEmbed.render();
909
1076
  await (0, test_utils_1.executeAfterWait)(() => {
910
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showLiveboardVerifiedBadge=false${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1077
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&showLiveboardVerifiedBadge=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
911
1078
  });
912
1079
  });
913
1080
  test('Should add isLiveboardPermissionV2Enabled flag to the iframe src', async () => {
@@ -917,7 +1084,7 @@ describe('App embed tests', () => {
917
1084
  });
918
1085
  appEmbed.render();
919
1086
  await (0, test_utils_1.executeAfterWait)(() => {
920
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardPermissionV2Enabled=false${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1087
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardPermissionV2Enabled=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
921
1088
  });
922
1089
  });
923
1090
  test('Should add default values of flags to the iframe src', async () => {
@@ -926,7 +1093,7 @@ describe('App embed tests', () => {
926
1093
  });
927
1094
  appEmbed.render();
928
1095
  await (0, test_utils_1.executeAfterWait)(() => {
929
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardHeaderSticky=true&hideLiveboardHeader=false&showLiveboardDescription=true&showLiveboardTitle=true${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1096
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&isLiveboardHeaderSticky=true&hideLiveboardHeader=false&showLiveboardDescription=true&showLiveboardTitle=true&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
930
1097
  });
931
1098
  });
932
1099
  test('Should add modularHomeExperience flag to the iframe src', async () => {
@@ -936,7 +1103,7 @@ describe('App embed tests', () => {
936
1103
  });
937
1104
  appEmbed.render();
938
1105
  await (0, test_utils_1.executeAfterWait)(() => {
939
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1106
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
940
1107
  });
941
1108
  });
942
1109
  test('Should add hideHomepageLeftNav flag to the iframe src', async () => {
@@ -946,7 +1113,7 @@ describe('App embed tests', () => {
946
1113
  });
947
1114
  appEmbed.render();
948
1115
  await (0, test_utils_1.executeAfterWait)(() => {
949
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&hideHomepageLeftNav=false${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1116
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&hideHomepageLeftNav=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
950
1117
  });
951
1118
  });
952
1119
  test('Should add hideHamburger, hideObjectSearch, hideNotification flags to the iframe src', async () => {
@@ -958,7 +1125,7 @@ describe('App embed tests', () => {
958
1125
  });
959
1126
  appEmbed.render();
960
1127
  await (0, test_utils_1.executeAfterWait)(() => {
961
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&hideHamburger=true&hideObjectSearch=true&hideNotification=true${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1128
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&hideHamburger=true&hideObjectSearch=true&hideNotification=true&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
962
1129
  });
963
1130
  });
964
1131
  test('Should not add when hideHamburger, hideObjectSearch, hideNotification values are not true to the iframe src', async () => {
@@ -970,65 +1137,14 @@ describe('App embed tests', () => {
970
1137
  });
971
1138
  appEmbed.render();
972
1139
  await (0, test_utils_1.executeAfterWait)(() => {
973
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1140
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
974
1141
  });
975
1142
  });
976
- test('Should add navigationVersion=v3 when primaryNavbarVersion is Sliding to the iframe src', async () => {
977
- await testUrlParams({
978
- ...defaultViewConfig,
979
- discoveryExperience: {
980
- primaryNavbarVersion: app_1.PrimaryNavbarVersion.Sliding,
981
- homePage: app_1.HomePage.Modular,
982
- },
983
- }, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true&navigationVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
984
- });
985
- test('Should not add navigationVersion=v3 when primaryNavbarVersion is not added to the iframe src', async () => {
986
- await testUrlParams({
987
- ...defaultViewConfig,
988
- discoveryExperience: {
989
- homePage: app_1.HomePage.Modular,
990
- },
991
- }, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
992
- });
993
- test('Should add navigationVersion=v3 & modularHomeExperience=true when primaryNavbarVersion is Sliding to the iframe src', async () => {
994
- await testUrlParams({
995
- ...defaultViewConfig,
996
- // homePage v2 config not included under discoveryExperience
997
- discoveryExperience: {
998
- primaryNavbarVersion: app_1.PrimaryNavbarVersion.Sliding,
999
- },
1000
- }, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true&navigationVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1001
- });
1002
- test('Should add homepageVersion=v3 & navigationVersion=v3 & modularHomeExperience=true when Sliding and ModularWithStylingChanges configured in the iframe src', async () => {
1003
- await testUrlParams({
1004
- ...defaultViewConfig,
1005
- discoveryExperience: {
1006
- primaryNavbarVersion: app_1.PrimaryNavbarVersion.Sliding,
1007
- homePage: app_1.HomePage.ModularWithStylingChanges,
1008
- },
1009
- }, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1010
- });
1011
- test('Should add homepageVersion=v3 & navigationVersion=v3 & modularHomeExperience=true when homePage is ModularWithStylingChanges to the iframe src', async () => {
1012
- await testUrlParams({
1013
- ...defaultViewConfig,
1014
- // primaryNavbarVersion is not included under
1015
- // discoveryExperience, then it set navigationVersion=v2 and
1016
- // modularHomeExperience=false.
1017
- discoveryExperience: {
1018
- homePage: app_1.HomePage.ModularWithStylingChanges,
1019
- },
1020
- }, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&navigationVersion=v2&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1021
- });
1022
- test('Should add navigationVersion=v2 when primaryNavbarVersion is not added to the iframe src', async () => {
1023
- await testUrlParams({
1024
- ...defaultViewConfig,
1025
- }, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&navigationVersion=v2${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1026
- });
1027
1143
  test('Should add enableAskSage flag to the iframe src', async () => {
1028
1144
  await testUrlParams({
1029
1145
  ...defaultViewConfig,
1030
1146
  enableAskSage: true,
1031
- }, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&enableAskSage=true${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1147
+ }, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&enableAskSage=true&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1032
1148
  });
1033
1149
  test('Should add listpageVersion=v3 when listPageVersion is ListWithUXChanges to the iframe src', async () => {
1034
1150
  await testUrlParams({
@@ -1036,31 +1152,30 @@ describe('App embed tests', () => {
1036
1152
  discoveryExperience: {
1037
1153
  listPageVersion: app_1.ListPage.ListWithUXChanges,
1038
1154
  },
1039
- }, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&listpageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1155
+ }, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&listpageVersion=v3&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1040
1156
  });
1041
- test('Should add listpageVersion=v2 by default when no discoveryExperience is provided', async () => {
1157
+ test('Should send navigationVersion=v3 & homepageVersion=v3 by default when no discoveryExperience is provided', async () => {
1042
1158
  await testUrlParams({
1043
1159
  ...defaultViewConfig,
1044
- }, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&navigationVersion=v2${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1160
+ }, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1045
1161
  });
1046
- test('Should add listpageVersion=v2 by default when discoveryExperience is provided but listPageVersion is not specified', async () => {
1047
- await testUrlParams({
1162
+ test('Should not send modularHomeExperience param by default when not specified', async () => {
1163
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
1048
1164
  ...defaultViewConfig,
1049
- discoveryExperience: {
1050
- primaryNavbarVersion: app_1.PrimaryNavbarVersion.Sliding,
1051
- homePage: app_1.HomePage.Modular,
1052
- },
1053
- }, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true&navigationVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1165
+ });
1166
+ appEmbed.render();
1167
+ await (0, test_utils_1.executeAfterWait)(() => {
1168
+ const url = new URL((0, test_utils_1.getIFrameSrc)());
1169
+ expect(url.searchParams.has('modularHomeExperience')).toBe(false);
1170
+ });
1054
1171
  });
1055
1172
  test('Should add listpageVersion=v3 combined with other discoveryExperience options to the iframe src', async () => {
1056
1173
  await testUrlParams({
1057
1174
  ...defaultViewConfig,
1058
1175
  discoveryExperience: {
1059
- primaryNavbarVersion: app_1.PrimaryNavbarVersion.Sliding,
1060
- homePage: app_1.HomePage.Modular,
1061
1176
  listPageVersion: app_1.ListPage.ListWithUXChanges,
1062
1177
  },
1063
- }, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=true&navigationVersion=v3&listpageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1178
+ }, `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3&listpageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1064
1179
  });
1065
1180
  test('Should add enablePendoHelp flag to the iframe src conditional on navbar', async () => {
1066
1181
  const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
@@ -1068,7 +1183,7 @@ describe('App embed tests', () => {
1068
1183
  });
1069
1184
  appEmbed.render();
1070
1185
  await (0, test_utils_1.executeAfterWait)(() => {
1071
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?enablePendoHelp=true&embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1186
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?enablePendoHelp=true&embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1072
1187
  });
1073
1188
  const noNavEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
1074
1189
  ...defaultViewConfig,
@@ -1076,7 +1191,7 @@ describe('App embed tests', () => {
1076
1191
  });
1077
1192
  noNavEmbed.render();
1078
1193
  await (0, test_utils_1.executeAfterWait)(() => {
1079
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?enablePendoHelp=false&embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1194
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?enablePendoHelp=false&embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1080
1195
  });
1081
1196
  });
1082
1197
  test('should set enableLiveboardDataCache to true in url', async () => {
@@ -1086,7 +1201,7 @@ describe('App embed tests', () => {
1086
1201
  });
1087
1202
  appEmbed.render();
1088
1203
  await (0, test_utils_1.executeAfterWait)(() => {
1089
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableLiveboardDataCache=true${defaultParamsPost}#/home`);
1204
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableLiveboardDataCache=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
1090
1205
  });
1091
1206
  });
1092
1207
  test('should set enableLiveboardDataCache to false in url', async () => {
@@ -1096,7 +1211,7 @@ describe('App embed tests', () => {
1096
1211
  });
1097
1212
  appEmbed.render();
1098
1213
  await (0, test_utils_1.executeAfterWait)(() => {
1099
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableLiveboardDataCache=false${defaultParamsPost}#/home`);
1214
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableLiveboardDataCache=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
1100
1215
  });
1101
1216
  });
1102
1217
  test('should not set enableLiveboardDataCache in url when not provided', async () => {
@@ -1115,7 +1230,7 @@ describe('App embed tests', () => {
1115
1230
  });
1116
1231
  await appEmbed.render();
1117
1232
  await (0, test_utils_1.executeAfterWait)(() => {
1118
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&homePageSearchBarMode=objectSearch${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1233
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&homePageSearchBarMode=objectSearch&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1119
1234
  });
1120
1235
  });
1121
1236
  test('Should add HomePageSearchBarMode flag with ai answer to the iframe src', async () => {
@@ -1125,7 +1240,7 @@ describe('App embed tests', () => {
1125
1240
  });
1126
1241
  await appEmbed.render();
1127
1242
  await (0, test_utils_1.executeAfterWait)(() => {
1128
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&homePageSearchBarMode=aiAnswer${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1243
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&homePageSearchBarMode=aiAnswer&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1129
1244
  });
1130
1245
  });
1131
1246
  test('Should add HomePageSearchBarMode flag with none to the iframe src', async () => {
@@ -1135,7 +1250,7 @@ describe('App embed tests', () => {
1135
1250
  });
1136
1251
  await appEmbed.render();
1137
1252
  await (0, test_utils_1.executeAfterWait)(() => {
1138
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&homePageSearchBarMode=none${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1253
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&homePageSearchBarMode=none&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1139
1254
  });
1140
1255
  });
1141
1256
  test('Should add dataPanelCustomGroupsAccordionInitialState flag to the iframe src', async () => {
@@ -1145,7 +1260,7 @@ describe('App embed tests', () => {
1145
1260
  });
1146
1261
  appEmbed.render();
1147
1262
  await (0, test_utils_1.executeAfterWait)(() => {
1148
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&modularHomeExperience=false&dataPanelCustomGroupsAccordionInitialState=EXPAND_FIRST${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1263
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&dataPanelCustomGroupsAccordionInitialState=EXPAND_FIRST&navigationVersion=v3&homepageVersion=v3${test_utils_1.defaultParams}${defaultParamsPost}#/home`);
1149
1264
  });
1150
1265
  });
1151
1266
  test('should register event handlers to adjust iframe height', async () => {
@@ -1197,7 +1312,7 @@ describe('App embed tests', () => {
1197
1312
  });
1198
1313
  await appEmbed.render();
1199
1314
  appEmbed.navigateToPage(path);
1200
- (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&${test_utils_1.defaultParamsForPinboardEmbed}${defaultParamsPost}#/${path}`);
1315
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&navigationVersion=v3&homepageVersion=v3&${test_utils_1.defaultParamsForPinboardEmbed}${defaultParamsPost}#/${path}`);
1201
1316
  });
1202
1317
  test('navigateToPage with noReload should trigger the appropriate event', async () => {
1203
1318
  (0, test_utils_1.mockMessageChannel)();
@@ -1245,6 +1360,85 @@ describe('App embed tests', () => {
1245
1360
  await appEmbed.render();
1246
1361
  expect(logger_1.logger.log).toHaveBeenCalledWith('Please call render before invoking this method');
1247
1362
  });
1363
+ describe('overrideHistoryState flag', () => {
1364
+ test('navigateToPage with overrideHistoryState=true should trigger HostEvent.Navigate', async () => {
1365
+ (0, test_utils_1.mockMessageChannel)();
1366
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
1367
+ frameParams: {
1368
+ width: '100%',
1369
+ height: '100%',
1370
+ },
1371
+ overrideHistoryState: true,
1372
+ });
1373
+ await appEmbed.render();
1374
+ const iframe = (0, test_utils_1.getIFrameEl)();
1375
+ iframe.contentWindow.postMessage = jest.fn();
1376
+ appEmbed.navigateToPage(path, false);
1377
+ expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({
1378
+ type: types_1.HostEvent.Navigate,
1379
+ data: path,
1380
+ }), `http://${thoughtSpotHost}`, expect.anything());
1381
+ });
1382
+ test('navigateToPage with overrideHistoryState=true and path as number should trigger HostEvent.Navigate', async () => {
1383
+ (0, test_utils_1.mockMessageChannel)();
1384
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
1385
+ frameParams: {
1386
+ width: '100%',
1387
+ height: '100%',
1388
+ },
1389
+ overrideHistoryState: true,
1390
+ });
1391
+ await appEmbed.render();
1392
+ const iframe = (0, test_utils_1.getIFrameEl)();
1393
+ iframe.contentWindow.postMessage = jest.fn();
1394
+ appEmbed.navigateToPage(-1, false);
1395
+ expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({
1396
+ type: types_1.HostEvent.Navigate,
1397
+ data: -1,
1398
+ }), `http://${thoughtSpotHost}`, expect.anything());
1399
+ });
1400
+ test('navigateToPage with overrideHistoryState=false and noReload=false should update iframe src', async () => {
1401
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
1402
+ frameParams: {
1403
+ width: '100%',
1404
+ height: '100%',
1405
+ },
1406
+ overrideHistoryState: false,
1407
+ });
1408
+ await appEmbed.render();
1409
+ appEmbed.navigateToPage(path, false);
1410
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&${test_utils_1.defaultParamsForPinboardEmbed}${defaultParamsPost}#/${path}`);
1411
+ });
1412
+ test('navigateToPage with overrideHistoryState=undefined and noReload=false should update iframe src', async () => {
1413
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
1414
+ frameParams: {
1415
+ width: '100%',
1416
+ height: '100%',
1417
+ },
1418
+ });
1419
+ await appEmbed.render();
1420
+ appEmbed.navigateToPage(path, false);
1421
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&${test_utils_1.defaultParamsForPinboardEmbed}${defaultParamsPost}#/${path}`);
1422
+ });
1423
+ test('navigateToPage respects noReload priority over overrideHistoryState', async () => {
1424
+ (0, test_utils_1.mockMessageChannel)();
1425
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
1426
+ frameParams: {
1427
+ width: '100%',
1428
+ height: '100%',
1429
+ },
1430
+ overrideHistoryState: false,
1431
+ });
1432
+ await appEmbed.render();
1433
+ const iframe = (0, test_utils_1.getIFrameEl)();
1434
+ iframe.contentWindow.postMessage = jest.fn();
1435
+ appEmbed.navigateToPage(path, true);
1436
+ expect(iframe.contentWindow.postMessage).toHaveBeenCalledWith(expect.objectContaining({
1437
+ type: types_1.HostEvent.Navigate,
1438
+ data: path,
1439
+ }), `http://${thoughtSpotHost}`, expect.anything());
1440
+ });
1441
+ });
1248
1442
  });
1249
1443
  describe('LazyLoadingForFullHeight functionality', () => {
1250
1444
  let mockIFrame;
@@ -1746,4 +1940,80 @@ describe('AppEmbed visualOverrides tests', () => {
1746
1940
  await (0, test_utils_1.testVisualOverridesInEmbed)(appEmbed, visualOverrides);
1747
1941
  });
1748
1942
  });
1943
+ describe('AppEmbed getEmbedParamsObject', () => {
1944
+ beforeEach(() => {
1945
+ cleanUp();
1946
+ jest.spyOn(ts_embed_1.TsEmbed.prototype, 'getAppInitData').mockResolvedValue({});
1947
+ });
1948
+ afterEach(() => {
1949
+ jest.restoreAllMocks();
1950
+ });
1951
+ test('getEmbedParams should use getEmbedParamsObject internally', async () => {
1952
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
1953
+ ...defaultViewConfig,
1954
+ fullHeight: true,
1955
+ });
1956
+ const getEmbedParamsObjectSpy = jest.spyOn(appEmbed, 'getEmbedParamsObject');
1957
+ await appEmbed.render();
1958
+ expect(getEmbedParamsObjectSpy).toHaveBeenCalled();
1959
+ });
1960
+ test('getEmbedParamsObject should contain isFullHeightPinboard when fullHeight is true', () => {
1961
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
1962
+ ...defaultViewConfig,
1963
+ fullHeight: true,
1964
+ });
1965
+ const params = appEmbed.getEmbedParamsObject();
1966
+ expect(params.isFullHeightPinboard).toBe(true);
1967
+ expect(params.fullHeight).toBeUndefined();
1968
+ });
1969
+ test('getEmbedParamsObject should not contain isFullHeightPinboard when fullHeight is false', () => {
1970
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
1971
+ ...defaultViewConfig,
1972
+ fullHeight: false,
1973
+ });
1974
+ const params = appEmbed.getEmbedParamsObject();
1975
+ expect(params.isFullHeightPinboard).toBeUndefined();
1976
+ });
1977
+ test('getUpdateEmbedParamsObject should contain isFullHeightPinboard when fullHeight is true', async () => {
1978
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
1979
+ ...defaultViewConfig,
1980
+ fullHeight: true,
1981
+ });
1982
+ const params = await appEmbed.getUpdateEmbedParamsObject();
1983
+ expect(params.isFullHeightPinboard).toBe(true);
1984
+ });
1985
+ test('getUpdateEmbedParamsObject should not contain isFullHeightPinboard when fullHeight is false', async () => {
1986
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
1987
+ ...defaultViewConfig,
1988
+ fullHeight: false,
1989
+ });
1990
+ const params = await appEmbed.getUpdateEmbedParamsObject();
1991
+ expect(params.isFullHeightPinboard).toBeUndefined();
1992
+ });
1993
+ });
1994
+ describe('AppEmbed updatedSpotterExperience tests', () => {
1995
+ beforeEach(() => {
1996
+ cleanUp();
1997
+ });
1998
+ test('should set updatedSpotterExperience to true in url', async () => {
1999
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
2000
+ ...defaultViewConfig,
2001
+ updatedSpotterExperience: true,
2002
+ });
2003
+ appEmbed.render();
2004
+ await (0, test_utils_1.executeAfterWait)(() => {
2005
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&updatedSpotterExperience=true&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
2006
+ });
2007
+ });
2008
+ test('should set updatedSpotterExperience to false in url', async () => {
2009
+ const appEmbed = new app_1.AppEmbed((0, test_utils_1.getRootEl)(), {
2010
+ ...defaultViewConfig,
2011
+ updatedSpotterExperience: false,
2012
+ });
2013
+ appEmbed.render();
2014
+ await (0, test_utils_1.executeAfterWait)(() => {
2015
+ (0, test_utils_1.expectUrlMatchesWithParams)((0, test_utils_1.getIFrameSrc)(), `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&updatedSpotterExperience=false&navigationVersion=v3&homepageVersion=v3${defaultParamsPost}#/home`);
2016
+ });
2017
+ });
2018
+ });
1749
2019
  //# sourceMappingURL=app.spec.js.map