@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
@@ -3,357 +3,1149 @@ 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 { Page, EmptyPage } from "../stories/AppEditPage.stories";
7
- import { accessibilityAssessor } from "./a11y_helper";
6
+ import { Page, EmptyPage, NativePage, PageWithIconURL } from "../stories/AppEditPage.stories";
7
+ const defaults = {
8
+ name: "Test",
9
+ abstractPosition: 0,
10
+ addToWorkspace: true,
11
+ allowAutoArrange: true,
12
+ allowGrouping: true,
13
+ allowMaximize: true,
14
+ allowMinimize: true,
15
+ allowSnapping: true,
16
+ allowTabbing: true,
17
+ allowTiling: true,
18
+ alwaysOnTop: false,
19
+ appArguments: "",
20
+ appType: "web",
21
+ autoConnect: false,
22
+ description: "",
23
+ enableAOT: false,
24
+ enableTitleBar: true,
25
+ height: 600,
26
+ hideClose: false,
27
+ hideMaximize: false,
28
+ hideMinimize: false,
29
+ iconURL: "",
30
+ intents: [],
31
+ isEvergreen: false,
32
+ launchableByUser: true,
33
+ native_windowSpawnTimeout: 30,
34
+ opacity: 1,
35
+ path: "",
36
+ persistPath: true,
37
+ persistURL: true,
38
+ preloads: [],
39
+ resizable: true,
40
+ rules: [],
41
+ security: "trusted",
42
+ singleton: false,
43
+ spawnOnStartup: false,
44
+ url: "http://www.google.com",
45
+ width: 1280,
46
+ };
47
+ const testPresetInputValue = (appDataKey, selector, starter = Page, presetValue = "Test") => {
48
+ var _a;
49
+ const args = Object.assign(Object.assign({}, starter.args), { appData: Object.assign(Object.assign({}, (_a = starter.args) === null || _a === void 0 ? void 0 : _a.appData), { [appDataKey]: presetValue }) });
50
+ const wrapper = mount(React.createElement(Page, Object.assign({}, args)));
51
+ expect(wrapper.find(selector).prop("value")).to.equal(presetValue);
52
+ };
53
+ const testSaveInputValue = (appDataKey, selector, native = false, newValue = "New value") => {
54
+ const starter = native ? NativePage : Page;
55
+ const buttonSpy = sinon.spy(starter.args, "submitFn");
56
+ const wrapper = mount(React.createElement(Page, Object.assign({}, starter.args)));
57
+ wrapper
58
+ .find(selector)
59
+ .at(0)
60
+ .simulate("change", {
61
+ target: {
62
+ value: newValue,
63
+ },
64
+ });
65
+ const collection = wrapper.find("button");
66
+ collection.at(collection.length - 1).simulate("click");
67
+ expect(buttonSpy.args[0][0]).to.deep.equal(Object.assign(Object.assign(Object.assign({}, defaults), (native
68
+ ? {
69
+ appType: "native",
70
+ path: "test.exe",
71
+ }
72
+ : {})), { [appDataKey]: newValue }));
73
+ };
74
+ const testSubmitOnEnter = (selector, starter = Page) => {
75
+ const buttonSpy = sinon.spy(starter.args, "submitFn");
76
+ const wrapper = mount(React.createElement(Page, Object.assign({}, starter.args)));
77
+ wrapper
78
+ .find(selector)
79
+ .at(0)
80
+ .simulate("keydown", {
81
+ key: "Enter",
82
+ preventDefault: () => { },
83
+ });
84
+ expect(buttonSpy.calledOnce).to.be.true;
85
+ };
86
+ const flipCheckbox = (appDataKey, label, presetValue) => {
87
+ var _a;
88
+ const args = Object.assign(Object.assign({}, Page.args), { appData: Object.assign(Object.assign({}, (_a = Page.args) === null || _a === void 0 ? void 0 : _a.appData), { [appDataKey]: presetValue }) });
89
+ const buttonSpy = sinon.spy(args, "submitFn");
90
+ const wrapper = mount(React.createElement(Page, Object.assign({}, args)));
91
+ wrapper.find(`[role='checkbox'][aria-label='${label}']`).simulate("click");
92
+ const collection = wrapper.find("button");
93
+ const saveButton = collection.at(collection.length - 1);
94
+ saveButton.simulate("click");
95
+ expect(buttonSpy.args[0][0]).to.deep.equal(Object.assign(Object.assign({}, defaults), { [appDataKey]: !presetValue }));
96
+ };
97
+ const presetCheckbox = (appDataKey, label, presetValue = true, expectedValue = true) => {
98
+ var _a;
99
+ const args = Object.assign(Object.assign({}, Page.args), { appData: Object.assign(Object.assign({}, (_a = Page.args) === null || _a === void 0 ? void 0 : _a.appData), { [appDataKey]: presetValue }) });
100
+ const wrapper = mount(React.createElement(Page, Object.assign({}, args)));
101
+ expect(wrapper.find(`[role='checkbox'][aria-label='${label}']`).prop("aria-checked")).to.equal(expectedValue);
102
+ };
103
+ const checkUniqueRadioButtons = (name, numberOfButtons, starter = Page) => {
104
+ const wrapper = mount(React.createElement(Page, Object.assign({}, starter.args)));
105
+ const locator = `input[type='radio'][name='${name}']`;
106
+ for (let i = 0; i < numberOfButtons; i++) {
107
+ wrapper.find(locator).at(i).simulate("change");
108
+ for (let j = 0; j < numberOfButtons; j++) {
109
+ expect(wrapper.find(locator).at(j).prop("checked"), `When radio #${i + 1} is clicked, is radio #${j + 1} checked?`).to.equal(i === j);
110
+ }
111
+ }
112
+ };
113
+ const presetRadioButtons = (name, presetData, radioChecked) => {
114
+ var _a;
115
+ const args = Object.assign(Object.assign({}, Page.args), { appData: Object.assign(Object.assign({}, (_a = Page.args) === null || _a === void 0 ? void 0 : _a.appData), presetData) });
116
+ const wrapper = mount(React.createElement(Page, Object.assign({}, args)));
117
+ radioChecked.forEach((radioButton, key) => {
118
+ expect(wrapper.find(`input[type='radio'][name='${name}']`).at(key).prop("checked")).to.equal(radioButton);
119
+ });
120
+ };
121
+ const saveRadioButton = (name, buttonNumberChecked, savedValues, starter = Page) => {
122
+ const buttonSpy = sinon.spy(starter.args, "submitFn");
123
+ const wrapper = mount(React.createElement(Page, Object.assign({}, starter.args)));
124
+ wrapper.find(`input[type='radio'][name='${name}']`).at(buttonNumberChecked).simulate("change");
125
+ const collection = wrapper.find("button");
126
+ const saveButton = collection.at(collection.length - 1);
127
+ saveButton.simulate("click");
128
+ const savedValue = buttonSpy.args[0][0];
129
+ for (let key in savedValues) {
130
+ expect(savedValue[key]).to.equal(savedValues[key]);
131
+ }
132
+ };
8
133
  describe("<AppEditPage/>", () => {
9
134
  afterEach(() => {
10
135
  sinon.restore();
11
136
  });
12
- it("should pass accessibility scans (Page)", async () => {
137
+ it("should call the passed-in cancel function when the cancel button is clicked", () => {
138
+ const buttonSpy = sinon.spy(Page.args, "cancelFn");
13
139
  const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
14
- expect(await accessibilityAssessor(wrapper)).to.be.true;
140
+ const collection = wrapper.find("button");
141
+ collection.at(collection.length - 2).simulate("click");
142
+ expect(buttonSpy.calledOnce).to.be.true;
15
143
  });
16
- it("should pass accessibility scans (EmptyPage)", async () => {
17
- const wrapper = mount(React.createElement(EmptyPage, Object.assign({}, EmptyPage.args)));
18
- expect(await accessibilityAssessor(wrapper)).to.be.true;
144
+ it("should call the passed-in Remove Application function when the Remove Application button is clicked", () => {
145
+ const buttonSpy = sinon.spy(Page.args, "removeApplicationFn");
146
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
147
+ const collection = wrapper.find("button");
148
+ collection.at(collection.length - 3).simulate("click");
149
+ expect(buttonSpy.calledOnce).to.be.true;
150
+ sinon.restore();
19
151
  });
20
- it("should display starting name in Name field, if name field is set", () => {
152
+ it("should call the passed-in submit function with relevant data when the submit button is clicked", () => {
153
+ const buttonSpy = sinon.spy(Page.args, "submitFn");
21
154
  const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
22
- expect(wrapper.find("#app-name").first().prop("value")).to.equal("Test");
155
+ wrapper.find("button").last().simulate("click");
156
+ expect(buttonSpy.calledOnce).to.be.true;
157
+ expect(buttonSpy.firstCall.args[0]).to.deep.equal(defaults);
23
158
  });
24
- it("should not display starting name in Name field, if no name field is set", () => {
25
- const wrapper = mount(React.createElement(EmptyPage, Object.assign({}, EmptyPage.args)));
26
- expect(wrapper.find("#app-name").first().prop("value")).to.equal("");
159
+ describe("Web versus native apps", () => {
160
+ it("If App type = web, show web-only apps and don't show native-only apps", () => {
161
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
162
+ expect(wrapper.contains("App URL")).to.be.true;
163
+ expect(wrapper.contains("File path")).to.be.false;
164
+ expect(wrapper.contains("Arguments")).to.be.false;
165
+ expect(wrapper.contains("API access")).to.be.false;
166
+ expect(wrapper.contains("Launch timeout")).to.be.false;
167
+ expect(wrapper.find("#persist-url").exists()).to.be.true;
168
+ expect(wrapper.find("#persist-path").exists()).to.be.false;
169
+ });
170
+ it("If App type = native, show native-only apps and don't show web-only apps", () => {
171
+ const wrapper = mount(React.createElement(NativePage, Object.assign({}, NativePage.args)));
172
+ expect(wrapper.contains("App URL")).to.be.false;
173
+ expect(wrapper.contains("File path")).to.be.true;
174
+ expect(wrapper.contains("Arguments")).to.be.true;
175
+ expect(wrapper.contains("API access")).to.be.true;
176
+ expect(wrapper.contains("Launch timeout")).to.be.true;
177
+ expect(wrapper.find("#persist-url").exists()).to.be.false;
178
+ expect(wrapper.find("#persist-path").exists()).to.be.true;
179
+ });
27
180
  });
28
- it("should display Name as a valid field, even if the given name is duplicate", () => {
29
- const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
30
- const appName = wrapper.find("#app-name").at(0);
31
- appName.simulate("change", {
32
- target: {
33
- value: "Used",
34
- },
35
- });
36
- expect(wrapper.find("#app-name").at(0).prop("value")).to.equal("Used");
37
- expect(!!wrapper.find("#app-name").at(0).prop("aria-invalid")).to.be.false;
38
- });
39
- it("should display invalid state for Web URL if provided URL is invalid", () => {
40
- const wrapper = mount(React.createElement(EmptyPage, Object.assign({}, EmptyPage.args)));
41
- wrapper
42
- .find("#app-url")
43
- .at(0)
44
- .simulate("change", {
45
- target: {
46
- value: "invalid",
47
- },
48
- });
49
- expect(wrapper.find("#app-url").at(0).prop("aria-invalid")).to.be.true;
50
- });
51
- it("should display invalid state for width if provided a negative number", () => {
52
- const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
53
- wrapper
54
- .find("#app-width")
55
- .at(0)
56
- .simulate("change", {
57
- target: {
58
- value: "-999",
59
- },
181
+ describe("Name", () => {
182
+ afterEach(() => {
183
+ sinon.restore();
184
+ });
185
+ it("should save correctly when edited", () => {
186
+ testSaveInputValue("name", "#app-name");
187
+ });
188
+ it("should display starting name in Name field, if name field is set", () => {
189
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
190
+ expect(wrapper.find("#app-name").first().prop("value")).to.equal("Test");
191
+ });
192
+ it("should not display starting name in Name field, if no name field is set", () => {
193
+ const wrapper = mount(React.createElement(EmptyPage, Object.assign({}, EmptyPage.args)));
194
+ expect(wrapper.find("#app-name").first().prop("value")).to.equal("");
195
+ });
196
+ it("should display Name as a valid field, even if the given name is duplicate", () => {
197
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
198
+ const appName = wrapper.find("#app-name").at(0);
199
+ appName.simulate("change", {
200
+ target: {
201
+ value: "Used",
202
+ },
203
+ });
204
+ expect(wrapper.find("#app-name").at(0).prop("value")).to.equal("Used");
205
+ expect(!!wrapper.find("#app-name").at(0).prop("aria-invalid")).to.be.false;
206
+ });
207
+ it("should have a disabled Save button if the name field is emptied", () => {
208
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
209
+ wrapper
210
+ .find("#app-name")
211
+ .at(0)
212
+ .simulate("change", {
213
+ target: {
214
+ value: "",
215
+ },
216
+ });
217
+ expect(wrapper.find("button").last().prop("disabled")).to.be.true;
218
+ });
219
+ it("should click submit button when pressing enter on Name field", () => {
220
+ testSubmitOnEnter("#app-name");
221
+ });
222
+ it("should not click submit button when pressing a key other than enter on Name field", () => {
223
+ const buttonSpy = sinon.spy(Page.args, "submitFn");
224
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
225
+ wrapper
226
+ .find("#app-name")
227
+ .at(0)
228
+ .simulate("keydown", {
229
+ key: "a",
230
+ preventDefault: () => { },
231
+ });
232
+ expect(buttonSpy.calledOnce).to.be.false;
233
+ });
234
+ it("should not submit when pressing enter on Name field IF the submit button is disabled", () => {
235
+ const buttonSpy = sinon.spy(EmptyPage.args, "submitFn");
236
+ const wrapper = mount(React.createElement(EmptyPage, Object.assign({}, EmptyPage.args)));
237
+ wrapper
238
+ .find("#app-name")
239
+ .at(0)
240
+ .simulate("keydown", {
241
+ key: "Enter",
242
+ preventDefault: () => { },
243
+ });
244
+ expect(buttonSpy.calledOnce).to.be.false;
60
245
  });
61
- expect(wrapper.find("#app-width").at(0).prop("aria-invalid")).to.be.true;
62
246
  });
63
- it("should display invalid state for width if provided an empty value", () => {
64
- const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
65
- wrapper
66
- .find("#app-width")
67
- .at(0)
68
- .simulate("change", {
69
- target: {
70
- value: "",
71
- },
247
+ describe("Icon URL", () => {
248
+ const appDataKey = "iconURL";
249
+ const selector = "#app-icon-url";
250
+ const imageSelector = ".app-icon";
251
+ it("should save correctly when edited", () => {
252
+ testSaveInputValue(appDataKey, selector);
253
+ });
254
+ it("should display pre-set values", () => {
255
+ testPresetInputValue(appDataKey, selector);
256
+ });
257
+ it("should submit on enter", () => {
258
+ testSubmitOnEnter(selector);
259
+ });
260
+ it("should display icon when icon url is provided", () => {
261
+ const wrapper = mount(React.createElement(PageWithIconURL, Object.assign({}, PageWithIconURL.args)));
262
+ expect(wrapper.find(imageSelector).exists()).to.be.true;
263
+ });
264
+ it("should not display icon when no icon url is provided", () => {
265
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
266
+ expect(wrapper.find(imageSelector).exists()).to.be.false;
267
+ });
268
+ it("when icon url field is emptied, the icon should disappear", () => {
269
+ const wrapper = mount(React.createElement(PageWithIconURL, Object.assign({}, PageWithIconURL.args)));
270
+ wrapper.find(selector).simulate("change", {
271
+ target: {
272
+ value: "",
273
+ },
274
+ });
275
+ expect(wrapper.find(imageSelector).exists()).to.be.false;
276
+ });
277
+ it("when icon url field gets a value, the icon should start displaying", () => {
278
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
279
+ wrapper.find(selector).simulate("change", {
280
+ target: {
281
+ value: "https://assets.finsemble.com/components/fdc3-workbench/fdc3-icon-256.png",
282
+ },
283
+ });
284
+ expect(wrapper.find(imageSelector).exists()).to.be.true;
72
285
  });
73
- expect(wrapper.find("#app-width").at(0).prop("aria-invalid")).to.be.true;
74
286
  });
75
- it("should display invalid state for height if provided a negative number", () => {
76
- const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
77
- wrapper
78
- .find("#app-height")
79
- .at(0)
80
- .simulate("change", {
81
- target: {
82
- value: "-999",
83
- },
287
+ describe("API Access", () => {
288
+ afterEach(() => {
289
+ sinon.restore();
290
+ });
291
+ const name = "api-access";
292
+ const nativeParams = {
293
+ appType: "native",
294
+ };
295
+ const assimilationParams = {
296
+ appType: "assimilation",
297
+ };
298
+ it.skip("should display correctly when preset: With API Access", () => {
299
+ presetRadioButtons(name, nativeParams, [true, false]);
300
+ });
301
+ it.skip("should display correctly when preset: Without API Access", () => {
302
+ presetRadioButtons(name, assimilationParams, [false, true]);
303
+ });
304
+ it("should save correctly when edited: With API Access", () => {
305
+ saveRadioButton(name, 0, nativeParams, NativePage);
306
+ });
307
+ it("should save correctly when edited: Without API Access", () => {
308
+ saveRadioButton(name, 1, assimilationParams, NativePage);
309
+ });
310
+ it("confirm that the radio buttons stay independent", () => {
311
+ checkUniqueRadioButtons(name, 2, NativePage);
312
+ });
313
+ it("should submit on enter: Yes", () => {
314
+ testSubmitOnEnter("#api-access-yes", NativePage);
315
+ });
316
+ it("should submit on enter: No", () => {
317
+ testSubmitOnEnter("#api-access-no", NativePage);
84
318
  });
85
- expect(wrapper.find("#app-height").at(0).prop("aria-invalid")).to.be.true;
86
319
  });
87
- it("should display invalid state for height if provided an empty value", () => {
88
- const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
89
- wrapper
90
- .find("#app-height")
91
- .at(0)
92
- .simulate("change", {
93
- target: {
94
- value: "",
95
- },
320
+ describe("App URL", () => {
321
+ const appDataKey = "url";
322
+ const selector = "#app-url";
323
+ it("should save correctly when edited", () => {
324
+ testSaveInputValue(appDataKey, selector);
325
+ });
326
+ it.skip("should display pre-set values", () => {
327
+ testPresetInputValue(appDataKey, selector);
328
+ });
329
+ it("should submit on enter", () => {
330
+ testSubmitOnEnter(selector);
331
+ });
332
+ it("should have a disabled Save button if the App URL field is emptied", () => {
333
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
334
+ wrapper
335
+ .find("#app-url")
336
+ .at(0)
337
+ .simulate("change", {
338
+ target: {
339
+ value: "",
340
+ },
341
+ });
342
+ expect(wrapper.find("button").last().prop("disabled")).to.be.true;
343
+ });
344
+ it("should display invalid state for App URL if provided URL is invalid", () => {
345
+ const wrapper = mount(React.createElement(EmptyPage, Object.assign({}, EmptyPage.args)));
346
+ wrapper
347
+ .find("#app-url")
348
+ .at(0)
349
+ .simulate("change", {
350
+ target: {
351
+ value: "invalid",
352
+ },
353
+ });
354
+ expect(wrapper.find("#app-url").at(0).prop("aria-invalid")).to.be.true;
355
+ });
356
+ it("should click submit button when pressing enter on App URL field", () => {
357
+ const buttonSpy = sinon.spy(Page.args, "submitFn");
358
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
359
+ wrapper
360
+ .find("#app-url")
361
+ .at(0)
362
+ .simulate("keydown", {
363
+ key: "Enter",
364
+ preventDefault: () => { },
365
+ });
366
+ expect(buttonSpy.calledOnce).to.be.true;
96
367
  });
97
- expect(wrapper.find("#app-height").at(0).prop("aria-invalid")).to.be.true;
98
368
  });
99
- it("should display App type field if isSetupWizard is false", () => {
100
- const wrapper = mount(React.createElement(EmptyPage, Object.assign({}, EmptyPage.args)));
101
- expect(wrapper.contains("App type")).to.be.false;
369
+ describe.skip("File path", () => {
102
370
  });
103
- it("should display App type filed if isSetupWizard is true", () => {
104
- const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
105
- expect(wrapper.contains("App type")).to.be.true;
371
+ describe("Arguments", () => {
372
+ const appDataKey = "appArguments";
373
+ const selector = "#app-arguments";
374
+ it("should save correctly when edited", () => {
375
+ testSaveInputValue(appDataKey, selector, true);
376
+ });
377
+ it("should display pre-set values", () => {
378
+ testPresetInputValue(appDataKey, selector, NativePage);
379
+ });
380
+ it("should submit on enter", () => {
381
+ testSubmitOnEnter(selector, NativePage);
382
+ });
383
+ it("is not required (Save button is enabled if empty)", () => {
384
+ const wrapper = mount(React.createElement(NativePage, Object.assign({}, NativePage.args)));
385
+ expect(wrapper.find(selector).prop("value")).to.be.empty;
386
+ const collection = wrapper.find("button");
387
+ const saveButton = collection.at(collection.length - 1);
388
+ expect(saveButton.prop("disabled")).to.be.false;
389
+ });
106
390
  });
107
- it("should display only Web URL if App type = Web", () => {
108
- const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
109
- wrapper
110
- .find("#app-type-web")
111
- .at(0)
112
- .simulate("change", {
113
- target: {
114
- value: "web",
115
- },
116
- });
117
- expect(wrapper.contains("Web URL")).to.be.true;
118
- expect(wrapper.contains("File Path")).to.be.false;
119
- });
120
- it("should display only File Path if App type = Native", () => {
121
- const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
122
- wrapper
123
- .find("#app-type-web")
124
- .at(0)
125
- .simulate("change", {
126
- target: {
127
- value: "native",
128
- },
129
- });
130
- expect(wrapper.contains("File Path")).to.be.true;
131
- expect(wrapper.contains("Web URL")).to.be.false;
132
- });
133
- it("should have a disabled Save button if the name field is emptied", () => {
134
- const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
135
- wrapper
136
- .find("#app-name")
137
- .at(0)
138
- .simulate("change", {
139
- target: {
140
- value: "",
141
- },
391
+ describe("Description", () => {
392
+ const appDataKey = "description";
393
+ const selector = "#app-description";
394
+ it("should save correctly when edited", () => {
395
+ testSaveInputValue(appDataKey, selector);
396
+ });
397
+ it("should display pre-set values", () => {
398
+ testPresetInputValue(appDataKey, selector);
399
+ });
400
+ it("is not required (Save button is enabled if empty)", () => {
401
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
402
+ expect(wrapper.find(selector).prop("value")).to.be.empty;
403
+ const collection = wrapper.find("button");
404
+ const saveButton = collection.at(collection.length - 1);
405
+ expect(saveButton.prop("disabled")).to.be.false;
142
406
  });
143
- expect(wrapper.find("button").at(2).prop("disabled")).to.be.true;
144
407
  });
145
- it("should have a disabled Save button if the Web URL field is emptied", () => {
146
- const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
147
- wrapper
148
- .find("#app-type-web")
149
- .at(0)
150
- .simulate("change", {
151
- target: {
152
- value: "web",
153
- },
154
- });
155
- wrapper
156
- .find("#app-url")
157
- .at(0)
158
- .simulate("change", {
159
- target: {
160
- value: "",
161
- },
162
- });
163
- expect(wrapper.find("button").at(2).prop("disabled")).to.be.true;
164
- });
165
- it("should have a disabled Save button if the Web URL field is emptied", () => {
166
- const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
167
- wrapper
168
- .find("#app-type-web")
169
- .at(0)
170
- .simulate("change", {
171
- target: {
172
- value: "web",
173
- },
174
- });
175
- wrapper
176
- .find("#app-url")
177
- .at(0)
178
- .simulate("change", {
179
- target: {
180
- value: "",
181
- },
182
- });
183
- expect(wrapper.find("button").at(2).prop("disabled")).to.be.true;
184
- });
185
- it("should have a disabled Save button if the width field is emptied", () => {
186
- const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
187
- wrapper
188
- .find("#app-width")
189
- .at(0)
190
- .simulate("change", {
191
- target: {
192
- value: "",
193
- },
408
+ describe("Select Connect", () => {
409
+ it("should display preset value (undefined rules)", () => {
410
+ var _a;
411
+ const args = Object.assign(Object.assign({}, Page.args), { appData: Object.assign(Object.assign({}, (_a = Page.args) === null || _a === void 0 ? void 0 : _a.appData), { rules: undefined }) });
412
+ const wrapper = mount(React.createElement(Page, Object.assign({}, args)));
413
+ expect(wrapper.find("input[name='interop-trust'][value='true']").prop("checked"), "Radio button 'trust all apps' is checked").to.be.true;
414
+ expect(wrapper.find(".app-edit-access").exists(), "Display SelectConnect listbox").to.be.false;
415
+ });
416
+ it("should display preset value (empty rules)", () => {
417
+ var _a;
418
+ const args = Object.assign(Object.assign({}, Page.args), { appData: Object.assign(Object.assign({}, (_a = Page.args) === null || _a === void 0 ? void 0 : _a.appData), { rules: [] }) });
419
+ const wrapper = mount(React.createElement(Page, Object.assign({}, args)));
420
+ expect(wrapper.find("input[name='interop-trust'][value='true']").prop("checked"), "Radio button 'trust all apps' is checked").to.be.true;
421
+ expect(wrapper.find(".app-edit-access").exists(), "Display SelectConnect listbox").to.be.false;
422
+ });
423
+ it("should display preset value (rules without authorize)", () => {
424
+ var _a;
425
+ const args = Object.assign(Object.assign({}, Page.args), { appData: Object.assign(Object.assign({}, (_a = Page.args) === null || _a === void 0 ? void 0 : _a.appData), { rules: [
426
+ { contextType: "fdc3.instrument", cc: "#Workspace" },
427
+ { contextType: "layout", fwd: "#Workspace" },
428
+ ] }) });
429
+ const wrapper = mount(React.createElement(Page, Object.assign({}, args)));
430
+ expect(wrapper.find("input[name='interop-trust'][value='true']").prop("checked"), "Radio button 'trust all apps' is checked").to.be.true;
431
+ expect(wrapper.find(".app-edit-access").exists(), "Display SelectConnect listbox").to.be.false;
432
+ });
433
+ it("should display preset value (rules with authorize)", () => {
434
+ var _a;
435
+ const args = Object.assign(Object.assign({}, Page.args), { appData: Object.assign(Object.assign({}, (_a = Page.args) === null || _a === void 0 ? void 0 : _a.appData), { rules: [{ authorize: [{ name: "ChartIQ Example App" }] }] }) });
436
+ const wrapper = mount(React.createElement(Page, Object.assign({}, args)));
437
+ expect(wrapper.find("input[name='interop-trust'][value='false']").prop("checked"), "Radio button 'trust selected apps' is checked").to.be.true;
438
+ expect(wrapper.find(".app-edit-access").exists(), "Display SelectConnect listbox").to.be.true;
439
+ });
440
+ it("should display preset value (rules with empty authorize)", () => {
441
+ var _a;
442
+ const args = Object.assign(Object.assign({}, Page.args), { appData: Object.assign(Object.assign({}, (_a = Page.args) === null || _a === void 0 ? void 0 : _a.appData), { rules: [{ authorize: [] }] }) });
443
+ const wrapper = mount(React.createElement(Page, Object.assign({}, args)));
444
+ expect(wrapper.find("input[name='interop-trust'][value='false']").prop("checked"), "Radio button 'trust selected apps' is checked").to.be.true;
445
+ expect(wrapper.find(".app-edit-access").exists(), "Display SelectConnect listbox").to.be.true;
446
+ });
447
+ it.skip("confirm that the radio buttons stay independent", () => {
448
+ checkUniqueRadioButtons("interop-trust", 2);
194
449
  });
195
- expect(wrapper.find("button").at(2).prop("disabled")).to.be.true;
196
450
  });
197
- it("should have a disabled Save button if the height field is emptied", () => {
198
- const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
199
- wrapper
200
- .find("#app-height")
201
- .at(0)
202
- .simulate("change", {
203
- target: {
204
- value: "",
205
- },
451
+ describe("Width", () => {
452
+ const appDataKey = "width";
453
+ const selector = "#app-width";
454
+ it("should save correctly when edited", () => {
455
+ testSaveInputValue(appDataKey, selector, false, 200);
456
+ });
457
+ it("should display pre-set values", () => {
458
+ testPresetInputValue(appDataKey, selector, Page, "200");
459
+ });
460
+ it("should display invalid state for width if provided a negative number", () => {
461
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
462
+ wrapper
463
+ .find(selector)
464
+ .at(0)
465
+ .simulate("change", {
466
+ target: {
467
+ value: "-999",
468
+ },
469
+ });
470
+ expect(wrapper.find(selector).at(0).prop("aria-invalid")).to.be.true;
471
+ });
472
+ it("should display invalid state for width if provided an empty value", () => {
473
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
474
+ wrapper
475
+ .find(selector)
476
+ .at(0)
477
+ .simulate("change", {
478
+ target: {
479
+ value: "",
480
+ },
481
+ });
482
+ expect(wrapper.find(selector).at(0).prop("aria-invalid")).to.be.true;
483
+ });
484
+ it("should display invalid state for non-numeric value", () => {
485
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
486
+ wrapper
487
+ .find(selector)
488
+ .at(0)
489
+ .simulate("change", {
490
+ target: {
491
+ value: "abc",
492
+ },
493
+ });
494
+ expect(wrapper.find(selector).at(0).prop("aria-invalid")).to.be.true;
495
+ });
496
+ it("should have a disabled Save button if the width field is emptied", () => {
497
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
498
+ wrapper
499
+ .find(selector)
500
+ .at(0)
501
+ .simulate("change", {
502
+ target: {
503
+ value: "",
504
+ },
505
+ });
506
+ expect(wrapper.find("button").last().prop("disabled")).to.be.true;
507
+ });
508
+ it("should have a disabled Save button if the width field is negative", () => {
509
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
510
+ wrapper
511
+ .find(selector)
512
+ .at(0)
513
+ .simulate("change", {
514
+ target: {
515
+ value: "-999",
516
+ },
517
+ });
518
+ expect(wrapper.find("button").last().prop("disabled")).to.be.true;
206
519
  });
207
- expect(wrapper.find("button").at(2).prop("disabled")).to.be.true;
208
520
  });
209
- it("should have a disabled Save button if the width field is negative", () => {
210
- const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
211
- wrapper
212
- .find("#app-width")
213
- .at(0)
214
- .simulate("change", {
215
- target: {
216
- value: "-999",
217
- },
521
+ describe("Height", () => {
522
+ const appDataKey = "height";
523
+ const selector = "#app-height";
524
+ it("should save correctly when edited", () => {
525
+ testSaveInputValue(appDataKey, selector, false, 200);
526
+ });
527
+ it("should display pre-set values", () => {
528
+ testPresetInputValue(appDataKey, selector, Page, "200");
529
+ });
530
+ it("should display invalid state for width if provided a negative number", () => {
531
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
532
+ wrapper
533
+ .find(selector)
534
+ .at(0)
535
+ .simulate("change", {
536
+ target: {
537
+ value: "-999",
538
+ },
539
+ });
540
+ expect(wrapper.find(selector).at(0).prop("aria-invalid")).to.be.true;
541
+ });
542
+ it("should display invalid state for width if provided an empty value", () => {
543
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
544
+ wrapper
545
+ .find(selector)
546
+ .at(0)
547
+ .simulate("change", {
548
+ target: {
549
+ value: "",
550
+ },
551
+ });
552
+ expect(wrapper.find(selector).at(0).prop("aria-invalid")).to.be.true;
553
+ });
554
+ it("should display invalid state for non-numeric value", () => {
555
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
556
+ wrapper
557
+ .find(selector)
558
+ .at(0)
559
+ .simulate("change", {
560
+ target: {
561
+ value: "abc",
562
+ },
563
+ });
564
+ expect(wrapper.find("#app-height").at(0).prop("aria-invalid")).to.be.true;
565
+ });
566
+ it("should have a disabled Save button if the height field is emptied", () => {
567
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
568
+ wrapper
569
+ .find(selector)
570
+ .at(0)
571
+ .simulate("change", {
572
+ target: {
573
+ value: "",
574
+ },
575
+ });
576
+ expect(wrapper.find("button").last().prop("disabled")).to.be.true;
577
+ });
578
+ it("should have a disabled Save button if the height field is negative", () => {
579
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
580
+ wrapper
581
+ .find(selector)
582
+ .at(0)
583
+ .simulate("change", {
584
+ target: {
585
+ value: "-999",
586
+ },
587
+ });
588
+ expect(wrapper.find("button").last().prop("disabled")).to.be.true;
218
589
  });
219
- expect(wrapper.find("button").at(2).prop("disabled")).to.be.true;
220
590
  });
221
- it("should have a disabled Save button if the height field is negative", () => {
222
- const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
223
- wrapper
224
- .find("#app-height")
225
- .at(0)
226
- .simulate("change", {
227
- target: {
228
- value: "-999",
229
- },
591
+ describe("Lock dimensions", () => {
592
+ const label = "Lock dimensions";
593
+ const appDataKey = "resizable";
594
+ it("should display pre-set value: checked", () => {
595
+ presetCheckbox(appDataKey, label, true, false);
596
+ });
597
+ it("should display pre-set value: not checked", () => {
598
+ presetCheckbox(appDataKey, label, false, true);
599
+ });
600
+ it("should save correctly (change to true)", () => {
601
+ flipCheckbox(appDataKey, label, true);
602
+ });
603
+ it("should save correctly (change to true)", () => {
604
+ flipCheckbox(appDataKey, label, false);
230
605
  });
231
- expect(wrapper.find("button").at(2).prop("disabled")).to.be.true;
232
606
  });
233
- it("should call the passed-in cancel function when the cancel button is clicked", () => {
234
- const buttonSpy = sinon.spy(Page.args, "cancelFn");
235
- const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
236
- wrapper.find("button").at(1).simulate("click");
237
- expect(buttonSpy.calledOnce).to.be.true;
607
+ describe("Position", () => {
608
+ it("should save correctly when edited", () => {
609
+ const buttonSpy = sinon.spy(Page.args, "submitFn");
610
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
611
+ wrapper.find(".position-entry [role='combobox']").simulate("click");
612
+ wrapper.find(".position-entry .finsemble-dropdown__btn-option").at(4).simulate("click");
613
+ const collection = wrapper.find("button");
614
+ collection.at(collection.length - 1).simulate("click");
615
+ expect(buttonSpy.args[0][0]).to.deep.equal(Object.assign(Object.assign({}, defaults), { abstractPosition: 4 }));
616
+ });
617
+ it("should display pre-set values", () => {
618
+ var _a;
619
+ const args = Object.assign(Object.assign({}, Page.args), { appData: Object.assign(Object.assign({}, (_a = Page.args) === null || _a === void 0 ? void 0 : _a.appData), { abstractPosition: 5 }) });
620
+ const wrapper = mount(React.createElement(Page, Object.assign({}, args)));
621
+ expect(wrapper.find(".position-entry .finsemble-dropdown__btn-label").text()).to.equal("Center");
622
+ });
238
623
  });
239
- it("should call the passed-in Remove Application function when the Remove Application button is clicked", () => {
240
- const buttonSpy = sinon.spy(Page.args, "removeApplicationFn");
241
- const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
242
- wrapper.find("button").at(0).simulate("click");
243
- expect(buttonSpy.calledOnce).to.be.true;
244
- sinon.restore();
624
+ describe("Opacity", () => {
625
+ const appDataKey = "opacity";
626
+ const rangeSelector = ".app-edit-range";
627
+ const inputSelector = "#app-opacity";
628
+ it("should display correctly when preset (input range)", () => {
629
+ testPresetInputValue(appDataKey, rangeSelector, Page, "30");
630
+ });
631
+ it("should display correctly when preset (input field)", () => {
632
+ var _a;
633
+ const args = Object.assign(Object.assign({}, Page.args), { appData: Object.assign(Object.assign({}, (_a = Page.args) === null || _a === void 0 ? void 0 : _a.appData), { [appDataKey]: 0.3 }) });
634
+ const wrapper = mount(React.createElement(Page, Object.assign({}, args)));
635
+ expect(wrapper.find(inputSelector).prop("value")).to.equal(30);
636
+ });
637
+ it("should save correctly when edited (input range)", () => {
638
+ testSaveInputValue(appDataKey, rangeSelector, false, 30);
639
+ });
640
+ it("should save correctly when edited (input field) - value saved is 1/100 of what is entered", () => {
641
+ const buttonSpy = sinon.spy(Page.args, "submitFn");
642
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
643
+ wrapper
644
+ .find(inputSelector)
645
+ .at(0)
646
+ .simulate("change", {
647
+ target: {
648
+ value: 30,
649
+ },
650
+ });
651
+ const collection = wrapper.find("button");
652
+ collection.at(collection.length - 1).simulate("click");
653
+ expect(buttonSpy.args[0][0]).to.deep.equal(Object.assign(Object.assign({}, defaults), { [appDataKey]: 0.3 }));
654
+ });
655
+ it("When editing the range field, the text box updates", () => {
656
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
657
+ wrapper
658
+ .find(inputSelector)
659
+ .at(0)
660
+ .simulate("change", {
661
+ target: {
662
+ value: 70,
663
+ },
664
+ });
665
+ expect(wrapper.find(rangeSelector).prop("value")).to.equal(0.7);
666
+ });
667
+ it("When editing the text box, the range field updates", () => {
668
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
669
+ wrapper
670
+ .find(rangeSelector)
671
+ .at(0)
672
+ .simulate("change", {
673
+ target: {
674
+ value: 0.7,
675
+ },
676
+ });
677
+ expect(wrapper.find(inputSelector).prop("value")).to.equal(70);
678
+ });
245
679
  });
246
- it("should call the passed-in submit function with relevant data when the submit button is clicked", () => {
247
- const buttonSpy = sinon.spy(Page.args, "submitFn");
248
- const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
249
- wrapper.find("button").at(2).simulate("click");
250
- expect(buttonSpy.calledOnce).to.be.true;
251
- expect(buttonSpy.firstCall.args[0]).to.deep.equal({
252
- name: "Test",
253
- url: "http://www.google.com",
254
- path: "",
255
- appType: "web",
256
- width: 1280,
257
- height: 600,
258
- description: "",
259
- rules: [],
260
- });
261
- });
262
- it("should click submit button when pressing enter on Name field", () => {
263
- const buttonSpy = sinon.spy(Page.args, "submitFn");
264
- const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
265
- wrapper
266
- .find("#app-name")
267
- .at(0)
268
- .simulate("keydown", {
269
- key: "Enter",
270
- preventDefault: () => { },
680
+ describe("Auto arrange", () => {
681
+ const label = "Auto arrange";
682
+ const appDataKey = "allowAutoArrange";
683
+ it("should display pre-set value: checked", () => {
684
+ presetCheckbox(appDataKey, label, true, true);
685
+ });
686
+ it("should display pre-set value: not checked", () => {
687
+ presetCheckbox(appDataKey, label, false, false);
688
+ });
689
+ it("should save correctly (change to true)", () => {
690
+ flipCheckbox(appDataKey, label, true);
691
+ });
692
+ it("should save correctly (change to true)", () => {
693
+ flipCheckbox(appDataKey, label, false);
271
694
  });
272
- expect(buttonSpy.calledOnce).to.be.true;
273
695
  });
274
- it("should not click submit button when pressing a key other than enter on Name field", () => {
275
- const buttonSpy = sinon.spy(Page.args, "submitFn");
276
- const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
277
- wrapper
278
- .find("#app-name")
279
- .at(0)
280
- .simulate("keydown", {
281
- key: "a",
282
- preventDefault: () => { },
283
- });
284
- expect(buttonSpy.calledOnce).to.be.false;
285
- });
286
- it("should not submit when pressing enter on Name field IF the submit button is disabled", () => {
287
- const buttonSpy = sinon.spy(EmptyPage.args, "submitFn");
288
- const wrapper = mount(React.createElement(EmptyPage, Object.assign({}, EmptyPage.args)));
289
- wrapper
290
- .find("#app-name")
291
- .at(0)
292
- .simulate("keydown", {
293
- key: "Enter",
294
- preventDefault: () => { },
295
- });
296
- expect(buttonSpy.calledOnce).to.be.false;
297
- });
298
- it("should click submit button when pressing enter on App type web field", () => {
299
- const buttonSpy = sinon.spy(Page.args, "submitFn");
300
- const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
301
- wrapper
302
- .find("#app-type-web")
303
- .at(0)
304
- .simulate("keydown", {
305
- key: "Enter",
306
- preventDefault: () => { },
696
+ describe("Grouping", () => {
697
+ const label = "Grouping";
698
+ const appDataKey = "allowGrouping";
699
+ it("should display pre-set value: checked", () => {
700
+ presetCheckbox(appDataKey, label, true, true);
701
+ });
702
+ it("should display pre-set value: not checked", () => {
703
+ presetCheckbox(appDataKey, label, false, false);
704
+ });
705
+ it("should save correctly (change to true)", () => {
706
+ flipCheckbox(appDataKey, label, true);
707
+ });
708
+ it("should save correctly (change to true)", () => {
709
+ flipCheckbox(appDataKey, label, false);
307
710
  });
308
- expect(buttonSpy.calledOnce).to.be.true;
309
711
  });
310
- it("should click submit button when pressing enter on App type native field", () => {
311
- const buttonSpy = sinon.spy(Page.args, "submitFn");
312
- const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
313
- wrapper
314
- .find("#app-type-native")
315
- .at(0)
316
- .simulate("keydown", {
317
- key: "Enter",
318
- preventDefault: () => { },
712
+ describe("Snapping", () => {
713
+ const label = "Snapping";
714
+ const appDataKey = "allowSnapping";
715
+ it("should display pre-set value: checked", () => {
716
+ presetCheckbox(appDataKey, label, true, true);
717
+ });
718
+ it("should display pre-set value: not checked", () => {
719
+ presetCheckbox(appDataKey, label, false, false);
720
+ });
721
+ it("should save correctly (change to true)", () => {
722
+ flipCheckbox(appDataKey, label, true);
723
+ });
724
+ it("should save correctly (change to true)", () => {
725
+ flipCheckbox(appDataKey, label, false);
319
726
  });
320
- expect(buttonSpy.calledOnce).to.be.true;
321
727
  });
322
- it("should click submit button when pressing enter on Web URL field", () => {
323
- const buttonSpy = sinon.spy(Page.args, "submitFn");
324
- const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
325
- wrapper
326
- .find("#app-url")
327
- .at(0)
328
- .simulate("keydown", {
329
- key: "Enter",
330
- preventDefault: () => { },
728
+ describe("Tabs", () => {
729
+ const label = "Tabs";
730
+ const appDataKey = "allowTabbing";
731
+ it("should display pre-set value: checked", () => {
732
+ presetCheckbox(appDataKey, label, true, true);
733
+ });
734
+ it("should display pre-set value: not checked", () => {
735
+ presetCheckbox(appDataKey, label, false, false);
736
+ });
737
+ it("should save correctly (change to true)", () => {
738
+ flipCheckbox(appDataKey, label, true);
739
+ });
740
+ it("should save correctly (change to true)", () => {
741
+ flipCheckbox(appDataKey, label, false);
331
742
  });
332
- expect(buttonSpy.calledOnce).to.be.true;
333
743
  });
334
- it("should click submit button when pressing enter on Width field", () => {
335
- const buttonSpy = sinon.spy(Page.args, "submitFn");
336
- const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
337
- wrapper
338
- .find("#app-width")
339
- .at(0)
340
- .simulate("keydown", {
341
- key: "Enter",
342
- preventDefault: () => { },
744
+ describe("Tiling", () => {
745
+ const label = "Tiling";
746
+ const appDataKey = "allowTiling";
747
+ it("should display pre-set value: checked", () => {
748
+ presetCheckbox(appDataKey, label, true, true);
749
+ });
750
+ it("should display pre-set value: not checked", () => {
751
+ presetCheckbox(appDataKey, label, false, false);
752
+ });
753
+ it("should save correctly (change to true)", () => {
754
+ flipCheckbox(appDataKey, label, true);
755
+ });
756
+ it("should save correctly (change to true)", () => {
757
+ flipCheckbox(appDataKey, label, false);
343
758
  });
344
- expect(buttonSpy.calledOnce).to.be.true;
345
759
  });
346
- it("should click submit button when pressing enter on Height field", () => {
347
- const buttonSpy = sinon.spy(Page.args, "submitFn");
348
- const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
349
- wrapper
350
- .find("#app-height")
351
- .at(0)
352
- .simulate("keydown", {
353
- key: "Enter",
354
- preventDefault: () => { },
760
+ describe("Show title bar", () => {
761
+ const label = "Show title bar";
762
+ const appDataKey = "enableTitleBar";
763
+ it("should display pre-set value: checked", () => {
764
+ presetCheckbox(appDataKey, label, true, true);
765
+ });
766
+ it("should display pre-set value: not checked", () => {
767
+ presetCheckbox(appDataKey, label, false, false);
768
+ });
769
+ it("should save correctly (change to true)", () => {
770
+ flipCheckbox(appDataKey, label, true);
771
+ });
772
+ it("should save correctly (change to true)", () => {
773
+ flipCheckbox(appDataKey, label, false);
774
+ });
775
+ });
776
+ describe("Always on top", () => {
777
+ const name = "alwaysOnTop";
778
+ const enableParams = {
779
+ alwaysOnTop: true,
780
+ enableAOT: false,
781
+ };
782
+ const showParams = {
783
+ alwaysOnTop: false,
784
+ enableAOT: true,
785
+ };
786
+ const disableParams = {
787
+ alwaysOnTop: false,
788
+ enableAOT: false,
789
+ };
790
+ it("should display correctly when preset: Enable", () => {
791
+ presetRadioButtons(name, enableParams, [true, false, false]);
792
+ });
793
+ it("should display correctly when preset: Show in titlebar", () => {
794
+ presetRadioButtons(name, showParams, [false, true, false]);
795
+ });
796
+ it("should display correctly when preset: Disable", () => {
797
+ presetRadioButtons(name, disableParams, [false, false, true]);
798
+ });
799
+ it("should save correctly when edited: Enable", () => {
800
+ saveRadioButton(name, 0, enableParams);
801
+ });
802
+ it("should save correctly when edited: Show in titlebar", () => {
803
+ saveRadioButton(name, 1, showParams);
804
+ });
805
+ it("should save correctly when edited: Disable", () => {
806
+ saveRadioButton(name, 2, disableParams);
807
+ });
808
+ it("confirm that the radio buttons stay independent", () => {
809
+ checkUniqueRadioButtons(name, 3);
810
+ });
811
+ });
812
+ describe("Minimize", () => {
813
+ const name = "minimize";
814
+ const enableParams = {
815
+ allowMinimize: true,
816
+ hideMinimize: false,
817
+ };
818
+ const hideParams = {
819
+ allowMinimize: true,
820
+ hideMinimize: true,
821
+ };
822
+ const disableParams = {
823
+ allowMinimize: false,
824
+ hideMinimize: true,
825
+ };
826
+ it("should display correctly when preset: Enable", () => {
827
+ presetRadioButtons(name, enableParams, [true, false, false]);
828
+ });
829
+ it("should display correctly when preset: Hide from titlebar", () => {
830
+ presetRadioButtons(name, hideParams, [false, true, false]);
831
+ });
832
+ it("should display correctly when preset: Disable", () => {
833
+ presetRadioButtons(name, disableParams, [false, false, true]);
834
+ });
835
+ it("should save correctly when edited: Enable", () => {
836
+ saveRadioButton(name, 0, enableParams);
837
+ });
838
+ it("should save correctly when edited: Hide from titlebar", () => {
839
+ saveRadioButton(name, 1, hideParams);
840
+ });
841
+ it("should save correctly when edited: Disable", () => {
842
+ saveRadioButton(name, 2, disableParams);
843
+ });
844
+ it("confirm that the radio buttons stay independent", () => {
845
+ checkUniqueRadioButtons(name, 3);
846
+ });
847
+ });
848
+ describe("Maximize", () => {
849
+ const name = "maximize";
850
+ const enableParams = {
851
+ allowMaximize: true,
852
+ hideMaximize: false,
853
+ };
854
+ const hideParams = {
855
+ allowMaximize: true,
856
+ hideMaximize: true,
857
+ };
858
+ const disableParams = {
859
+ allowMaximize: false,
860
+ hideMaximize: true,
861
+ };
862
+ it("should display correctly when preset: Enable", () => {
863
+ presetRadioButtons(name, enableParams, [true, false, false]);
864
+ });
865
+ it("should display correctly when preset: Hide from titlebar", () => {
866
+ presetRadioButtons(name, hideParams, [false, true, false]);
867
+ });
868
+ it("should display correctly when preset: Disable", () => {
869
+ presetRadioButtons(name, disableParams, [false, false, true]);
870
+ });
871
+ it("should save correctly when edited: Enable", () => {
872
+ saveRadioButton(name, 0, enableParams);
873
+ });
874
+ it("should save correctly when edited: Hide from titlebar", () => {
875
+ saveRadioButton(name, 1, hideParams);
876
+ });
877
+ it("should save correctly when edited: Disable", () => {
878
+ saveRadioButton(name, 2, disableParams);
879
+ });
880
+ it("confirm that the radio buttons stay independent", () => {
881
+ checkUniqueRadioButtons(name, 3);
882
+ });
883
+ });
884
+ describe("Close", () => {
885
+ const name = "close";
886
+ const enableParams = {
887
+ hideClose: false,
888
+ };
889
+ const disableParams = {
890
+ hideClose: true,
891
+ };
892
+ it("should display correctly when preset: Enable", () => {
893
+ presetRadioButtons(name, enableParams, [true, false]);
894
+ });
895
+ it("should display correctly when preset: Disable", () => {
896
+ presetRadioButtons(name, disableParams, [false, true]);
897
+ });
898
+ it("should save correctly when edited: Enable", () => {
899
+ saveRadioButton(name, 0, enableParams);
900
+ });
901
+ it("should save correctly when edited: Disable", () => {
902
+ saveRadioButton(name, 1, disableParams);
903
+ });
904
+ it("confirm that the radio buttons stay independent", () => {
905
+ checkUniqueRadioButtons(name, 2);
906
+ });
907
+ });
908
+ describe("Display linker", () => {
909
+ const name = "linker";
910
+ const enableParams = {
911
+ autoConnect: true,
912
+ };
913
+ const disableParams = {
914
+ autoConnect: false,
915
+ };
916
+ it("should display correctly when preset: Always", () => {
917
+ presetRadioButtons(name, enableParams, [true, false]);
918
+ });
919
+ it("should display correctly when preset: FDC3 API use", () => {
920
+ presetRadioButtons(name, disableParams, [false, true]);
921
+ });
922
+ it("should save correctly when edited: Always", () => {
923
+ saveRadioButton(name, 0, enableParams);
924
+ });
925
+ it("should save correctly when edited: FDC3 API use", () => {
926
+ saveRadioButton(name, 1, disableParams);
927
+ });
928
+ it("confirm that the radio buttons stay independent", () => {
929
+ checkUniqueRadioButtons(name, 2);
930
+ });
931
+ });
932
+ describe("Intents", () => {
933
+ it("should save correctly when edited (adding an intent)", () => {
934
+ const buttonSpy = sinon.spy(Page.args, "submitFn");
935
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
936
+ wrapper
937
+ .find(".inputTable input")
938
+ .at(0)
939
+ .simulate("change", {
940
+ target: {
941
+ value: "ViewChart",
942
+ },
943
+ });
944
+ wrapper
945
+ .find(".inputTable input")
946
+ .at(1)
947
+ .simulate("change", {
948
+ target: {
949
+ value: "View Chart",
950
+ },
951
+ });
952
+ wrapper
953
+ .find(".inputTable input")
954
+ .at(2)
955
+ .simulate("change", {
956
+ target: {
957
+ value: "fdc3.instrument",
958
+ },
959
+ });
960
+ const collection = wrapper.find("button");
961
+ collection.at(collection.length - 1).simulate("click");
962
+ expect(buttonSpy.args[0][0]).to.deep.equal(Object.assign(Object.assign({}, defaults), { intents: [{ name: "ViewChart", displayName: "View Chart", contexts: ["fdc3.instrument"] }] }));
963
+ });
964
+ it("should save correctly when edited (adding just an intent name)", () => {
965
+ const buttonSpy = sinon.spy(Page.args, "submitFn");
966
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
967
+ wrapper
968
+ .find(".inputTable input")
969
+ .at(0)
970
+ .simulate("change", {
971
+ target: {
972
+ value: "ViewChart",
973
+ },
974
+ });
975
+ const collection = wrapper.find("button");
976
+ collection.at(collection.length - 1).simulate("click");
977
+ expect(buttonSpy.args[0][0]).to.deep.equal(Object.assign(Object.assign({}, defaults), { intents: [{ name: "ViewChart", displayName: "", contexts: [""] }] }));
978
+ });
979
+ it("should save correctly when edited (removing an intent)", () => {
980
+ var _a;
981
+ const buttonSpy = sinon.spy(Page.args, "submitFn");
982
+ const args = Object.assign(Object.assign({}, Page.args), { appData: Object.assign(Object.assign({}, (_a = Page.args) === null || _a === void 0 ? void 0 : _a.appData), { intents: [{ name: "ViewChart", displayName: "View Chart", contexts: ["fdc3.instrument"] }] }) });
983
+ const wrapper = mount(React.createElement(Page, Object.assign({}, args)));
984
+ wrapper.find(".inputTable button[title='Remove row']").at(0).simulate("click");
985
+ const collection = wrapper.find("button");
986
+ collection.at(collection.length - 1).simulate("click");
987
+ expect(buttonSpy.args[0][0]).to.deep.equal(Object.assign(Object.assign({}, defaults), { intents: [] }));
988
+ });
989
+ it("should display preset values (empty list of intents)", () => {
990
+ var _a;
991
+ const args = Object.assign(Object.assign({}, Page.args), { appData: Object.assign(Object.assign({}, (_a = Page.args) === null || _a === void 0 ? void 0 : _a.appData), { intents: [] }) });
992
+ const wrapper = mount(React.createElement(Page, Object.assign({}, args)));
993
+ expect(wrapper.find(".inputTable tr"), "List of rows").to.be.lengthOf(2);
994
+ expect(wrapper.find(".inputTable input").at(0).prop("value"), "Intent table, input field 1").to.be.empty;
995
+ expect(wrapper.find(".inputTable input").at(1).prop("value"), "Intent table, input field 2").to.be.empty;
996
+ expect(wrapper.find(".inputTable input").at(2).prop("value"), "Intent table, input field 3").to.be.empty;
997
+ });
998
+ it("should display preset values (with 1 intent)", () => {
999
+ var _a;
1000
+ const args = Object.assign(Object.assign({}, Page.args), { appData: Object.assign(Object.assign({}, (_a = Page.args) === null || _a === void 0 ? void 0 : _a.appData), { intents: [{ name: "ViewChart", displayName: "View Chart", contexts: ["fdc3.instrument"] }] }) });
1001
+ const wrapper = mount(React.createElement(Page, Object.assign({}, args)));
1002
+ expect(wrapper.find(".inputTable tr"), "List of rows").to.be.lengthOf(3);
1003
+ expect(wrapper.find(".inputTable input").at(0).prop("value"), "Intent table, input field 1").to.equal("ViewChart");
1004
+ expect(wrapper.find(".inputTable input").at(1).prop("value"), "Intent table, input field 2").to.equal("View Chart");
1005
+ expect(wrapper.find(".inputTable input").at(2).prop("value"), "Intent table, input field 3").to.equal("fdc3.instrument");
1006
+ expect(wrapper.find(".inputTable input").at(3).prop("value"), "Intent table, input field 4").to.be.empty;
1007
+ expect(wrapper.find(".inputTable input").at(4).prop("value"), "Intent table, input field 5").to.be.empty;
1008
+ expect(wrapper.find(".inputTable input").at(5).prop("value"), "Intent table, input field 6").to.be.empty;
1009
+ });
1010
+ it("should display preset values (multiple contexts for an intent)", () => {
1011
+ var _a;
1012
+ const args = Object.assign(Object.assign({}, Page.args), { appData: Object.assign(Object.assign({}, (_a = Page.args) === null || _a === void 0 ? void 0 : _a.appData), { intents: [{ name: "ViewChart", displayName: "View Chart", contexts: ["fdc3.instrument", "custom.symbol"] }] }) });
1013
+ const wrapper = mount(React.createElement(Page, Object.assign({}, args)));
1014
+ expect(wrapper.find(".inputTable tr"), "List of rows").to.be.lengthOf(3);
1015
+ expect(wrapper.find(".inputTable input").at(0).prop("value"), "Intent table, input field 1").to.equal("ViewChart");
1016
+ expect(wrapper.find(".inputTable input").at(1).prop("value"), "Intent table, input field 2").to.equal("View Chart");
1017
+ expect(wrapper.find(".inputTable input").at(2).prop("value"), "Intent table, input field 3").to.equal("fdc3.instrument, custom.symbol");
1018
+ });
1019
+ });
1020
+ describe("Set security", () => {
1021
+ const name = "security";
1022
+ const enableParams = {
1023
+ security: "trusted",
1024
+ };
1025
+ const disableParams = {
1026
+ security: "untrusted",
1027
+ };
1028
+ it("should display correctly when preset: Trusted", () => {
1029
+ presetRadioButtons(name, enableParams, [true, false]);
1030
+ });
1031
+ it("should display correctly when preset: Untrusted", () => {
1032
+ presetRadioButtons(name, disableParams, [false, true]);
1033
+ });
1034
+ it("should save correctly when edited: Trusted", () => {
1035
+ saveRadioButton(name, 0, enableParams);
1036
+ });
1037
+ it.skip("should save correctly when edited: Untrusted", () => {
1038
+ saveRadioButton(name, 1, disableParams);
1039
+ });
1040
+ it.skip("confirm that the radio buttons stay independent", () => {
1041
+ checkUniqueRadioButtons(name, 2);
1042
+ });
1043
+ });
1044
+ describe("Launch timeout", () => {
1045
+ const appDataKey = "native_windowSpawnTimeout";
1046
+ const selector = "#launch-timeout";
1047
+ it("should save correctly when edited", () => {
1048
+ testSaveInputValue(appDataKey, selector, true, 200);
1049
+ });
1050
+ it("should display pre-set values", () => {
1051
+ testPresetInputValue(appDataKey, selector, NativePage, "200");
1052
+ });
1053
+ });
1054
+ describe("Only one instance", () => {
1055
+ const label = "Only one instance";
1056
+ const appDataKey = "singleton";
1057
+ it("should display pre-set value: checked", () => {
1058
+ presetCheckbox(appDataKey, label, true, true);
1059
+ });
1060
+ it("should display pre-set value: not checked", () => {
1061
+ presetCheckbox(appDataKey, label, false, false);
1062
+ });
1063
+ it("should save correctly (change to true)", () => {
1064
+ flipCheckbox(appDataKey, label, true);
1065
+ });
1066
+ it("should save correctly (change to true)", () => {
1067
+ flipCheckbox(appDataKey, label, false);
1068
+ });
1069
+ });
1070
+ describe("Launch at startup", () => {
1071
+ const label = "Launch at startup";
1072
+ const appDataKey = "spawnOnStartup";
1073
+ it("should display pre-set value: checked", () => {
1074
+ presetCheckbox(appDataKey, label, true, true);
1075
+ });
1076
+ it("should display pre-set value: not checked", () => {
1077
+ presetCheckbox(appDataKey, label, false, false);
1078
+ });
1079
+ it("should save correctly (change to true)", () => {
1080
+ flipCheckbox(appDataKey, label, true);
1081
+ });
1082
+ it("should save correctly (change to true)", () => {
1083
+ flipCheckbox(appDataKey, label, false);
1084
+ });
1085
+ });
1086
+ describe("Include in Apps menu", () => {
1087
+ const label = "Include in Apps menu";
1088
+ const appDataKey = "launchableByUser";
1089
+ it("should display pre-set value: checked", () => {
1090
+ presetCheckbox(appDataKey, label, true, true);
1091
+ });
1092
+ it("should display pre-set value: not checked", () => {
1093
+ presetCheckbox(appDataKey, label, false, false);
1094
+ });
1095
+ it("should save correctly (change to true)", () => {
1096
+ flipCheckbox(appDataKey, label, true);
1097
+ });
1098
+ it("should save correctly (change to true)", () => {
1099
+ flipCheckbox(appDataKey, label, false);
1100
+ });
1101
+ });
1102
+ describe("Persist across workspaces", () => {
1103
+ const label = "Persist across workspaces";
1104
+ const appDataKey = "isEvergreen";
1105
+ it("should display pre-set value: checked", () => {
1106
+ presetCheckbox(appDataKey, label, true, true);
1107
+ });
1108
+ it("should display pre-set value: not checked", () => {
1109
+ presetCheckbox(appDataKey, label, false, false);
1110
+ });
1111
+ it("should save correctly (change to true)", () => {
1112
+ flipCheckbox(appDataKey, label, true);
1113
+ });
1114
+ it("should save correctly (change to true)", () => {
1115
+ flipCheckbox(appDataKey, label, false);
1116
+ });
1117
+ });
1118
+ describe("Add to workspaces", () => {
1119
+ const label = "Add to workspace";
1120
+ const appDataKey = "addToWorkspace";
1121
+ it("should display pre-set value: checked", () => {
1122
+ presetCheckbox(appDataKey, label, true, true);
1123
+ });
1124
+ it("should display pre-set value: not checked", () => {
1125
+ presetCheckbox(appDataKey, label, false, false);
1126
+ });
1127
+ it("should save correctly (change to true)", () => {
1128
+ flipCheckbox(appDataKey, label, true);
1129
+ });
1130
+ it("should save correctly (change to true)", () => {
1131
+ flipCheckbox(appDataKey, label, false);
1132
+ });
1133
+ });
1134
+ describe("Persist the location", () => {
1135
+ const label = "Persist the location";
1136
+ const appDataKey = "persistURL";
1137
+ it("should display pre-set value: checked", () => {
1138
+ presetCheckbox(appDataKey, label, true, true);
1139
+ });
1140
+ it("should display pre-set value: not checked", () => {
1141
+ presetCheckbox(appDataKey, label, false, false);
1142
+ });
1143
+ it("should save correctly (change to true)", () => {
1144
+ flipCheckbox(appDataKey, label, true);
1145
+ });
1146
+ it("should save correctly (change to true)", () => {
1147
+ flipCheckbox(appDataKey, label, false);
355
1148
  });
356
- expect(buttonSpy.calledOnce).to.be.true;
357
1149
  });
358
1150
  });
359
1151
  //# sourceMappingURL=AppEditPage.spec.js.map