@finsemble/finsemble-ui 6.3.2 → 6.5.0-beta.2

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 (448) hide show
  1. package/package.json +31 -42
  2. package/react/actions/smartDesktopDesignerActions.d.ts +6 -4
  3. package/react/actions/smartDesktopDesignerActions.js +2 -1
  4. package/react/actions/smartDesktopDesignerActions.js.map +1 -1
  5. package/react/assets/css/userPreferences.css +0 -30
  6. package/react/assets/css/windowTitleBar.css +6 -5
  7. package/react/assets/icons/always-on-top.svg +20 -0
  8. package/react/assets/icons/caret.svg +7 -0
  9. package/react/assets/icons/close.svg +11 -0
  10. package/react/assets/icons/code-block.svg +15 -0
  11. package/react/assets/icons/documentation.svg +20 -0
  12. package/react/assets/icons/linker.svg +18 -0
  13. package/react/assets/icons/maximize.svg +16 -0
  14. package/react/assets/icons/minimize.svg +15 -0
  15. package/react/assets/icons/toolbar.svg +12 -0
  16. package/react/assets/img/finsemble-display.png +0 -0
  17. package/react/componentTemplateGenerator.js +1 -1
  18. package/react/componentTemplateGenerator.js.map +1 -1
  19. package/react/components/FinsembleProvider.js.map +1 -1
  20. package/react/components/appCatalog/modules/FDC3.d.ts +1 -1
  21. package/react/components/appCatalog/modules/FDC3.js.map +1 -1
  22. package/react/components/appCatalog/stores/appStore.d.ts +2 -2
  23. package/react/components/appCatalog/stores/appStore.js.map +1 -1
  24. package/react/components/common/Accordion.d.ts +11 -0
  25. package/react/components/common/Accordion.js +20 -0
  26. package/react/components/common/Accordion.js.map +1 -0
  27. package/react/components/common/Checkbox.d.ts +1 -0
  28. package/react/components/common/Checkbox.js +4 -2
  29. package/react/components/common/Checkbox.js.map +1 -1
  30. package/react/components/common/DropZone.js +3 -1
  31. package/react/components/common/DropZone.js.map +1 -1
  32. package/react/components/common/FileInput.d.ts +2 -1
  33. package/react/components/common/FileInput.js +9 -4
  34. package/react/components/common/FileInput.js.map +1 -1
  35. package/react/components/common/FinsembleIcon.d.ts +1 -1
  36. package/react/components/common/FinsembleIcon.js +18 -0
  37. package/react/components/common/FinsembleIcon.js.map +1 -1
  38. package/react/components/common/FinsembleSelect.js +1 -1
  39. package/react/components/common/FinsembleSelect.js.map +1 -1
  40. package/react/components/common/Header.js +1 -1
  41. package/react/components/common/Header.js.map +1 -1
  42. package/react/components/common/InputTable.d.ts +11 -0
  43. package/react/components/common/InputTable.js +50 -0
  44. package/react/components/common/InputTable.js.map +1 -0
  45. package/react/components/common/Tooltip.js +3 -1
  46. package/react/components/common/Tooltip.js.map +1 -1
  47. package/react/components/common/css/accordion.css +99 -0
  48. package/react/components/common/css/application-edit-page.css +209 -2
  49. package/react/components/common/css/application-list.css +6 -0
  50. package/react/components/common/css/button.css +9 -7
  51. package/react/components/common/css/checkbox.css +30 -0
  52. package/react/components/common/css/file-input.css +16 -0
  53. package/react/components/common/css/header.css +1 -14
  54. package/react/components/common/css/preload-edit-page.css +37 -0
  55. package/react/components/common/css/styles.css +0 -1
  56. package/react/components/common/css/tab.css +1 -1
  57. package/react/components/common/stories/Accordion.stories.d.ts +14 -0
  58. package/react/components/common/stories/Accordion.stories.js +42 -0
  59. package/react/components/common/stories/Accordion.stories.js.map +1 -0
  60. package/react/components/common/stories/DropdownButton.stories.d.ts +11 -0
  61. package/react/components/common/stories/DropdownButton.stories.js +12 -0
  62. package/react/components/common/stories/DropdownButton.stories.js.map +1 -1
  63. package/react/components/common/stories/FileInput.stories.d.ts +2 -1
  64. package/react/components/common/stories/FileInput.stories.js +6 -0
  65. package/react/components/common/stories/FileInput.stories.js.map +1 -1
  66. package/react/components/common/stories/FinsembleIcon.stories.js +1 -0
  67. package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
  68. package/react/components/common/stories/InputTable.stories.d.ts +12 -0
  69. package/react/components/common/stories/InputTable.stories.js +35 -0
  70. package/react/components/common/stories/InputTable.stories.js.map +1 -0
  71. package/react/components/{smartDesktopDesigner/tests/ApplicationEdit.spec.d.ts → common/tests/Accordion.spec.d.ts} +0 -0
  72. package/react/components/common/tests/Accordion.spec.js +53 -0
  73. package/react/components/common/tests/Accordion.spec.js.map +1 -0
  74. package/react/components/common/tests/Checkbox.spec.js +5 -3
  75. package/react/components/common/tests/Checkbox.spec.js.map +1 -1
  76. package/react/components/common/tests/FileInput.spec.js +20 -5
  77. package/react/components/common/tests/FileInput.spec.js.map +1 -1
  78. package/react/components/common/tests/Header.spec.js +6 -2
  79. package/react/components/common/tests/Header.spec.js.map +1 -1
  80. package/react/components/{smartDesktopDesigner/tests/ApplicationList.spec.d.ts → common/tests/InputTable.spec.d.ts} +0 -0
  81. package/react/components/common/tests/InputTable.spec.js +166 -0
  82. package/react/components/common/tests/InputTable.spec.js.map +1 -0
  83. package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
  84. package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
  85. package/react/components/fdc3Resolver/ResolverDialog.js +1 -1
  86. package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
  87. package/react/components/fdc3Resolver/ResolverDialog.spec.js +1 -1
  88. package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
  89. package/react/components/fdc3Resolver/ResolverDialog.stories.js +13 -0
  90. package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
  91. package/react/components/legacyControls/FinsembleDialogButton.js +1 -1
  92. package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
  93. package/react/components/legacyControls/FinsembleDnDContext.d.ts +2 -1
  94. package/react/components/legacyControls/FinsembleDnDContext.js +8 -6
  95. package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
  96. package/react/components/linker/remoteRedux.d.ts +1 -1
  97. package/react/components/linker/remoteRedux.js.map +1 -1
  98. package/react/components/menu/Menu.d.ts +1 -0
  99. package/react/components/menu/Menu.js.map +1 -1
  100. package/react/components/menu/MenuAutoResizer.d.ts +2 -1
  101. package/react/components/menu/MenuAutoResizer.js +4 -3
  102. package/react/components/menu/MenuAutoResizer.js.map +1 -1
  103. package/react/components/menu/MenuPortal.js +118 -92
  104. package/react/components/menu/MenuPortal.js.map +1 -1
  105. package/react/components/menu/MenuShell.d.ts +1 -0
  106. package/react/components/menu/MenuShell.js +3 -2
  107. package/react/components/menu/MenuShell.js.map +1 -1
  108. package/react/components/menu/menuContext.d.ts +1 -0
  109. package/react/components/menu/menuContext.js.map +1 -1
  110. package/react/components/menu/menuHelpers.d.ts +1 -1
  111. package/react/components/menu/menuHelpers.js +2 -2
  112. package/react/components/menu/menuHelpers.js.map +1 -1
  113. package/react/components/notifications/components/drawer/DrawerControls.js +30 -6
  114. package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
  115. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +2 -0
  116. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
  117. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +20 -27
  118. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
  119. package/react/components/notifications/components/shared/CheckButton.d.ts +1 -1
  120. package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
  121. package/react/components/notifications/components/shared/IconButton.js +5 -1
  122. package/react/components/notifications/components/shared/IconButton.js.map +1 -1
  123. package/react/components/notifications/components/shared/NotificationCardShell.d.ts +1 -1
  124. package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
  125. package/react/components/notifications/components/shared/OverflowMenu.d.ts +1 -1
  126. package/react/components/notifications/components/shared/OverflowMenu.js +5 -1
  127. package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
  128. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.d.ts +1 -1
  129. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
  130. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.d.ts +1 -1
  131. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
  132. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.d.ts +1 -1
  133. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
  134. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.d.ts +1 -1
  135. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
  136. package/react/components/notifications/components/views/CardView.js.map +1 -1
  137. package/react/components/notifications/components/views/ListView.d.ts +1 -1
  138. package/react/components/notifications/components/views/ListView.js.map +1 -1
  139. package/react/components/notifications/components/views/NotificationDetailsView.d.ts +1 -1
  140. package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
  141. package/react/components/notifications/types.d.ts +1 -1
  142. package/react/components/notifications/types.js.map +1 -1
  143. package/react/components/notifications/utils.d.ts +1 -1
  144. package/react/components/notifications/utils.js.map +1 -1
  145. package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
  146. package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
  147. package/react/components/processMonitor/components/ListHeader.d.ts +1 -1
  148. package/react/components/processMonitor/components/ListHeader.js.map +1 -1
  149. package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +3 -3
  150. package/react/components/processMonitor/stores/ProcessMonitorStore.js +49 -49
  151. package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
  152. package/react/components/search/SearchResult.js +4 -3
  153. package/react/components/search/SearchResult.js.map +1 -1
  154. package/react/components/shared/DefaultDropdownButton.js +1 -1
  155. package/react/components/shared/DefaultDropdownButton.js.map +1 -1
  156. package/react/components/smartDesktopDesigner/AddApp.d.ts +14 -0
  157. package/react/components/smartDesktopDesigner/AddApp.js +60 -0
  158. package/react/components/smartDesktopDesigner/AddApp.js.map +1 -0
  159. package/react/components/smartDesktopDesigner/AppEditAccess.js +16 -32
  160. package/react/components/smartDesktopDesigner/AppEditAccess.js.map +1 -1
  161. package/react/components/smartDesktopDesigner/AppEditPage.d.ts +6 -19
  162. package/react/components/smartDesktopDesigner/AppEditPage.js +552 -59
  163. package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
  164. package/react/components/smartDesktopDesigner/Appearance.css +8 -67
  165. package/react/components/smartDesktopDesigner/Appearance.js +1 -1
  166. package/react/components/smartDesktopDesigner/Appearance.js.map +1 -1
  167. package/react/components/smartDesktopDesigner/Application.d.ts +11 -3
  168. package/react/components/smartDesktopDesigner/Application.js +155 -104
  169. package/react/components/smartDesktopDesigner/Application.js.map +1 -1
  170. package/react/components/smartDesktopDesigner/Applications.d.ts +2 -3
  171. package/react/components/smartDesktopDesigner/Applications.js +67 -107
  172. package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
  173. package/react/components/smartDesktopDesigner/Authentication.js +2 -9
  174. package/react/components/smartDesktopDesigner/Authentication.js.map +1 -1
  175. package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js +8 -1
  176. package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +1 -1
  177. package/react/components/smartDesktopDesigner/ContentHeader.d.ts +5 -0
  178. package/react/components/smartDesktopDesigner/ContentHeader.js +10 -0
  179. package/react/components/smartDesktopDesigner/ContentHeader.js.map +1 -0
  180. package/react/components/smartDesktopDesigner/CurrentView.js +2 -1
  181. package/react/components/smartDesktopDesigner/CurrentView.js.map +1 -1
  182. package/react/components/smartDesktopDesigner/EditPreload.d.ts +14 -0
  183. package/react/components/smartDesktopDesigner/EditPreload.js +169 -0
  184. package/react/components/smartDesktopDesigner/EditPreload.js.map +1 -0
  185. package/react/components/smartDesktopDesigner/Export.d.ts +1 -0
  186. package/react/components/smartDesktopDesigner/Export.js +40 -9
  187. package/react/components/smartDesktopDesigner/Export.js.map +1 -1
  188. package/react/components/smartDesktopDesigner/ExportCloud.d.ts +3 -1
  189. package/react/components/smartDesktopDesigner/ExportCloud.js +4 -6
  190. package/react/components/smartDesktopDesigner/ExportCloud.js.map +1 -1
  191. package/react/components/smartDesktopDesigner/ExportZip.d.ts +3 -1
  192. package/react/components/smartDesktopDesigner/ExportZip.js +8 -3
  193. package/react/components/smartDesktopDesigner/ExportZip.js.map +1 -1
  194. package/react/components/smartDesktopDesigner/GettingStarted.d.ts +1 -0
  195. package/react/components/smartDesktopDesigner/GettingStarted.js +11 -25
  196. package/react/components/smartDesktopDesigner/GettingStarted.js.map +1 -1
  197. package/react/components/smartDesktopDesigner/ItemList.d.ts +17 -0
  198. package/react/components/smartDesktopDesigner/ItemList.js +58 -0
  199. package/react/components/smartDesktopDesigner/ItemList.js.map +1 -0
  200. package/react/components/smartDesktopDesigner/Navigation.d.ts +2 -2
  201. package/react/components/smartDesktopDesigner/Navigation.js +17 -15
  202. package/react/components/smartDesktopDesigner/Navigation.js.map +1 -1
  203. package/react/components/smartDesktopDesigner/OptionalSettingsView.d.ts +11 -0
  204. package/react/components/smartDesktopDesigner/OptionalSettingsView.js +71 -0
  205. package/react/components/smartDesktopDesigner/OptionalSettingsView.js.map +1 -0
  206. package/react/components/smartDesktopDesigner/Preloads.d.ts +8 -0
  207. package/react/components/smartDesktopDesigner/Preloads.js +26 -0
  208. package/react/components/smartDesktopDesigner/Preloads.js.map +1 -0
  209. package/react/components/smartDesktopDesigner/Publish.js.map +1 -1
  210. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +3 -3
  211. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +11 -17
  212. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
  213. package/react/components/smartDesktopDesigner/ThemePage.css +0 -1
  214. package/react/components/smartDesktopDesigner/ThemePage.js +0 -7
  215. package/react/components/smartDesktopDesigner/ThemePage.js.map +1 -1
  216. package/react/components/smartDesktopDesigner/Themes.js +0 -2
  217. package/react/components/smartDesktopDesigner/Themes.js.map +1 -1
  218. package/react/components/smartDesktopDesigner/Toolbar.d.ts +15 -0
  219. package/react/components/smartDesktopDesigner/Toolbar.js +123 -0
  220. package/react/components/smartDesktopDesigner/Toolbar.js.map +1 -0
  221. package/react/components/smartDesktopDesigner/View.js +1 -1
  222. package/react/components/smartDesktopDesigner/View.js.map +1 -1
  223. package/react/components/smartDesktopDesigner/common/fsbl_functions.d.ts +1 -1
  224. package/react/components/smartDesktopDesigner/common/fsbl_functions.js +2 -2
  225. package/react/components/smartDesktopDesigner/common/fsbl_functions.js.map +1 -1
  226. package/react/components/smartDesktopDesigner/common/views.d.ts +2 -36
  227. package/react/components/smartDesktopDesigner/common/views.js +168 -111
  228. package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
  229. package/react/components/smartDesktopDesigner/css/appearance.css +20 -9
  230. package/react/components/smartDesktopDesigner/css/applications.css +40 -0
  231. package/react/components/smartDesktopDesigner/css/authentication.css +5 -11
  232. package/react/components/smartDesktopDesigner/css/export.css +32 -19
  233. package/react/components/smartDesktopDesigner/css/getting-started.css +22 -0
  234. package/react/components/smartDesktopDesigner/css/nav.css +38 -11
  235. package/react/components/smartDesktopDesigner/css/project-header.css +19 -16
  236. package/react/components/smartDesktopDesigner/css/styles.css +2 -3
  237. package/react/components/smartDesktopDesigner/css/views.css +11 -4
  238. package/react/components/smartDesktopDesigner/fixtures/apps.d.ts +3 -1
  239. package/react/components/smartDesktopDesigner/fixtures/apps.js +63 -6
  240. package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
  241. package/react/components/smartDesktopDesigner/fixtures/exportProps.js +3 -0
  242. package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +1 -1
  243. package/react/components/smartDesktopDesigner/fixtures/preloads.d.ts +22 -0
  244. package/react/components/smartDesktopDesigner/fixtures/preloads.js +40 -0
  245. package/react/components/smartDesktopDesigner/fixtures/preloads.js.map +1 -0
  246. package/react/components/smartDesktopDesigner/fixtures/publishProgress.d.ts +1 -1
  247. package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +1 -1
  248. package/react/components/smartDesktopDesigner/fixtures/views.d.ts +2 -2
  249. package/react/components/smartDesktopDesigner/fixtures/views.js +67 -26
  250. package/react/components/smartDesktopDesigner/fixtures/views.js.map +1 -1
  251. package/react/components/smartDesktopDesigner/sdd_helpers.d.ts +1 -1
  252. package/react/components/smartDesktopDesigner/sdd_helpers.js +4 -3
  253. package/react/components/smartDesktopDesigner/sdd_helpers.js.map +1 -1
  254. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.d.ts +3 -1
  255. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js +13 -33
  256. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
  257. package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.d.ts +10 -0
  258. package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.js +13 -0
  259. package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.js.map +1 -0
  260. package/react/components/smartDesktopDesigner/stories/EditPreload.stories.d.ts +11 -0
  261. package/react/components/smartDesktopDesigner/stories/EditPreload.stories.js +35 -0
  262. package/react/components/smartDesktopDesigner/stories/EditPreload.stories.js.map +1 -0
  263. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.d.ts +1 -1
  264. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js +1 -1
  265. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +1 -1
  266. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.d.ts +1 -1
  267. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js +1 -1
  268. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +1 -1
  269. package/react/components/smartDesktopDesigner/stories/ItemList.stories.d.ts +16 -0
  270. package/react/components/smartDesktopDesigner/stories/{ApplicationList.stories.js → ItemList.stories.js} +30 -23
  271. package/react/components/smartDesktopDesigner/stories/ItemList.stories.js.map +1 -0
  272. package/react/components/smartDesktopDesigner/stories/OptionalSettingsView.stories.d.ts +11 -0
  273. package/react/components/smartDesktopDesigner/stories/OptionalSettingsView.stories.js +28 -0
  274. package/react/components/smartDesktopDesigner/stories/OptionalSettingsView.stories.js.map +1 -0
  275. package/react/components/smartDesktopDesigner/stories/Preloads.stories.d.ts +11 -0
  276. package/react/components/smartDesktopDesigner/stories/Preloads.stories.js +31 -0
  277. package/react/components/smartDesktopDesigner/stories/Preloads.stories.js.map +1 -0
  278. package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js +7 -1
  279. package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +1 -1
  280. package/react/components/smartDesktopDesigner/stories/Toolbar.stories.d.ts +14 -0
  281. package/react/components/smartDesktopDesigner/stories/Toolbar.stories.js +38 -0
  282. package/react/components/smartDesktopDesigner/stories/Toolbar.stories.js.map +1 -0
  283. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js +1100 -308
  284. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
  285. package/react/components/smartDesktopDesigner/tests/{ApplicationSetup.spec.d.ts → Application.spec.d.ts} +0 -0
  286. package/react/components/smartDesktopDesigner/tests/Application.spec.js +1496 -0
  287. package/react/components/smartDesktopDesigner/tests/Application.spec.js.map +1 -0
  288. package/react/components/smartDesktopDesigner/tests/Applications.spec.d.ts +1 -1
  289. package/react/components/smartDesktopDesigner/tests/Applications.spec.js +62 -561
  290. package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
  291. package/react/components/smartDesktopDesigner/tests/{ProjectHeader.spec.d.ts → ContentHeader.spec.d.ts} +0 -0
  292. package/react/components/smartDesktopDesigner/tests/ContentHeader.spec.js +31 -0
  293. package/react/components/smartDesktopDesigner/tests/ContentHeader.spec.js.map +1 -0
  294. package/react/components/smartDesktopDesigner/tests/EditPreload.spec.d.ts +1 -0
  295. package/react/components/smartDesktopDesigner/tests/EditPreload.spec.js +61 -0
  296. package/react/components/smartDesktopDesigner/tests/EditPreload.spec.js.map +1 -0
  297. package/react/components/smartDesktopDesigner/tests/Export.spec.js +129 -0
  298. package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +1 -1
  299. package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js +7 -0
  300. package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +1 -1
  301. package/react/components/smartDesktopDesigner/tests/ItemList.spec.d.ts +1 -0
  302. package/react/components/smartDesktopDesigner/tests/{ApplicationList.spec.js → ItemList.spec.js} +8 -8
  303. package/react/components/smartDesktopDesigner/tests/ItemList.spec.js.map +1 -0
  304. package/react/components/smartDesktopDesigner/tests/Preloads.spec.d.ts +1 -0
  305. package/react/components/smartDesktopDesigner/tests/Preloads.spec.js +47 -0
  306. package/react/components/smartDesktopDesigner/tests/Preloads.spec.js.map +1 -0
  307. package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js +3 -14
  308. package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +1 -1
  309. package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js +7 -30
  310. package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +1 -1
  311. package/react/components/smartDesktopDesigner/tests/Toolbar.spec.d.ts +1 -0
  312. package/react/components/smartDesktopDesigner/tests/Toolbar.spec.js +203 -0
  313. package/react/components/smartDesktopDesigner/tests/Toolbar.spec.js.map +1 -0
  314. package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.d.ts +1 -0
  315. package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.js +18 -0
  316. package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.js.map +1 -0
  317. package/react/components/toolbar/DragHandle.spec.d.ts +1 -0
  318. package/react/components/toolbar/DragHandle.spec.js +31 -0
  319. package/react/components/toolbar/DragHandle.spec.js.map +1 -0
  320. package/react/components/toolbar/DragHandle.stories.d.ts +13 -0
  321. package/react/components/toolbar/DragHandle.stories.js +39 -0
  322. package/react/components/toolbar/DragHandle.stories.js.map +1 -0
  323. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.d.ts +1 -1
  324. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
  325. package/react/components/toolbar/advancedAppLauncher/components/Content.d.ts +1 -1
  326. package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
  327. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
  328. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.d.ts +1 -1
  329. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js +47 -45
  330. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
  331. package/react/components/toolbar/advancedAppLauncher/components/TagsList.d.ts +1 -1
  332. package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
  333. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.d.ts +2 -2
  334. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js.map +1 -1
  335. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
  336. package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
  337. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.d.ts +1 -0
  338. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
  339. package/react/components/toolbar/appLauncher/components/componentList.d.ts +2 -2
  340. package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
  341. package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +3 -2
  342. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js +17 -34
  343. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
  344. package/react/components/toolbar/dashbar/Dashbar.js +12 -13
  345. package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
  346. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +2 -2
  347. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
  348. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +1 -1
  349. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
  350. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.d.ts +1 -1
  351. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
  352. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.d.ts +4 -4
  353. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +1 -1
  354. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
  355. package/react/components/userPreferences/components/content/Workspaces.d.ts +1 -1
  356. package/react/components/userPreferences/components/content/Workspaces.js +1 -1
  357. package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
  358. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
  359. package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
  360. package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +1 -1
  361. package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
  362. package/react/components/userPreferences/tests/ScheduledRestart.spec.js +1 -1
  363. package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -1
  364. package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +4 -2
  365. package/react/components/windowTitleBar/WindowTitleBarShell.js +60 -52
  366. package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
  367. package/react/components/windowTitleBar/components/center/Tab.d.ts +0 -1
  368. package/react/components/windowTitleBar/components/center/Tab.js +2 -2
  369. package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
  370. package/react/components/windowTitleBar/components/center/TabList.d.ts +2 -3
  371. package/react/components/windowTitleBar/components/center/TabList.js +19 -79
  372. package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
  373. package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
  374. package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
  375. package/react/components/windowTitleBar/components/right/MaximizeButton.d.ts +7 -0
  376. package/react/components/windowTitleBar/components/right/MaximizeButton.js +11 -1
  377. package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
  378. package/react/components/windowTitleBar/components/windowTitle.d.ts +9 -5
  379. package/react/components/windowTitleBar/components/windowTitle.js +154 -42
  380. package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
  381. package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +3 -3
  382. package/react/components/windowTitleBar/stores/windowTitleBarStore.js +214 -214
  383. package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
  384. package/react/enzymeSetup.js +1 -1
  385. package/react/enzymeSetup.js.map +1 -1
  386. package/react/hooks/useDashbar.d.ts +8 -0
  387. package/react/hooks/useDashbar.js +104 -0
  388. package/react/hooks/useDashbar.js.map +1 -0
  389. package/react/hooks/useFavoritesShell.js.map +1 -1
  390. package/react/hooks/useNotifications.d.ts +1 -1
  391. package/react/hooks/useNotifications.js.map +1 -1
  392. package/react/hooks/useToolbar.d.ts +0 -6
  393. package/react/hooks/useToolbar.js +0 -101
  394. package/react/hooks/useToolbar.js.map +1 -1
  395. package/react/reducers/rootReducer.d.ts +11 -7
  396. package/react/reducers/smartDesktopDesignerReducer.js +8 -3
  397. package/react/reducers/smartDesktopDesignerReducer.js.map +1 -1
  398. package/react/store.d.ts +22 -14
  399. package/react/types/fdc3.d.ts +7 -35
  400. package/react/types/fdc3.js.map +1 -1
  401. package/react/types/searchTypes.d.ts +1 -8
  402. package/react/types/searchTypes.js.map +1 -1
  403. package/react/types/smartDesktopDesignerTypes.d.ts +52 -6
  404. package/react/types/smartDesktopDesignerTypes.js.map +1 -1
  405. package/react/types/windowTitleBar.d.ts +4 -2
  406. package/react/types/windowTitleBar.js.map +1 -1
  407. package/react/components/common/FontSizeSelector.d.ts +0 -7
  408. package/react/components/common/FontSizeSelector.js +0 -42
  409. package/react/components/common/FontSizeSelector.js.map +0 -1
  410. package/react/components/common/stories/FontSizeSelector.stories.d.ts +0 -12
  411. package/react/components/common/stories/FontSizeSelector.stories.js +0 -24
  412. package/react/components/common/stories/FontSizeSelector.stories.js.map +0 -1
  413. package/react/components/smartDesktopDesigner/ApplicationEdit.d.ts +0 -25
  414. package/react/components/smartDesktopDesigner/ApplicationEdit.js +0 -103
  415. package/react/components/smartDesktopDesigner/ApplicationEdit.js.map +0 -1
  416. package/react/components/smartDesktopDesigner/ApplicationList.d.ts +0 -15
  417. package/react/components/smartDesktopDesigner/ApplicationList.js +0 -56
  418. package/react/components/smartDesktopDesigner/ApplicationList.js.map +0 -1
  419. package/react/components/smartDesktopDesigner/ApplicationSetup.d.ts +0 -23
  420. package/react/components/smartDesktopDesigner/ApplicationSetup.js +0 -73
  421. package/react/components/smartDesktopDesigner/ApplicationSetup.js.map +0 -1
  422. package/react/components/smartDesktopDesigner/ProjectHeader.d.ts +0 -14
  423. package/react/components/smartDesktopDesigner/ProjectHeader.js +0 -70
  424. package/react/components/smartDesktopDesigner/ProjectHeader.js.map +0 -1
  425. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.d.ts +0 -4
  426. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js +0 -45
  427. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +0 -1
  428. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.d.ts +0 -3
  429. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js +0 -29
  430. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +0 -1
  431. package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.d.ts +0 -12
  432. package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js +0 -21
  433. package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js.map +0 -1
  434. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.d.ts +0 -15
  435. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +0 -1
  436. package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.d.ts +0 -12
  437. package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js +0 -28
  438. package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js.map +0 -1
  439. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.d.ts +0 -10
  440. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js +0 -19
  441. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js.map +0 -1
  442. package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js +0 -66
  443. package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js.map +0 -1
  444. package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +0 -1
  445. package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js +0 -41
  446. package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js.map +0 -1
  447. package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js +0 -27
  448. package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ExportZip.spec.js","sourceRoot":"","sources":["../../../../src/components/smartDesktopDesigner/tests/ExportZip.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEhF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC7B,EAAE,CAAC,8CAA8C,EAAE,KAAK,IAAI,EAAE;QAC7D,MAAM,OAAO,GAAG,KAAK,CACpB,oBAAC,gBAAgB,sCAEX,gBAAgB,CAAC,IAAoB,GAEzC,CACF,CAAC;QAEF,OAAO,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAE/D,MAAM,QAAQ,EAAE,CAAC;QAEjB,OAAO,CAAC,MAAM,EAAE,CAAC;QAEjB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,MAAM,EAAE,kCAAkC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAEjG,OAAO,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,mCAAmC,EAAE,KAAK,IAAI,EAAE;QAClD,MAAM,OAAO,GAAG,KAAK,CACpB,oBAAC,cAAc,sCAET,cAAc,CAAC,IAAoB,GAEvC,CACF,CAAC;QAEF,OAAO,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAE/D,MAAM,QAAQ,EAAE,CAAC;QAEjB,OAAO,CAAC,MAAM,EAAE,CAAC;QAEjB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,MAAM,EAAE,gCAAgC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAEhG,OAAO,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport { DefaultExportZip, ErrorExportZip } from \"../stories/ExportZip.stories\";\nimport { ExportProps } from \"../Export\";\nimport { waitTick } from \"../sdd_helpers\";\n\ndescribe(\"<ExportZip/>\", () => {\n\tit(\"should show file count after success publish\", async () => {\n\t\tconst wrapper = mount(\n\t\t\t<DefaultExportZip\n\t\t\t\t{...{\n\t\t\t\t\t...(DefaultExportZip.args as ExportProps),\n\t\t\t\t}}\n\t\t\t/>\n\t\t);\n\n\t\twrapper.find(\".export-method-button button\").simulate(\"click\");\n\n\t\tawait waitTick();\n\n\t\twrapper.update();\n\n\t\texpect(wrapper.find(\".last-export-time\").length, \"Export success message container\").to.equal(1);\n\n\t\twrapper.unmount();\n\t});\n\tit(\"should error after failed publish\", async () => {\n\t\tconst wrapper = mount(\n\t\t\t<ErrorExportZip\n\t\t\t\t{...{\n\t\t\t\t\t...(ErrorExportZip.args as ExportProps),\n\t\t\t\t}}\n\t\t\t/>\n\t\t);\n\n\t\twrapper.find(\".export-method-button button\").simulate(\"click\");\n\n\t\tawait waitTick();\n\n\t\twrapper.update();\n\n\t\texpect(wrapper.find(\".last-export-error\").length, \"Export error message container\").to.equal(1);\n\n\t\twrapper.unmount();\n\t});\n});\n"]}
1
+ {"version":3,"file":"ExportZip.spec.js","sourceRoot":"","sources":["../../../../src/components/smartDesktopDesigner/tests/ExportZip.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEhF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,MAAM,QAAQ,GAAG;IAChB,QAAQ,EAAE,wBAAwB;CAClC,CAAC;AAEF,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC7B,EAAE,CAAC,8CAA8C,EAAE,KAAK,IAAI,EAAE;QAC7D,MAAM,OAAO,GAAG,KAAK,CACpB,oBAAC,gBAAgB,sCAEX,gBAAgB,CAAC,IAAoB,GAEzC,CACF,CAAC;QAEF,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACjD,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAE3B,OAAO,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAE/D,MAAM,QAAQ,EAAE,CAAC;QAEjB,OAAO,CAAC,MAAM,EAAE,CAAC;QAEjB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,MAAM,EAAE,kCAAkC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAEjG,OAAO,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,mCAAmC,EAAE,KAAK,IAAI,EAAE;QAClD,MAAM,OAAO,GAAG,KAAK,CACpB,oBAAC,cAAc,sCAET,cAAc,CAAC,IAAoB,GAEvC,CACF,CAAC;QAEF,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACjD,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAE3B,OAAO,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAE/D,MAAM,QAAQ,EAAE,CAAC;QAEjB,OAAO,CAAC,MAAM,EAAE,CAAC;QAEjB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,MAAM,EAAE,gCAAgC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAEhG,OAAO,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport { DefaultExportZip, ErrorExportZip } from \"../stories/ExportZip.stories\";\nimport { ExportProps } from \"../Export\";\nimport { waitTick } from \"../sdd_helpers\";\n\nconst locators = {\n\tcheckbox: \".complex-menu-checkbox\",\n};\n\ndescribe(\"<ExportZip/>\", () => {\n\tit(\"should show file count after success publish\", async () => {\n\t\tconst wrapper = mount(\n\t\t\t<DefaultExportZip\n\t\t\t\t{...{\n\t\t\t\t\t...(DefaultExportZip.args as ExportProps),\n\t\t\t\t}}\n\t\t\t/>\n\t\t);\n\n\t\tconst checkbox = wrapper.find(locators.checkbox);\n\t\tcheckbox.simulate(\"click\");\n\n\t\twrapper.find(\".export-method-button button\").simulate(\"click\");\n\n\t\tawait waitTick();\n\n\t\twrapper.update();\n\n\t\texpect(wrapper.find(\".last-export-time\").length, \"Export success message container\").to.equal(1);\n\n\t\twrapper.unmount();\n\t});\n\tit(\"should error after failed publish\", async () => {\n\t\tconst wrapper = mount(\n\t\t\t<ErrorExportZip\n\t\t\t\t{...{\n\t\t\t\t\t...(ErrorExportZip.args as ExportProps),\n\t\t\t\t}}\n\t\t\t/>\n\t\t);\n\n\t\tconst checkbox = wrapper.find(locators.checkbox);\n\t\tcheckbox.simulate(\"click\");\n\n\t\twrapper.find(\".export-method-button button\").simulate(\"click\");\n\n\t\tawait waitTick();\n\n\t\twrapper.update();\n\n\t\texpect(wrapper.find(\".last-export-error\").length, \"Export error message container\").to.equal(1);\n\n\t\twrapper.unmount();\n\t});\n});\n"]}
@@ -3,11 +3,11 @@ import { mount } from "enzyme";
3
3
  import { afterEach, describe, it } from "mocha";
4
4
  import { expect } from "chai";
5
5
  import sinon from "sinon";
6
- import { EmptyAppList, OneAppInList, AppWithoutDisplayName, SampleAppList } from "../stories/ApplicationList.stories";
6
+ import { EmptyAppList, OneAppInList, AppWithoutDisplayName, SampleAppList } from "../stories/ItemList.stories";
7
7
  import { accessibilityAssessor } from "./a11y_helper";
8
8
  import addons, { mockChannel } from "@storybook/addons";
9
9
  addons.setChannel(mockChannel());
10
- describe("<ApplicationList/>", () => {
10
+ describe("<ItemList/>", () => {
11
11
  afterEach(() => {
12
12
  sinon.restore();
13
13
  });
@@ -37,7 +37,7 @@ describe("<ApplicationList/>", () => {
37
37
  expect(wrapper.find(".app-list-row")).to.have.lengthOf(3);
38
38
  });
39
39
  it("should delete an app when the delete button is clicked", () => {
40
- const buttonSpy = sinon.spy(SampleAppList.args, "deleteApp");
40
+ const buttonSpy = sinon.spy(SampleAppList.args, "deleteItem");
41
41
  const wrapper = mount(React.createElement(SampleAppList, Object.assign({}, SampleAppList.args)));
42
42
  wrapper
43
43
  .find(".app-list-row button")
@@ -46,7 +46,7 @@ describe("<ApplicationList/>", () => {
46
46
  expect(buttonSpy.calledOnce).to.be.true;
47
47
  });
48
48
  it("should perform the launch action when the app name is clicked", () => {
49
- const buttonSpy = sinon.spy(SampleAppList.args, "clickApp");
49
+ const buttonSpy = sinon.spy(SampleAppList.args, "clickItem");
50
50
  const wrapper = mount(React.createElement(SampleAppList, Object.assign({}, SampleAppList.args)));
51
51
  wrapper
52
52
  .find(".app-list-row")
@@ -55,7 +55,7 @@ describe("<ApplicationList/>", () => {
55
55
  expect(buttonSpy.calledOnce).to.be.true;
56
56
  });
57
57
  it("should perform the launch action when the app name is in focus and the Enter key is pressed", () => {
58
- const buttonSpy = sinon.spy(SampleAppList.args, "clickApp");
58
+ const buttonSpy = sinon.spy(SampleAppList.args, "clickItem");
59
59
  const wrapper = mount(React.createElement(SampleAppList, Object.assign({}, SampleAppList.args)));
60
60
  wrapper
61
61
  .find(".app-list-row")
@@ -67,7 +67,7 @@ describe("<ApplicationList/>", () => {
67
67
  expect(buttonSpy.calledOnce).to.be.true;
68
68
  });
69
69
  it("should perform the launch action when the app name is in focus and the spacebar is pressed", () => {
70
- const buttonSpy = sinon.spy(SampleAppList.args, "clickApp");
70
+ const buttonSpy = sinon.spy(SampleAppList.args, "clickItem");
71
71
  const wrapper = mount(React.createElement(SampleAppList, Object.assign({}, SampleAppList.args)));
72
72
  wrapper
73
73
  .find(".app-list-row")
@@ -79,7 +79,7 @@ describe("<ApplicationList/>", () => {
79
79
  expect(buttonSpy.calledOnce).to.be.true;
80
80
  });
81
81
  it("should delete an app when the app name is in focus and the delete key is pressed", () => {
82
- const buttonSpy = sinon.spy(SampleAppList.args, "deleteApp");
82
+ const buttonSpy = sinon.spy(SampleAppList.args, "deleteItem");
83
83
  const wrapper = mount(React.createElement(SampleAppList, Object.assign({}, SampleAppList.args)));
84
84
  wrapper
85
85
  .find(".app-list-row")
@@ -91,4 +91,4 @@ describe("<ApplicationList/>", () => {
91
91
  expect(buttonSpy.calledOnce).to.be.true;
92
92
  });
93
93
  });
94
- //# sourceMappingURL=ApplicationList.spec.js.map
94
+ //# sourceMappingURL=ItemList.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ItemList.spec.js","sourceRoot":"","sources":["../../../../src/components/smartDesktopDesigner/tests/ItemList.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC/G,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAGtD,OAAO,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACxD,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;AAEjC,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC5B,SAAS,CAAC,GAAG,EAAE;QACd,KAAK,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8CAA8C,EAAE,KAAK,IAAI,EAAE;QAC7D,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,YAAY,oBAAM,YAAY,CAAC,IAAsB,EAAI,CAAC,CAAC;Q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AE,CAAC,IAAI,CAAC;IACzC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,kFAAkF,EAAE,GAAG,EAAE;QAC3F,MAAM,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,IAAqB,EAAE,YAAY,CAAC,CAAC;QAC/E,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,aAAa,oBAAM,aAAa,CAAC,IAAsB,EAAI,CAAC,CAAC;QACpF,OAAO;aACL,IAAI,CAAC,eAAe,CAAC;aACrB,EAAE,CAAC,CAAC,CAAC;aACL,QAAQ,CAAC,SAAS,EAAE;YACpB,GAAG,EAAE,QAAQ;YACb,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC;SACzB,CAAC,CAAC;QACJ,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACzC,CAAC,CAAC,CAAC;AAIJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { afterEach, describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport sinon from \"sinon\";\nimport { ItemListProps } from \"../ItemList\";\nimport { EmptyAppList, OneAppInList, AppWithoutDisplayName, SampleAppList } from \"../stories/ItemList.stories\";\nimport { accessibilityAssessor } from \"./a11y_helper\";\n\n// Necessary to allow sinon to work with mocked actions (which are shown in the Actions panel in Storybook)\nimport addons, { mockChannel } from \"@storybook/addons\";\naddons.setChannel(mockChannel());\n\ndescribe(\"<ItemList/>\", () => {\n\tafterEach(() => {\n\t\tsinon.restore();\n\t});\n\n\tit(\"should pass accessibility scans (when empty)\", async () => {\n\t\tconst wrapper = mount(<EmptyAppList {...(EmptyAppList.args as ItemListProps)} />);\n\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\n\t});\n\n\tit(\"should pass accessibility scans (Sample)\", async () => {\n\t\tconst wrapper = mount(<SampleAppList {...(SampleAppList.args as ItemListProps)} />);\n\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\n\t});\n\n\tit(\"should show a zero state message when there are no apps to display\", () => {\n\t\tconst wrapper = mount(<EmptyAppList {...(EmptyAppList.args as ItemListProps)} />);\n\n\t\texpect(wrapper.find(\".app-list-empty\").first().text()).to.contain(\"There’s nothing here\");\n\t});\n\n\tit(\"should show an app title and a delete icon when 1 app is provided\", () => {\n\t\tconst wrapper = mount(<OneAppInList {...(OneAppInList.args as ItemListProps)} />);\n\n\t\texpect(wrapper.find(\".app-list-row .app-name\").exists()).to.be.true;\n\t\texpect(wrapper.find(\".app-list-row .icon-delete\").exists()).to.be.true;\n\t});\n\n\tit(\"should show an appId if no displayname is provided\", () => {\n\t\tconst wrapper = mount(<AppWithoutDisplayName {...(AppWithoutDisplayName.args as ItemListProps)} />);\n\t\texpect(wrapper.find(\".app-list-row .app-name\").text()).to.equal(\"NoDisplayName\");\n\t});\n\tit(\"should show 3 apps when 3 apps are provided\", () => {\n\t\tconst wrapper = mount(<SampleAppList {...(SampleAppList.args as ItemListProps)} />);\n\t\texpect(wrapper.find(\".app-list-row\")).to.have.lengthOf(3);\n\t});\n\tit(\"should delete an app when the delete button is clicked\", () => {\n\t\tconst buttonSpy = sinon.spy(SampleAppList.args as ItemListProps, \"deleteItem\");\n\t\tconst wrapper = mount(<SampleAppList {...(SampleAppList.args as ItemListProps)} />);\n\t\twrapper\n\t\t\t.find(\".app-list-row button\")\n\t\t\t.at(0)\n\t\t\t.simulate(\"click\", { stopPropagation: () => {} });\n\t\texpect(buttonSpy.calledOnce).to.be.true;\n\t});\n\tit(\"should perform the launch action when the app name is clicked\", () => {\n\t\tconst buttonSpy = sinon.spy(SampleAppList.args as ItemListProps, \"clickItem\");\n\t\tconst wrapper = mount(<SampleAppList {...(SampleAppList.args as ItemListProps)} />);\n\t\twrapper\n\t\t\t.find(\".app-list-row\")\n\t\t\t.at(0)\n\t\t\t.simulate(\"click\", { preventDefault: () => {} });\n\t\texpect(buttonSpy.calledOnce).to.be.true;\n\t});\n\tit(\"should perform the launch action when the app name is in focus and the Enter key is pressed\", () => {\n\t\tconst buttonSpy = sinon.spy(SampleAppList.args as ItemListProps, \"clickItem\");\n\t\tconst wrapper = mount(<SampleAppList {...(SampleAppList.args as ItemListProps)} />);\n\t\twrapper\n\t\t\t.find(\".app-list-row\")\n\t\t\t.at(0)\n\t\t\t.simulate(\"keyDown\", {\n\t\t\t\tkey: \"Enter\",\n\t\t\t\tpreventDefault: () => {},\n\t\t\t});\n\t\texpect(buttonSpy.calledOnce).to.be.true;\n\t});\n\tit(\"should perform the launch action when the app name is in focus and the spacebar is pressed\", () => {\n\t\tconst buttonSpy = sinon.spy(SampleAppList.args as ItemListProps, \"clickItem\");\n\t\tconst wrapper = mount(<SampleAppList {...(SampleAppList.args as ItemListProps)} />);\n\t\twrapper\n\t\t\t.find(\".app-list-row\")\n\t\t\t.at(0)\n\t\t\t.simulate(\"keyDown\", {\n\t\t\t\tkey: \" \",\n\t\t\t\tpreventDefault: () => {},\n\t\t\t});\n\t\texpect(buttonSpy.calledOnce).to.be.true;\n\t});\n\tit(\"should delete an app when the app name is in focus and the delete key is pressed\", () => {\n\t\tconst buttonSpy = sinon.spy(SampleAppList.args as ItemListProps, \"deleteItem\");\n\t\tconst wrapper = mount(<SampleAppList {...(SampleAppList.args as ItemListProps)} />);\n\t\twrapper\n\t\t\t.find(\".app-list-row\")\n\t\t\t.at(0)\n\t\t\t.simulate(\"keyDown\", {\n\t\t\t\tkey: \"Delete\",\n\t\t\t\tstopPropagation: () => {},\n\t\t\t});\n\t\texpect(buttonSpy.calledOnce).to.be.true;\n\t});\n\t// it(\"should not perform the launch action when the delete name is clicked\", () => {\n\t// \tconst wrapper = mount(<SampleAppList {...(SampleAppList.args as ApplicationListProps)} />);\n\t// });\n});\n"]}
@@ -0,0 +1,47 @@
1
+ import * as React from "react";
2
+ import { mount } from "enzyme";
3
+ import { describe, it, afterEach } from "mocha";
4
+ import { expect } from "chai";
5
+ import { EmptyList, PopulatedList } from "../stories/Preloads.stories";
6
+ import { accessibilityAssessor } from "./a11y_helper";
7
+ import sinon from "sinon";
8
+ import addons, { mockChannel } from "@storybook/addons";
9
+ addons.setChannel(mockChannel());
10
+ describe("<Preloads/>", () => {
11
+ afterEach(() => {
12
+ sinon.restore();
13
+ });
14
+ it("should be empty", () => {
15
+ const wrapper = mount(React.createElement(EmptyList, Object.assign({}, EmptyList.args)));
16
+ expect(wrapper.find("button").exists(), "The button exists").to.be.true;
17
+ expect(wrapper.find("button").text(), "The button's text").to.equal("Add");
18
+ expect(wrapper.find(".app-list-empty").exists(), "Empty message exists").to.be.true;
19
+ expect(wrapper.find(".app-list-empty").text(), "Empty message text").to.contain("to add preloads");
20
+ expect(wrapper.find(".app-list-empty.no-dropzone").exists(), "Empty message has no dropzone styling").to.be.true;
21
+ });
22
+ it("should call correct functions", () => {
23
+ var _a;
24
+ const props = {
25
+ deletePreload: sinon.spy(),
26
+ setEditView: sinon.spy(),
27
+ preloads: (_a = PopulatedList.args) === null || _a === void 0 ? void 0 : _a.preloads,
28
+ };
29
+ const wrapper = mount(React.createElement(PopulatedList, Object.assign({}, props)));
30
+ expect(wrapper.find(".app-list-empty").exists(), "Empty message should not exist").to.be.false;
31
+ expect(props.setEditView.called, "Add button not clicked yet").to.be.false;
32
+ expect(props.deletePreload.called, "Delete button not clicked yet").to.be.false;
33
+ expect(props.setEditView.called, "Preload not clicked yet").to.be.false;
34
+ const buttons = wrapper.find("button");
35
+ buttons.at(0).simulate("click");
36
+ expect(props.setEditView.called, "Button was clicked").to.be.true;
37
+ buttons.at(1).simulate("click");
38
+ expect(props.deletePreload.calledWith("native-overrides"), "Correct param passed in to delete").to.be.true;
39
+ wrapper.find(".app-list-row").at(0).simulate("click");
40
+ expect(props.setEditView.calledWith("native-overrides"), "Correct param passed in to delete").to.be.true;
41
+ });
42
+ it("should pass accessibility scans", async () => {
43
+ const wrapper = mount(React.createElement(EmptyList, Object.assign({}, EmptyList.args)));
44
+ expect(await accessibilityAssessor(wrapper)).to.be.true;
45
+ });
46
+ });
47
+ //# sourceMappingURL=Preloads.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Preloads.spec.js","sourceRoot":"","sources":["../../../../src/components/smartDesktopDesigner/tests/Preloads.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAE9B,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAGvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAGtD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACxD,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;AAEjC,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAE5B,SAAS,CAAC,GAAG,EAAE;QACd,KAAK,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iBAAiB,EAAE,GAAG,EAAE;QAC1B,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,SAAS,oBAAM,SAAS,CAAC,IAAyB,EAAI,CAAC,CAAC;QAE/E,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QACxE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAE3E,M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GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAEvC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAChC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QAElE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAEhC,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAE,mCAAmC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QAE3G,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACtD,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAE,mCAAmC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IAC1G,CAAC,CAAC,CAAC;IAGH,EAAE,CAAC,iCAAiC,EAAE,KAAK,IAAI,EAAE;QAChD,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,SAAS,oBAAM,SAAS,CAAC,IAAyB,EAAI,CAAC,CAAC;QAE/E,MAAM,CAAC,MAAM,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACzD,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { describe, it, afterEach } from \"mocha\";\nimport { expect } from \"chai\";\nimport { PreloadListProps } from \"../Preloads\";\nimport { EmptyList, PopulatedList } from \"../stories/Preloads.stories\";\n\n// For running accessibility scans\nimport { accessibilityAssessor } from \"./a11y_helper\";\n\n// For testing user interactions (like click events):\nimport sinon from \"sinon\";\n// Necessary to allow sinon to work with mocked actions (which are shown in the Actions panel in Storybook)\nimport addons, { mockChannel } from \"@storybook/addons\";\naddons.setChannel(mockChannel());\n\ndescribe(\"<Preloads/>\", () => {\n\t// Used to clear after each interactive test using sinon\n\tafterEach(() => {\n\t\tsinon.restore();\n\t});\n\n\tit(\"should be empty\", () => {\n\t\tconst wrapper = mount(<EmptyList {...(EmptyList.args as PreloadListProps)} />);\n\n\t\texpect(wrapper.find(\"button\").exists(), \"The button exists\").to.be.true;\n\t\texpect(wrapper.find(\"button\").text(), \"The button's text\").to.equal(\"Add\");\n\n\t\texpect(wrapper.find(\".app-list-empty\").exists(), \"Empty message exists\").to.be.true;\n\t\texpect(wrapper.find(\".app-list-empty\").text(), \"Empty message text\").to.contain(\"to add preloads\");\n\t\texpect(wrapper.find(\".app-list-empty.no-dropzone\").exists(), \"Empty message has no dropzone styling\").to.be.true;\n\t});\n\n\tit(\"should call correct functions\", () => {\n\t\tconst props = {\n\t\t\tdeletePreload: sinon.spy(),\n\t\t\tsetEditView: sinon.spy(),\n\t\t\tpreloads: PopulatedList.args?.preloads,\n\t\t};\n\t\tconst wrapper = mount(<PopulatedList {...(props as PreloadListProps)} />);\n\t\texpect(wrapper.find(\".app-list-empty\").exists(), \"Empty message should not exist\").to.be.false;\n\n\t\texpect(props.setEditView.called, \"Add button not clicked yet\").to.be.false;\n\t\texpect(props.deletePreload.called, \"Delete button not clicked yet\").to.be.false;\n\t\texpect(props.setEditView.called, \"Preload not clicked yet\").to.be.false;\n\n\t\tconst buttons = wrapper.find(\"button\");\n\n\t\tbuttons.at(0).simulate(\"click\");\n\t\texpect(props.setEditView.called, \"Button was clicked\").to.be.true;\n\n\t\tbuttons.at(1).simulate(\"click\");\n\t\t// Expecting the 2nd preload because ItemList orders it\n\t\texpect(props.deletePreload.calledWith(\"native-overrides\"), \"Correct param passed in to delete\").to.be.true;\n\n\t\twrapper.find(\".app-list-row\").at(0).simulate(\"click\");\n\t\texpect(props.setEditView.calledWith(\"native-overrides\"), \"Correct param passed in to delete\").to.be.true;\n\t});\n\n\t// Example accessibility scan\n\tit(\"should pass accessibility scans\", async () => {\n\t\tconst wrapper = mount(<EmptyList {...(EmptyList.args as PreloadListProps)} />);\n\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\n\t});\n});\n"]}
@@ -5,7 +5,7 @@ import { expect } from "chai";
5
5
  import { DefaultSDD } from "../stories/SmartDesktopDesigner.stories";
6
6
  import { waitTick } from "../sdd_helpers";
7
7
  import { ACTIVE_TAB_APP_LIST_TABLE_ROW } from "./Applications.spec";
8
- const PROJECT_NAME_INPUT = "#project-name", PROJECT_NAME_WARNING = ".project-name-error-icon", APPLICATIONS_TAB = "#applications-nav-link", MENUS_TAB = '[aria-controls="tabpanel-1"]', ADD_MENU_BUTTON = "[data-label='Menus'] .button-container-primary.icon-before-add button", SAVE_MENU_BUTTON = ".app-edit-actions .button-container-secondary button", EMPTY_MENU_NAV_WARNING = "#applications-nav-link .nav-error-icon", PUBLISH_TAB = "#export-nav-link", PROJECT_ERROR = ".project-errors-container .project-error";
8
+ const PROJECT_NAME_INPUT = "#project-name", PROJECT_NAME_WARNING = ".project-name-error-icon", TOOLBAR_TAB = "#toolbar-nav-link", ADD_MENU_BUTTON = "[data-label='Menus'] .button-container-primary.icon-before-add button", SAVE_MENU_BUTTON = ".app-edit-actions .button-container-secondary button", EMPTY_MENU_NAV_WARNING = "#toolbar-nav-link .nav-error-icon", PUBLISH_TAB = "#export-nav-link", PROJECT_ERROR = ".project-errors-container .project-error";
9
9
  const doClick = (element, name) => {
10
10
  expect(element.length, name).to.be.greaterThan(0);
11
11
  element.simulate("click");
@@ -15,16 +15,7 @@ describe("<ProjectErrors/>", () => {
15
15
  const wrapper = mount(React.createElement(DefaultSDD, Object.assign({}, DefaultSDD.args)));
16
16
  await waitTick();
17
17
  wrapper.update();
18
- const projectName = wrapper.find(PROJECT_NAME_INPUT).at(0);
19
- projectName.simulate("focus");
20
- projectName.simulate("input", { target: { value: "~!invalid/name" } });
21
- projectName.simulate("blur");
22
- await waitTick();
23
- wrapper.update();
24
- doClick(wrapper.find(APPLICATIONS_TAB).at(0), "APPLICATIONS_TAB");
25
- await waitTick();
26
- wrapper.update();
27
- doClick(wrapper.find(MENUS_TAB).at(0), "MENUS_TAB");
18
+ doClick(wrapper.find(TOOLBAR_TAB).at(0), "TOOLBAR_TAB");
28
19
  await waitTick();
29
20
  wrapper.update();
30
21
  doClick(wrapper.find(ADD_MENU_BUTTON).at(0), "ADD_MENU_BUTTON");
@@ -43,13 +34,11 @@ describe("<ProjectErrors/>", () => {
43
34
  wrapper.update();
44
35
  expect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length, "Menu list shows 1 empty menu").to.be.equal(1);
45
36
  expect(wrapper.find(EMPTY_MENU_NAV_WARNING).length, "Empty Menu Nav Warning").to.equal(0);
46
- expect(wrapper.find(PROJECT_NAME_WARNING).length, "Project Name Warning").to.equal(0);
47
37
  wrapper.find(PUBLISH_TAB).at(0).simulate("click");
48
38
  await waitTick();
49
39
  wrapper.update();
50
40
  expect(wrapper.find(EMPTY_MENU_NAV_WARNING).length, "Empty Menu Nav Warning").to.equal(1);
51
- expect(wrapper.find(PROJECT_NAME_WARNING).length, "Project Name Warning").to.equal(1);
52
- expect(wrapper.find(PROJECT_ERROR).length, "Project Errors").to.equal(2);
41
+ expect(wrapper.find(PROJECT_ERROR).length, "Project Errors").to.equal(1);
53
42
  });
54
43
  });
55
44
  //# sourceMappingURL=ProjectErrors.spec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProjectErrors.spec.js","sourceRoot":"","sources":["../../../../src/components/smartDesktopDesigner/tests/ProjectErrors.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAgB,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,M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CAAC,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC1F,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAEtF,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAElD,MAAM,QAAQ,EAAE,CAAC;QACjB,OAAO,CAAC,MAAM,EAAE,CAAC;QAEjB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC1F,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACtF,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC1E,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount, ReactWrapper } from \"enzyme\";\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport { DefaultSDD } from \"../stories/SmartDesktopDesigner.stories\";\nimport { waitTick } from \"../sdd_helpers\";\nimport { SmartDesktopDesignerProps } from \"../SmartDesktopDesigner\";\nimport { ACTIVE_TAB_APP_LIST_TABLE_ROW } from \"./Applications.spec\";\n\nconst PROJECT_NAME_INPUT = \"#project-name\",\n\tPROJECT_NAME_WARNING = \".project-name-error-icon\",\n\tAPPLICATIONS_TAB = \"#applications-nav-link\",\n\tMENUS_TAB = '[aria-controls=\"tabpanel-1\"]',\n\tADD_MENU_BUTTON = \"[data-label='Menus'] .button-container-primary.icon-before-add button\",\n\tSAVE_MENU_BUTTON = \".app-edit-actions .button-container-secondary button\",\n\tEMPTY_MENU_NAV_WARNING = \"#applications-nav-link .nav-error-icon\",\n\tPUBLISH_TAB = \"#export-nav-link\",\n\tPROJECT_ERROR = \".project-errors-container .project-error\";\n\nconst doClick = (element: ReactWrapper, name: string) => {\n\texpect(element.length, name).to.be.greaterThan(0);\n\n\telement.simulate(\"click\");\n};\n\ndescribe(\"<ProjectErrors/>\", () => {\n\tit(\"should show project errors for invalid SDD sections\", async () => {\n\t\tconst wrapper = mount(<DefaultSDD {...(DefaultSDD.args as SmartDesktopDesignerProps)} />);\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\tconst projectName = wrapper.find(PROJECT_NAME_INPUT).at(0);\n\n\t\tprojectName.simulate(\"focus\");\n\t\tprojectName.simulate(\"input\", { target: { value: \"~!invalid/name\" } });\n\t\tprojectName.simulate(\"blur\");\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\tdoClick(wrapper.find(APPLICATIONS_TAB).at(0), \"APPLICATIONS_TAB\");\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\tdoClick(wrapper.find(MENUS_TAB).at(0), \"MENUS_TAB\");\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\tdoClick(wrapper.find(ADD_MENU_BUTTON).at(0), \"ADD_MENU_BUTTON\");\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\t// Set name as \"Charts\"\n\t\twrapper\n\t\t\t.find(\"#menu-name\")\n\t\t\t.at(0)\n\t\t\t.simulate(\"change\", {\n\t\t\t\ttarget: {\n\t\t\t\t\tvalue: \"Charts\",\n\t\t\t\t},\n\t\t\t});\n\n\t\t// Click Save\n\t\twrapper.find(SAVE_MENU_BUTTON).at(0).simulate(\"click\");\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\texpect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length, \"Menu list shows 1 empty menu\").to.be.equal(1);\n\n\t\texpect(wrapper.find(EMPTY_MENU_NAV_WARNING).length, \"Empty Menu Nav Warning\").to.equal(0);\n\t\texpect(wrapper.find(PROJECT_NAME_WARNING).length, \"Project Name Warning\").to.equal(0);\n\n\t\twrapper.find(PUBLISH_TAB).at(0).simulate(\"click\");\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\texpect(wrapper.find(EMPTY_MENU_NAV_WARNING).length, \"Empty Menu Nav Warning\").to.equal(1);\n\t\texpect(wrapper.find(PROJECT_NAME_WARNING).length, \"Project Name Warning\").to.equal(1);\n\t\texpect(wrapper.find(PROJECT_ERROR).length, \"Project Errors\").to.equal(2);\n\t});\n});\n"]}
1
+ {"version":3,"file":"ProjectErrors.spec.js","sourceRoot":"","sources":["../../../../src/components/smartDesktopDesigner/tests/ProjectErrors.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAgB,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AAEpE,MAAM,kBAAkB,GAAG,eAAe,EACzC,oBAAoB,GAAG,0BAA0B,EACjD,WAAW,GAAG,mBAAmB,EACjC,eAAe,GAAG,uEAAuE,EACzF,gBAAgB,GAAG,sDAAsD,EACzE,sBAAsB,GAAG,mCAAmC,EAC5D,WAAW,GAAG,kBAAkB,EAChC,aAAa,GAAG,0CAA0C,CAAC;AAE5D,MAAM,OAAO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AAC,6BAA6B,CAAC,CAAC,MAAM,EAAE,8BAA8B,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAE1G,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAE1F,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAElD,MAAM,QAAQ,EAAE,CAAC;QACjB,OAAO,CAAC,MAAM,EAAE,CAAC;QAEjB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC1F,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC1E,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount, ReactWrapper } from \"enzyme\";\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport { DefaultSDD } from \"../stories/SmartDesktopDesigner.stories\";\nimport { waitTick } from \"../sdd_helpers\";\nimport { SmartDesktopDesignerProps } from \"../SmartDesktopDesigner\";\nimport { ACTIVE_TAB_APP_LIST_TABLE_ROW } from \"./Applications.spec\";\n\nconst PROJECT_NAME_INPUT = \"#project-name\",\n\tPROJECT_NAME_WARNING = \".project-name-error-icon\",\n\tTOOLBAR_TAB = \"#toolbar-nav-link\",\n\tADD_MENU_BUTTON = \"[data-label='Menus'] .button-container-primary.icon-before-add button\",\n\tSAVE_MENU_BUTTON = \".app-edit-actions .button-container-secondary button\",\n\tEMPTY_MENU_NAV_WARNING = \"#toolbar-nav-link .nav-error-icon\",\n\tPUBLISH_TAB = \"#export-nav-link\",\n\tPROJECT_ERROR = \".project-errors-container .project-error\";\n\nconst doClick = (element: ReactWrapper, name: string) => {\n\texpect(element.length, name).to.be.greaterThan(0);\n\n\telement.simulate(\"click\");\n};\n\ndescribe(\"<ProjectErrors/>\", () => {\n\tit(\"should show project errors for invalid SDD sections\", async () => {\n\t\tconst wrapper = mount(<DefaultSDD {...(DefaultSDD.args as SmartDesktopDesignerProps)} />);\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\tdoClick(wrapper.find(TOOLBAR_TAB).at(0), \"TOOLBAR_TAB\");\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\tdoClick(wrapper.find(ADD_MENU_BUTTON).at(0), \"ADD_MENU_BUTTON\");\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\t// Set name as \"Charts\"\n\t\twrapper\n\t\t\t.find(\"#menu-name\")\n\t\t\t.at(0)\n\t\t\t.simulate(\"change\", {\n\t\t\t\ttarget: {\n\t\t\t\t\tvalue: \"Charts\",\n\t\t\t\t},\n\t\t\t});\n\n\t\t// Click Save\n\t\twrapper.find(SAVE_MENU_BUTTON).at(0).simulate(\"click\");\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\texpect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length, \"Menu list shows 1 empty menu\").to.be.equal(1);\n\n\t\texpect(wrapper.find(EMPTY_MENU_NAV_WARNING).length, \"Empty Menu Nav Warning\").to.equal(0);\n\n\t\twrapper.find(PUBLISH_TAB).at(0).simulate(\"click\");\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\texpect(wrapper.find(EMPTY_MENU_NAV_WARNING).length, \"Empty Menu Nav Warning\").to.equal(1);\n\t\texpect(wrapper.find(PROJECT_ERROR).length, \"Project Errors\").to.equal(1);\n\t});\n});\n"]}
@@ -14,21 +14,19 @@ describe("<SmartDesktopDesigner/>", () => {
14
14
  {
15
15
  nav: {
16
16
  id: "applications-nav-link",
17
- title: "Apps",
17
+ title: "Manage apps",
18
18
  },
19
- ql: {
20
- id: "application",
21
- title: "Add an app",
19
+ },
20
+ {
21
+ nav: {
22
+ id: "applications-optional-nav-link",
23
+ title: "Optional",
22
24
  },
23
25
  },
24
26
  {
25
27
  nav: {
26
28
  id: "themes-nav-link",
27
- title: "Themes",
28
- },
29
- ql: {
30
- id: "theme",
31
- title: "Themes",
29
+ title: "Theme",
32
30
  },
33
31
  },
34
32
  {
@@ -36,20 +34,12 @@ describe("<SmartDesktopDesigner/>", () => {
36
34
  id: "authentication-nav-link",
37
35
  title: "Authentication",
38
36
  },
39
- ql: {
40
- id: "authentication",
41
- title: "Authentication",
42
- },
43
37
  },
44
38
  {
45
39
  nav: {
46
40
  id: "export-nav-link",
47
41
  title: "Publish",
48
42
  },
49
- ql: {
50
- id: "publish",
51
- title: "Publish",
52
- },
53
43
  },
54
44
  ].forEach((target) => {
55
45
  it(`should navigate to ${target.nav.title} from left navigation`, async () => {
@@ -63,19 +53,6 @@ describe("<SmartDesktopDesigner/>", () => {
63
53
  expect(wrapper.find(`.nav-item.active #${target.nav.id}`).length, `${target.nav.id} is active`).to.equal(1);
64
54
  expect(wrapper.find(".view-title .leftSide").at(0).text(), `page title is "${target.nav.title}"`).contains(target.nav.title);
65
55
  });
66
- if (target.ql) {
67
- it(`should navigate to ${target.ql.title} from quicklinks on GettingStarted`, async () => {
68
- const wrapper = mount(React.createElement(DefaultSDD, Object.assign({}, DefaultSDD.args)));
69
- await waitTick();
70
- wrapper.update();
71
- expect(wrapper.find(".nav-item.active #getting-started-nav-link").length, "Currently on Getting Started").to.equal(1);
72
- wrapper.find(`.button-container-tile.icon-${target.ql.id} button`).at(0).simulate("click");
73
- await waitTick();
74
- wrapper.update();
75
- expect(wrapper.find(`.nav-item.active #${target.nav.id}`).length, `${target.nav.id} is active`).to.equal(1);
76
- expect(wrapper.find(".view-title .leftSide").at(0).text(), `page title is "${target.ql.title}"`).contains(target.ql.title);
77
- });
78
- }
79
56
  });
80
57
  });
81
58
  //# sourceMappingURL=SmartDesktopDesigner.spec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SmartDesktopDesigner.spec.js","sourceRoot":"","sources":["../../../../src/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEtD,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACxC,EAAE,CAAC,wCAAwC,EAAE,KAAK,IAAI,EAAE;QACvD,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,UAAU,oBAAM,UAAU,CAAC,IAAkC,EAAI,CAAC,CAAC;QAE1F,MAAM,CAAC,MAAM,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACzD,CAAC,CAAC,CAAC;IAEH;QACC;YACC,GAAG,EAAE;gBACJ,EAAE,EAAE,uBAAuB;gBAC3B,KAAK,EAAE,MAAM;aACb;YACD,EAAE,EAAE;gBACH,EAAE,EAAE,aAAa;gBACjB,KAAK,EAAE,YAAY;aACnB;SACD;QACD;YACC,GAAG,EAAE;gBACJ,EAAE,EAAE,iBAAiB;gBACrB,KAAK,EAAE,QAAQ;aACf;YACD,EAAE,EAAE;gBACH,EAAE,EAAE,OAAO;gBACX,KAAK,EAAE,QAAQ;aACf;S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AQ,CACxG,MAAM,CAAC,EAAE,CAAC,KAAK,CACf,CAAC;YACH,CAAC,CAAC,CAAC;SACH;IACF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport { DefaultSDD } from \"../stories/SmartDesktopDesigner.stories\";\nimport { waitTick } from \"../sdd_helpers\";\nimport { SmartDesktopDesignerProps } from \"../SmartDesktopDesigner\";\nimport { accessibilityAssessor } from \"./a11y_helper\";\n\ndescribe(\"<SmartDesktopDesigner/>\", () => {\n\tit(\"should pass accessibility scans (Page)\", async () => {\n\t\tconst wrapper = mount(<DefaultSDD {...(DefaultSDD.args as SmartDesktopDesignerProps)} />);\n\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\n\t});\n\n\t[\n\t\t{\n\t\t\tnav: {\n\t\t\t\tid: \"applications-nav-link\",\n\t\t\t\ttitle: \"Apps\",\n\t\t\t},\n\t\t\tql: {\n\t\t\t\tid: \"application\",\n\t\t\t\ttitle: \"Add an app\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tnav: {\n\t\t\t\tid: \"themes-nav-link\",\n\t\t\t\ttitle: \"Themes\",\n\t\t\t},\n\t\t\tql: {\n\t\t\t\tid: \"theme\",\n\t\t\t\ttitle: \"Themes\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tnav: {\n\t\t\t\tid: \"authentication-nav-link\",\n\t\t\t\ttitle: \"Authentication\",\n\t\t\t},\n\t\t\tql: {\n\t\t\t\tid: \"authentication\",\n\t\t\t\ttitle: \"Authentication\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tnav: {\n\t\t\t\tid: \"export-nav-link\",\n\t\t\t\ttitle: \"Publish\",\n\t\t\t},\n\t\t\tql: {\n\t\t\t\tid: \"publish\",\n\t\t\t\ttitle: \"Publish\",\n\t\t\t},\n\t\t},\n\t].forEach((target) => {\n\t\tit(`should navigate to ${target.nav.title} from left navigation`, async () => {\n\t\t\tconst wrapper = mount(<DefaultSDD {...(DefaultSDD.args as SmartDesktopDesignerProps)} />);\n\n\t\t\tawait waitTick();\n\t\t\twrapper.update();\n\n\t\t\texpect(\n\t\t\t\twrapper.find(\".nav-item.active #getting-started-nav-link\").length,\n\t\t\t\t\"Currently on Getting Started\"\n\t\t\t).to.equal(1);\n\n\t\t\twrapper.find(`.nav-item #${target.nav.id}`).at(0).simulate(\"click\");\n\n\t\t\tawait waitTick();\n\t\t\twrapper.update();\n\n\t\t\texpect(wrapper.find(`.nav-item.active #${target.nav.id}`).length, `${target.nav.id} is active`).to.equal(1);\n\t\t\texpect(wrapper.find(\".view-title .leftSide\").at(0).text(), `page title is \"${target.nav.title}\"`).contains(\n\t\t\t\ttarget.nav.title\n\t\t\t);\n\t\t});\n\n\t\tif (target.ql) {\n\t\t\tit(`should navigate to ${target.ql.title} from quicklinks on GettingStarted`, async () => {\n\t\t\t\tconst wrapper = mount(<DefaultSDD {...(DefaultSDD.args as SmartDesktopDesignerProps)} />);\n\n\t\t\t\tawait waitTick();\n\t\t\t\twrapper.update();\n\n\t\t\t\texpect(\n\t\t\t\t\twrapper.find(\".nav-item.active #getting-started-nav-link\").length,\n\t\t\t\t\t\"Currently on Getting Started\"\n\t\t\t\t).to.equal(1);\n\n\t\t\t\twrapper.find(`.button-container-tile.icon-${target.ql.id} button`).at(0).simulate(\"click\");\n\n\t\t\t\tawait waitTick();\n\t\t\t\twrapper.update();\n\n\t\t\t\texpect(wrapper.find(`.nav-item.active #${target.nav.id}`).length, `${target.nav.id} is active`).to.equal(1);\n\t\t\t\texpect(wrapper.find(\".view-title .leftSide\").at(0).text(), `page title is \"${target.ql.title}\"`).contains(\n\t\t\t\t\ttarget.ql.title\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\t});\n});\n"]}
1
+ {"version":3,"file":"SmartDesktopDesigner.spec.js","sourceRoot":"","sources":["../../../../src/components/smartDesktopDesigner/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AAC,GAAG,CAAC,KAAK,uBAAuB,EAAE,KAAK,IAAI,EAAE;YAC5E,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,UAAU,oBAAM,UAAU,CAAC,IAAkC,EAAI,CAAC,CAAC;YAE1F,MAAM,QAAQ,EAAE,CAAC;YACjB,OAAO,CAAC,MAAM,EAAE,CAAC;YAEjB,MAAM,CACL,OAAO,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC,MAAM,EACjE,8BAA8B,CAC9B,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAEd,OAAO,CAAC,IAAI,CAAC,cAAc,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YAEpE,MAAM,QAAQ,EAAE,CAAC;YACjB,OAAO,CAAC,MAAM,EAAE,CAAC;YAEjB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,GAAG,CAAC,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAC5G,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,kBAAkB,MAAM,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,QAAQ,CACzG,MAAM,CAAC,GAAG,CAAC,KAAK,CAChB,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport { DefaultSDD } from \"../stories/SmartDesktopDesigner.stories\";\nimport { waitTick } from \"../sdd_helpers\";\nimport { SmartDesktopDesignerProps } from \"../SmartDesktopDesigner\";\nimport { accessibilityAssessor } from \"./a11y_helper\";\n\ndescribe(\"<SmartDesktopDesigner/>\", () => {\n\tit(\"should pass accessibility scans (Page)\", async () => {\n\t\tconst wrapper = mount(<DefaultSDD {...(DefaultSDD.args as SmartDesktopDesignerProps)} />);\n\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\n\t});\n\n\t[\n\t\t{\n\t\t\tnav: {\n\t\t\t\tid: \"applications-nav-link\",\n\t\t\t\ttitle: \"Manage apps\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tnav: {\n\t\t\t\tid: \"applications-optional-nav-link\",\n\t\t\t\ttitle: \"Optional\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tnav: {\n\t\t\t\tid: \"themes-nav-link\",\n\t\t\t\ttitle: \"Theme\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tnav: {\n\t\t\t\tid: \"authentication-nav-link\",\n\t\t\t\ttitle: \"Authentication\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tnav: {\n\t\t\t\tid: \"export-nav-link\",\n\t\t\t\ttitle: \"Publish\",\n\t\t\t},\n\t\t},\n\t].forEach((target) => {\n\t\tit(`should navigate to ${target.nav.title} from left navigation`, async () => {\n\t\t\tconst wrapper = mount(<DefaultSDD {...(DefaultSDD.args as SmartDesktopDesignerProps)} />);\n\n\t\t\tawait waitTick();\n\t\t\twrapper.update();\n\n\t\t\texpect(\n\t\t\t\twrapper.find(\".nav-item.active #getting-started-nav-link\").length,\n\t\t\t\t\"Currently on Getting Started\"\n\t\t\t).to.equal(1);\n\n\t\t\twrapper.find(`.nav-item #${target.nav.id}`).at(0).simulate(\"click\");\n\n\t\t\tawait waitTick();\n\t\t\twrapper.update();\n\n\t\t\texpect(wrapper.find(`.nav-item.active #${target.nav.id}`).length, `${target.nav.id} is active`).to.equal(1);\n\t\t\texpect(wrapper.find(\".view-title .leftSide\").at(0).text(), `page title is \"${target.nav.title}\"`).contains(\n\t\t\t\ttarget.nav.title\n\t\t\t);\n\t\t});\n\t});\n});\n"]}
@@ -0,0 +1 @@
1
+ export declare const ADD_NEW_APP_BUTTON = ".icon-before-add button", ACTIVE_TAB_APP_LIST_TABLE_ROW = ".app-list-row", APP_LIST_EMPTY_MESSAGE = ".app-list-empty", PAGE_HEADER = ".view-title .leftSide", PAGE_HEADER_BUTTON = ".view-title .leftSide button", SETUP_WIZARD_BUTTON = ".tile-type-buttons .icon-wizard button", SETUP_MANUAL_BUTTON = ".tile-type-buttons .icon-manual button", APP_ACCESS_RULE = ".app-edit-access-item", APP_ACCESS_BLOCKED = ".app-edit-access-blocked", QUICK_ADD_APP = ".quick-add-app", QUICK_ADD_APP_URL = ".quick-add-app #app-url", QUICK_ADD_APP_BUTTON = ".save-button-container button";
@@ -0,0 +1,203 @@
1
+ import * as React from "react";
2
+ import { mount } from "enzyme";
3
+ import { describe, it } from "mocha";
4
+ import { expect } from "chai";
5
+ import { DefaultApplications, EmptyApplications, Long } from "../stories/Toolbar.stories";
6
+ import { getToolbarArgs } from "../fixtures/apps";
7
+ import { waitTick } from "../sdd_helpers";
8
+ import { accessibilityAssessor } from "./a11y_helper";
9
+ import addons, { mockChannel } from "@storybook/addons";
10
+ addons.setChannel(mockChannel());
11
+ export const ADD_NEW_APP_BUTTON = ".icon-before-add button", ACTIVE_TAB_APP_LIST_TABLE_ROW = ".app-list-row", APP_LIST_EMPTY_MESSAGE = ".app-list-empty", PAGE_HEADER = ".view-title .leftSide", PAGE_HEADER_BUTTON = ".view-title .leftSide button", SETUP_WIZARD_BUTTON = ".tile-type-buttons .icon-wizard button", SETUP_MANUAL_BUTTON = ".tile-type-buttons .icon-manual button", APP_ACCESS_RULE = ".app-edit-access-item", APP_ACCESS_BLOCKED = ".app-edit-access-blocked", QUICK_ADD_APP = ".quick-add-app", QUICK_ADD_APP_URL = ".quick-add-app #app-url", QUICK_ADD_APP_BUTTON = ".save-button-container button";
12
+ const preventable = {
13
+ preventDefault: () => { },
14
+ stopPropagation: () => { },
15
+ };
16
+ describe("SDD: <Toolbar /> - Menu tab", () => {
17
+ it("should pass accessibility scans", async () => {
18
+ const wrapper = mount(React.createElement(DefaultApplications, Object.assign({}, DefaultApplications.args)));
19
+ expect(await accessibilityAssessor(wrapper)).to.be.true;
20
+ });
21
+ it("should display empty state with 0 menus", async () => {
22
+ const wrapper = mount(React.createElement(EmptyApplications, Object.assign({}, getToolbarArgs("empty"))));
23
+ await waitTick();
24
+ wrapper.update();
25
+ expect(wrapper.find(ADD_NEW_APP_BUTTON).first().text()).to.contain("Add");
26
+ expect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length).to.be.equal(0);
27
+ expect(wrapper.find(".app-list-empty").first().text()).to.contain("nothing here");
28
+ });
29
+ it("should display menu name and delete button when there are 1+ menus", async () => {
30
+ const wrapper = mount(React.createElement(DefaultApplications, Object.assign({}, getToolbarArgs("default"))));
31
+ await waitTick();
32
+ wrapper.update();
33
+ expect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length).to.be.equal(1);
34
+ expect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).first().text()).to.contain("Examples");
35
+ expect(wrapper.find(".app-list-row .icon-delete").exists()).to.be.true;
36
+ });
37
+ it("MenuEdit: should have an empty Name field by default", () => {
38
+ const wrapper = mount(React.createElement(DefaultApplications, Object.assign({}, getToolbarArgs("default"))));
39
+ wrapper.find(ADD_NEW_APP_BUTTON).first().simulate("click");
40
+ expect(wrapper.find("#menu-name").first().prop("value")).to.equal("");
41
+ });
42
+ it("should display disabled Add New button when there are 5 menus", async () => {
43
+ const wrapper = mount(React.createElement(Long, Object.assign({}, getToolbarArgs("long"))));
44
+ await waitTick();
45
+ wrapper.update();
46
+ expect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length).to.be.equal(5);
47
+ expect(wrapper.find(ADD_NEW_APP_BUTTON).first().prop("disabled")).to.be.true;
48
+ });
49
+ it("MenuEdit: should disable submit button when Name field is empty", async () => {
50
+ const wrapper = mount(React.createElement(DefaultApplications, Object.assign({}, getToolbarArgs("default"))));
51
+ await waitTick();
52
+ wrapper.update();
53
+ wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).at(0).simulate("click", preventable);
54
+ wrapper
55
+ .find("#menu-name")
56
+ .at(0)
57
+ .simulate("change", {
58
+ target: {
59
+ value: "",
60
+ },
61
+ });
62
+ expect(wrapper.find("button").at(1).prop("disabled")).to.be.true;
63
+ });
64
+ const characters_49 = "Hubert Blaine Wolfeschlegelsteinhausenbergerdorff";
65
+ const characters_50 = "Hubert Blaine Wolfeschlegelsteinhausenbergerdorff!";
66
+ const characters_51 = "Hubert Blaine Wolfeschlegelsteinhausenbergerdorff!?";
67
+ it("MenuEdit: when Name input receives 49 characters, it should display 49", async () => {
68
+ const wrapper = mount(React.createElement(DefaultApplications, Object.assign({}, getToolbarArgs("default"))));
69
+ await waitTick();
70
+ wrapper.update();
71
+ wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).at(0).simulate("click", preventable);
72
+ wrapper
73
+ .find("#menu-name")
74
+ .at(0)
75
+ .simulate("change", {
76
+ target: {
77
+ value: characters_49,
78
+ },
79
+ });
80
+ expect(wrapper.find("#menu-name").prop("value")).to.equal(characters_49);
81
+ });
82
+ it("MenuEdit: when Name input receives 50 characters, it should display 50", async () => {
83
+ const wrapper = mount(React.createElement(DefaultApplications, Object.assign({}, getToolbarArgs("default"))));
84
+ await waitTick();
85
+ wrapper.update();
86
+ wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).at(0).simulate("click", preventable);
87
+ wrapper
88
+ .find("#menu-name")
89
+ .at(0)
90
+ .simulate("change", {
91
+ target: {
92
+ value: characters_50,
93
+ },
94
+ });
95
+ expect(wrapper.find("#menu-name").prop("value")).to.equal(characters_50);
96
+ });
97
+ it("MenuEdit: when Name input receives 51 characters, it should only display 50", async () => {
98
+ const wrapper = mount(React.createElement(DefaultApplications, Object.assign({}, getToolbarArgs("default"))));
99
+ await waitTick();
100
+ wrapper.update();
101
+ wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).at(0).simulate("click", preventable);
102
+ wrapper
103
+ .find("#menu-name")
104
+ .at(0)
105
+ .simulate("change", {
106
+ target: {
107
+ value: characters_51,
108
+ },
109
+ });
110
+ expect(wrapper.find("#menu-name").prop("value")).to.equal(characters_50);
111
+ });
112
+ it("MenuEdit: back button should take users back to Applications page, Menu tab", async () => {
113
+ const wrapper = mount(React.createElement(DefaultApplications, Object.assign({}, getToolbarArgs("default"))));
114
+ await waitTick();
115
+ wrapper.update();
116
+ wrapper.find(ADD_NEW_APP_BUTTON).first().simulate("click");
117
+ wrapper.find("button").first().simulate("click");
118
+ expect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length, "Still only 1 menu in list").to.be.equal(1);
119
+ });
120
+ it("MenuEdit: click Add New, then click Cancel, then see menu list has not changed", async () => {
121
+ const wrapper = mount(React.createElement(DefaultApplications, Object.assign({}, getToolbarArgs("default"))));
122
+ await waitTick();
123
+ wrapper.update();
124
+ expect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length, "Only 1 menu in list").to.be.equal(1);
125
+ wrapper.find(ADD_NEW_APP_BUTTON).first().simulate("click");
126
+ wrapper.find("button").first().simulate("click");
127
+ expect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length, "Still only 1 menu in list").to.be.equal(1);
128
+ });
129
+ it("MenuEdit: should show a new menu in the list after a menu has been added", async () => {
130
+ const wrapper = mount(React.createElement(DefaultApplications, Object.assign({}, getToolbarArgs("default"))));
131
+ await waitTick();
132
+ wrapper.update();
133
+ expect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length, "Only 1 menu in list").to.be.equal(1);
134
+ wrapper.find(ADD_NEW_APP_BUTTON).first().simulate("click");
135
+ wrapper
136
+ .find("#menu-name")
137
+ .at(0)
138
+ .simulate("change", {
139
+ target: {
140
+ value: "Charts",
141
+ },
142
+ });
143
+ wrapper.find("input[type='checkbox']").at(0).simulate("change");
144
+ console.log(6);
145
+ wrapper.find("button").at(1).simulate("click");
146
+ await waitTick();
147
+ wrapper.update();
148
+ expect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length, "Menu list shows 2 menus").to.be.equal(2);
149
+ });
150
+ it("name change to a menu should persist", async () => {
151
+ const wrapper = mount(React.createElement(DefaultApplications, Object.assign({}, getToolbarArgs("default"))));
152
+ await waitTick();
153
+ wrapper.update();
154
+ wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).at(0).simulate("click");
155
+ wrapper
156
+ .find("#menu-name")
157
+ .at(0)
158
+ .simulate("change", {
159
+ target: {
160
+ value: "Hello World",
161
+ },
162
+ });
163
+ wrapper.find("button").at(1).simulate("click");
164
+ await waitTick();
165
+ wrapper.update();
166
+ expect(wrapper.find("[role='listitem']").at(0).text()).contains("Hello World");
167
+ });
168
+ it("selected applications changes to a menu should persist", async () => {
169
+ const wrapper = mount(React.createElement(DefaultApplications, Object.assign({}, getToolbarArgs("default"))));
170
+ await waitTick();
171
+ wrapper.update();
172
+ wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).at(0).simulate("click");
173
+ wrapper.find("input[type='checkbox']").at(2).simulate("change");
174
+ wrapper.find("button").at(1).simulate("click");
175
+ await waitTick();
176
+ wrapper.update();
177
+ wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).at(0).simulate("click");
178
+ expect(wrapper.find("input[type='checkbox']").at(2).prop("checked")).to.be.true;
179
+ });
180
+ it("should not persist menu name when saving multiple menus", async () => {
181
+ const wrapper = mount(React.createElement(DefaultApplications, Object.assign({}, getToolbarArgs("default"))));
182
+ wrapper.find(ADD_NEW_APP_BUTTON).first().simulate("click");
183
+ await waitTick();
184
+ wrapper.update();
185
+ expect(wrapper.find("#menu-name").first().prop("value")).to.be.empty;
186
+ wrapper
187
+ .find("#menu-name")
188
+ .at(0)
189
+ .simulate("change", {
190
+ target: {
191
+ value: "Test",
192
+ },
193
+ });
194
+ wrapper.find("button").at(1).simulate("click");
195
+ await waitTick();
196
+ wrapper.update();
197
+ wrapper.find(ADD_NEW_APP_BUTTON).first().simulate("click");
198
+ await waitTick();
199
+ wrapper.update();
200
+ expect(wrapper.find("#menu-name").first().prop("value")).to.be.empty;
201
+ });
202
+ });
203
+ //# sourceMappingURL=Toolbar.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toolbar.spec.js","sourceRoot":"","sources":["../../../../src/components/smartDesktopDesigner/tests/Toolbar.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAE9B,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAGtD,OAAO,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACxD,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;AAEjC,MAAM,CAAC,MAAM,kBAAkB,GAAG,yBAAyB,EAC1D,6BAA6B,GAAG,eAAe,EAC/C,sBAAsB,GAAG,iBAAiB,EAC1C,WAAW,GAAG,uBAAuB,EACrC,kBAAkB,GAAG,8BAA8B,EACnD,mBAAmB,GAAG,wCAAwC,EAC9D,mBAAmB,GAAG,wCAAwC,EAC9D,eAAe,GAAG,uBAAuB,EACzC,kBAAkB,GAAG,0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CAAC;IACtE,CAAC,CAAC,CAAC;AAiCJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport { ToolbarProps } from \"../Toolbar\";\nimport { DefaultApplications, EmptyApplications, Long } from \"../stories/Toolbar.stories\";\nimport { getToolbarArgs } from \"../fixtures/apps\";\nimport { waitTick } from \"../sdd_helpers\";\n\n// For running accessibility scans\nimport { accessibilityAssessor } from \"./a11y_helper\";\n\n// Necessary to allow sinon to work with mocked actions (which are shown in the Actions panel in Storybook)\nimport addons, { mockChannel } from \"@storybook/addons\";\naddons.setChannel(mockChannel());\n\nexport const ADD_NEW_APP_BUTTON = \".icon-before-add button\",\n\tACTIVE_TAB_APP_LIST_TABLE_ROW = \".app-list-row\",\n\tAPP_LIST_EMPTY_MESSAGE = \".app-list-empty\",\n\tPAGE_HEADER = \".view-title .leftSide\",\n\tPAGE_HEADER_BUTTON = \".view-title .leftSide button\",\n\tSETUP_WIZARD_BUTTON = \".tile-type-buttons .icon-wizard button\",\n\tSETUP_MANUAL_BUTTON = \".tile-type-buttons .icon-manual button\",\n\tAPP_ACCESS_RULE = \".app-edit-access-item\",\n\tAPP_ACCESS_BLOCKED = \".app-edit-access-blocked\",\n\tQUICK_ADD_APP = \".quick-add-app\",\n\tQUICK_ADD_APP_URL = \".quick-add-app #app-url\",\n\tQUICK_ADD_APP_BUTTON = \".save-button-container button\";\n\nconst preventable = {\n\tpreventDefault: () => {},\n\tstopPropagation: () => {},\n};\n\ndescribe(\"SDD: <Toolbar /> - Menu tab\", () => {\n\t// Example accessibility scan\n\tit(\"should pass accessibility scans\", async () => {\n\t\tconst wrapper = mount(<DefaultApplications {...(DefaultApplications.args as ToolbarProps)} />);\n\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\n\t});\n\n\tit(\"should display empty state with 0 menus\", async () => {\n\t\tconst wrapper = mount(<EmptyApplications {...getToolbarArgs(\"empty\")} />);\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\texpect(wrapper.find(ADD_NEW_APP_BUTTON).first().text()).to.contain(\"Add\");\n\t\texpect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length).to.be.equal(0);\n\t\texpect(wrapper.find(\".app-list-empty\").first().text()).to.contain(\"nothing here\");\n\t});\n\tit(\"should display menu name and delete button when there are 1+ menus\", async () => {\n\t\tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\texpect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length).to.be.equal(1);\n\t\texpect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).first().text()).to.contain(\"Examples\");\n\t\texpect(wrapper.find(\".app-list-row .icon-delete\").exists()).to.be.true;\n\t});\n\tit(\"MenuEdit: should have an empty Name field by default\", () => {\n\t\tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\t\twrapper.find(ADD_NEW_APP_BUTTON).first().simulate(\"click\");\n\t\texpect(wrapper.find(\"#menu-name\").first().prop(\"value\")).to.equal(\"\");\n\t});\n\tit(\"should display disabled Add New button when there are 5 menus\", async () => {\n\t\tconst wrapper = mount(<Long {...getToolbarArgs(\"long\")} />);\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\texpect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length).to.be.equal(5);\n\t\texpect(wrapper.find(ADD_NEW_APP_BUTTON).first().prop(\"disabled\")).to.be.true;\n\t});\n\tit(\"MenuEdit: should disable submit button when Name field is empty\", async () => {\n\t\tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\twrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).at(0).simulate(\"click\", preventable);\n\t\twrapper\n\t\t\t.find(\"#menu-name\")\n\t\t\t.at(0)\n\t\t\t.simulate(\"change\", {\n\t\t\t\ttarget: {\n\t\t\t\t\tvalue: \"\",\n\t\t\t\t},\n\t\t\t});\n\t\texpect(wrapper.find(\"button\").at(1).prop(\"disabled\")).to.be.true;\n\t});\n\n\tconst characters_49 = \"Hubert Blaine Wolfeschlegelsteinhausenbergerdorff\";\n\tconst characters_50 = \"Hubert Blaine Wolfeschlegelsteinhausenbergerdorff!\";\n\tconst characters_51 = \"Hubert Blaine Wolfeschlegelsteinhausenbergerdorff!?\";\n\tit(\"MenuEdit: when Name input receives 49 characters, it should display 49\", async () => {\n\t\tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\twrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).at(0).simulate(\"click\", preventable);\n\t\twrapper\n\t\t\t.find(\"#menu-name\")\n\t\t\t.at(0)\n\t\t\t.simulate(\"change\", {\n\t\t\t\ttarget: {\n\t\t\t\t\tvalue: characters_49,\n\t\t\t\t},\n\t\t\t});\n\t\texpect(wrapper.find(\"#menu-name\").prop(\"value\")).to.equal(characters_49);\n\t});\n\tit(\"MenuEdit: when Name input receives 50 characters, it should display 50\", async () => {\n\t\tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\twrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).at(0).simulate(\"click\", preventable);\n\t\twrapper\n\t\t\t.find(\"#menu-name\")\n\t\t\t.at(0)\n\t\t\t.simulate(\"change\", {\n\t\t\t\ttarget: {\n\t\t\t\t\tvalue: characters_50,\n\t\t\t\t},\n\t\t\t});\n\t\texpect(wrapper.find(\"#menu-name\").prop(\"value\")).to.equal(characters_50);\n\t});\n\tit(\"MenuEdit: when Name input receives 51 characters, it should only display 50\", async () => {\n\t\tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\twrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).at(0).simulate(\"click\", preventable);\n\t\twrapper\n\t\t\t.find(\"#menu-name\")\n\t\t\t.at(0)\n\t\t\t.simulate(\"change\", {\n\t\t\t\ttarget: {\n\t\t\t\t\tvalue: characters_51,\n\t\t\t\t},\n\t\t\t});\n\t\texpect(wrapper.find(\"#menu-name\").prop(\"value\")).to.equal(characters_50);\n\t});\n\tit(\"MenuEdit: back button should take users back to Applications page, Menu tab\", async () => {\n\t\tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\t// Click \"Add\" button\n\t\twrapper.find(ADD_NEW_APP_BUTTON).first().simulate(\"click\");\n\n\t\t// Click \"Back\" button\n\t\twrapper.find(\"button\").first().simulate(\"click\");\n\n\t\t// expect(wrapper.find(\".visible div[data-label='Menus']\").exists(), \"Menus Tab is visible\").to.be.true;\n\t\texpect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length, \"Still only 1 menu in list\").to.be.equal(1);\n\t});\n\tit(\"MenuEdit: click Add New, then click Cancel, then see menu list has not changed\", async () => {\n\t\tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\texpect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length, \"Only 1 menu in list\").to.be.equal(1);\n\n\t\t// Click \"Add\" button\n\t\twrapper.find(ADD_NEW_APP_BUTTON).first().simulate(\"click\");\n\n\t\t// Click \"Back\" button\n\t\twrapper.find(\"button\").first().simulate(\"click\");\n\n\t\texpect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length, \"Still only 1 menu in list\").to.be.equal(1);\n\t});\n\tit(\"MenuEdit: should show a new menu in the list after a menu has been added\", async () => {\n\t\tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\texpect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length, \"Only 1 menu in list\").to.be.equal(1);\n\n\t\t// Click \"Add\" button\n\t\twrapper.find(ADD_NEW_APP_BUTTON).first().simulate(\"click\");\n\n\t\t// Set name as \"Charts\"\n\t\twrapper\n\t\t\t.find(\"#menu-name\")\n\t\t\t.at(0)\n\t\t\t.simulate(\"change\", {\n\t\t\t\ttarget: {\n\t\t\t\t\tvalue: \"Charts\",\n\t\t\t\t},\n\t\t\t});\n\n\t\t// Check \"Example Charts App\"\n\t\twrapper.find(\"input[type='checkbox']\").at(0).simulate(\"change\");\n\n\t\tconsole.log(6);\n\t\t// Click Save\n\t\twrapper.find(\"button\").at(1).simulate(\"click\");\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\t\texpect(wrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).length, \"Menu list shows 2 menus\").to.be.equal(2);\n\t});\n\tit(\"name change to a menu should persist\", async () => {\n\t\tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\t// Click Examples\n\t\twrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).at(0).simulate(\"click\");\n\n\t\t// Change name to Hello World\n\t\twrapper\n\t\t\t.find(\"#menu-name\")\n\t\t\t.at(0)\n\t\t\t.simulate(\"change\", {\n\t\t\t\ttarget: {\n\t\t\t\t\tvalue: \"Hello World\",\n\t\t\t\t},\n\t\t\t});\n\n\t\t// Click Save\n\t\twrapper.find(\"button\").at(1).simulate(\"click\");\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\t// Confirm name is Hello World\n\t\texpect(wrapper.find(\"[role='listitem']\").at(0).text()).contains(\"Hello World\");\n\t});\n\tit(\"selected applications changes to a menu should persist\", async () => {\n\t\tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\t// Click Examples\n\t\twrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).at(0).simulate(\"click\");\n\n\t\t// Select items\n\t\twrapper.find(\"input[type='checkbox']\").at(2).simulate(\"change\");\n\n\t\t// Click save\n\t\twrapper.find(\"button\").at(1).simulate(\"click\");\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\t// Click examples\n\t\twrapper.find(ACTIVE_TAB_APP_LIST_TABLE_ROW).at(0).simulate(\"click\");\n\n\t\t// Confirm items still present\n\t\texpect(wrapper.find(\"input[type='checkbox']\").at(2).prop(\"checked\")).to.be.true;\n\t});\n\tit(\"should not persist menu name when saving multiple menus\", async () => {\n\t\tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\n\t\t// Click \"Add\" button\n\t\twrapper.find(ADD_NEW_APP_BUTTON).first().simulate(\"click\");\n\n\t\tawait waitTick();\n\t\t// Confirm name field is empty\n\t\twrapper.update();\n\t\texpect(wrapper.find(\"#menu-name\").first().prop(\"value\")).to.be.empty;\n\n\t\t// Change name to Test\n\t\twrapper\n\t\t\t.find(\"#menu-name\")\n\t\t\t.at(0)\n\t\t\t.simulate(\"change\", {\n\t\t\t\ttarget: {\n\t\t\t\t\tvalue: \"Test\",\n\t\t\t\t},\n\t\t\t});\n\n\t\t// Click save\n\t\twrapper.find(\"button\").at(1).simulate(\"click\");\n\n\t\tawait waitTick();\n\t\twrapper.update();\n\n\t\t// Click \"Add\" button\n\t\twrapper.find(ADD_NEW_APP_BUTTON).first().simulate(\"click\");\n\t\tawait waitTick();\n\t\t// Confirm name field is empty\n\n\t\twrapper.update();\n\t\texpect(wrapper.find(\"#menu-name\").first().prop(\"value\")).to.be.empty;\n\t});\n\t// it(\"should show a warning icon if an empty menu is created\", async () => {\n\t// \tconst wrapper = mount(<DefaultApplications {...getToolbarArgs(\"default\")} />);\n\n\t// \t// Click \"Add\" button\n\t// \twrapper.find(ADD_NEW_APP_BUTTON).first().simulate(\"click\");\n\n\t// \tawait waitTick();\n\t// \t// Confirm name field is empty\n\t// \twrapper.update();\n\t// \texpect(wrapper.find(\"#menu-name\").first().prop(\"value\")).to.be.empty;\n\n\t// \t// Change name to Test\n\t// \twrapper\n\t// \t\t.find(\"#menu-name\")\n\t// \t\t.at(0)\n\t// \t\t.simulate(\"change\", {\n\t// \t\t\ttarget: {\n\t// \t\t\t\tvalue: \"Test\",\n\t// \t\t\t},\n\t// \t\t});\n\n\t// \t// Click save\n\t// \twrapper.find(\"button\").at(1).simulate(\"click\");\n\n\t// \tawait waitTick();\n\t// \twrapper.update();\n\n\t// \texpect(\n\t// \t\twrapper.find(\".app-list-row\").at(1).find(\".tooltip-icon-warn\").exists(),\n\t// \t\t\"Warning tooltip present in 2nd row\"\n\t// \t).to.be.true;\n\t// });\n});\n"]}