@watermarkinsights/ripple 5.11.0 → 5.11.1

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 (347) hide show
  1. package/dist/{esm/global-03298ea6.js → cjs/app-globals-e5411d07.js} +10 -1
  2. package/dist/cjs/{chartFunctions-b47a5431.js → chartFunctions-7314b414.js} +3 -3
  3. package/dist/cjs/{functions-e24249e6.js → functions-5ac8a62f.js} +104 -7
  4. package/dist/cjs/index-788526f5.js +1859 -0
  5. package/dist/cjs/{intl-a70cf8c2.js → intl-07aaf53c.js} +1 -1
  6. package/dist/cjs/loader.cjs.js +4 -3
  7. package/dist/cjs/priv-calendar.cjs.entry.js +6 -5
  8. package/dist/cjs/priv-chart-popover.cjs.entry.js +6 -5
  9. package/dist/cjs/priv-navigator-button.cjs.entry.js +4 -3
  10. package/dist/cjs/priv-navigator-item.cjs.entry.js +4 -3
  11. package/dist/cjs/priv-option-list.cjs.entry.js +5 -4
  12. package/dist/cjs/ripple.cjs.js +12 -11
  13. package/dist/cjs/wm-action-menu_2.cjs.entry.js +8 -6
  14. package/dist/cjs/wm-button.cjs.entry.js +5 -4
  15. package/dist/cjs/wm-chart-slice.cjs.entry.js +1 -1
  16. package/dist/cjs/wm-chart.cjs.entry.js +7 -6
  17. package/dist/cjs/wm-date-range.cjs.entry.js +9 -8
  18. package/dist/cjs/wm-datepicker.cjs.entry.js +9 -8
  19. package/dist/cjs/wm-file-list.cjs.entry.js +4 -3
  20. package/dist/cjs/wm-file.cjs.entry.js +5 -4
  21. package/dist/cjs/wm-input.cjs.entry.js +6 -5
  22. package/dist/cjs/wm-line-chart.cjs.entry.js +15 -14
  23. package/dist/cjs/wm-modal-pss_3.cjs.entry.js +13 -10
  24. package/dist/cjs/wm-modal_3.cjs.entry.js +13 -10
  25. package/dist/cjs/wm-navigation_3.cjs.entry.js +13 -10
  26. package/dist/cjs/wm-navigator.cjs.entry.js +4 -3
  27. package/dist/cjs/wm-nested-select.cjs.entry.js +8 -7
  28. package/dist/cjs/wm-optgroup.cjs.entry.js +5 -4
  29. package/dist/cjs/wm-option_2.cjs.entry.js +10 -8
  30. package/dist/cjs/wm-pagination.cjs.entry.js +5 -4
  31. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +9 -7
  32. package/dist/cjs/wm-search.cjs.entry.js +7 -6
  33. package/dist/cjs/wm-snackbar.cjs.entry.js +7 -6
  34. package/dist/cjs/wm-tab-item_3.cjs.entry.js +11 -8
  35. package/dist/cjs/wm-tag-input.cjs.entry.js +8 -7
  36. package/dist/cjs/wm-tag-option.cjs.entry.js +2 -2
  37. package/dist/cjs/wm-textarea.cjs.entry.js +6 -5
  38. package/dist/cjs/wm-timepicker.cjs.entry.js +6 -5
  39. package/dist/cjs/wm-toggletip.cjs.entry.js +6 -5
  40. package/dist/cjs/wm-uploader.cjs.entry.js +7 -6
  41. package/dist/cjs/wm-wrapper.cjs.entry.js +1 -1
  42. package/dist/collection/collection-manifest.json +2 -2
  43. package/dist/collection/components/charts/chartFunctions.js +1 -1
  44. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +2 -2
  45. package/dist/collection/components/charts/wm-chart/wm-chart.js +1 -1
  46. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +9 -9
  47. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +1 -1
  48. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +1 -1
  49. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +2 -2
  50. package/dist/collection/components/datepickers/wm-date-range.js +17 -13
  51. package/dist/collection/components/datepickers/wm-datepicker.js +17 -13
  52. package/dist/collection/components/selects/priv-option-list/priv-option-list.js +7 -5
  53. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +3 -3
  54. package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +1 -1
  55. package/dist/collection/components/selects/wm-option/wm-option.js +1 -1
  56. package/dist/collection/components/selects/wm-select/wm-select.js +2 -2
  57. package/dist/collection/components/wm-action-menu/wm-action-menu.js +1 -1
  58. package/dist/collection/components/wm-button/wm-button.js +1 -1
  59. package/dist/collection/components/wm-file/wm-file.js +1 -1
  60. package/dist/collection/components/wm-file-list/wm-file-list.js +1 -1
  61. package/dist/collection/components/wm-input/wm-input.js +1 -1
  62. package/dist/collection/components/wm-menuitem/wm-menuitem.js +1 -1
  63. package/dist/collection/components/wm-modal/wm-modal-footer.js +1 -1
  64. package/dist/collection/components/wm-modal/wm-modal-header.js +1 -1
  65. package/dist/collection/components/wm-modal/wm-modal.js +2 -2
  66. package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.js +1 -1
  67. package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.js +1 -1
  68. package/dist/collection/components/wm-modal-pss/wm-modal-pss.js +2 -2
  69. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +1 -1
  70. package/dist/collection/components/wm-navigation/wm-navigation-item.js +1 -1
  71. package/dist/collection/components/wm-navigation/wm-navigation.js +2 -2
  72. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +1 -1
  73. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +1 -1
  74. package/dist/collection/components/wm-pagination/wm-pagination.js +1 -1
  75. package/dist/collection/components/wm-search/wm-search.js +5 -4
  76. package/dist/collection/components/wm-snackbar/wm-snackbar.js +2 -2
  77. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +1 -1
  78. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +1 -1
  79. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +1 -1
  80. package/dist/collection/components/wm-tag-input/wm-tag-input.js +3 -3
  81. package/dist/collection/components/wm-textarea/wm-textarea.js +1 -1
  82. package/dist/collection/components/wm-timepicker/wm-timepicker.js +11 -8
  83. package/dist/collection/components/wm-toggletip/wm-toggletip.js +2 -2
  84. package/dist/collection/components/wm-uploader/wm-uploader.js +2 -2
  85. package/dist/{cjs/global-c1e0f0f6.js → esm/app-globals-c3920c78.js} +7 -2
  86. package/dist/esm/{chartFunctions-d2ecde7f.js → chartFunctions-c273c613.js} +3 -3
  87. package/dist/esm/{functions-8800c690.js → functions-f39e6177.js} +105 -8
  88. package/dist/esm/index-130e07bb.js +1828 -0
  89. package/dist/esm/{intl-cf443c87.js → intl-a0ebf99e.js} +1 -1
  90. package/dist/esm/loader.js +5 -4
  91. package/dist/esm/priv-calendar.entry.js +6 -5
  92. package/dist/esm/priv-chart-popover.entry.js +6 -5
  93. package/dist/esm/priv-navigator-button.entry.js +4 -3
  94. package/dist/esm/priv-navigator-item.entry.js +4 -3
  95. package/dist/esm/priv-option-list.entry.js +5 -4
  96. package/dist/esm/ripple.js +13 -12
  97. package/dist/esm/wm-action-menu_2.entry.js +8 -6
  98. package/dist/esm/wm-button.entry.js +5 -4
  99. package/dist/esm/wm-chart-slice.entry.js +1 -1
  100. package/dist/esm/wm-chart.entry.js +7 -6
  101. package/dist/esm/wm-date-range.entry.js +9 -8
  102. package/dist/esm/wm-datepicker.entry.js +9 -8
  103. package/dist/esm/wm-file-list.entry.js +4 -3
  104. package/dist/esm/wm-file.entry.js +5 -4
  105. package/dist/esm/wm-input.entry.js +6 -5
  106. package/dist/esm/wm-line-chart.entry.js +15 -14
  107. package/dist/esm/wm-modal-pss_3.entry.js +13 -10
  108. package/dist/esm/wm-modal_3.entry.js +13 -10
  109. package/dist/esm/wm-navigation_3.entry.js +13 -10
  110. package/dist/esm/wm-navigator.entry.js +4 -3
  111. package/dist/esm/wm-nested-select.entry.js +8 -7
  112. package/dist/esm/wm-optgroup.entry.js +5 -4
  113. package/dist/esm/wm-option_2.entry.js +10 -8
  114. package/dist/esm/wm-pagination.entry.js +5 -4
  115. package/dist/esm/wm-progress-indicator_3.entry.js +9 -7
  116. package/dist/esm/wm-search.entry.js +7 -6
  117. package/dist/esm/wm-snackbar.entry.js +7 -6
  118. package/dist/esm/wm-tab-item_3.entry.js +11 -8
  119. package/dist/esm/wm-tag-input.entry.js +8 -7
  120. package/dist/esm/wm-tag-option.entry.js +2 -2
  121. package/dist/esm/wm-textarea.entry.js +6 -5
  122. package/dist/esm/wm-timepicker.entry.js +6 -5
  123. package/dist/esm/wm-toggletip.entry.js +6 -5
  124. package/dist/esm/wm-uploader.entry.js +7 -6
  125. package/dist/esm/wm-wrapper.entry.js +1 -1
  126. package/dist/esm-es5/app-globals-c3920c78.js +1 -0
  127. package/dist/esm-es5/{chartFunctions-d2ecde7f.js → chartFunctions-c273c613.js} +1 -1
  128. package/dist/esm-es5/functions-f39e6177.js +1 -0
  129. package/dist/esm-es5/index-130e07bb.js +1 -0
  130. package/dist/esm-es5/{intl-cf443c87.js → intl-a0ebf99e.js} +1 -1
  131. package/dist/esm-es5/loader.js +1 -1
  132. package/dist/esm-es5/priv-calendar.entry.js +1 -1
  133. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  134. package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
  135. package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
  136. package/dist/esm-es5/priv-option-list.entry.js +1 -1
  137. package/dist/esm-es5/ripple.js +1 -1
  138. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  139. package/dist/esm-es5/wm-button.entry.js +1 -1
  140. package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
  141. package/dist/esm-es5/wm-chart.entry.js +1 -1
  142. package/dist/esm-es5/wm-date-range.entry.js +1 -1
  143. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  144. package/dist/esm-es5/wm-file-list.entry.js +1 -1
  145. package/dist/esm-es5/wm-file.entry.js +1 -1
  146. package/dist/esm-es5/wm-input.entry.js +1 -1
  147. package/dist/esm-es5/wm-line-chart.entry.js +1 -1
  148. package/dist/esm-es5/wm-modal-pss_3.entry.js +1 -1
  149. package/dist/esm-es5/wm-modal_3.entry.js +1 -1
  150. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  151. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  152. package/dist/esm-es5/wm-nested-select.entry.js +1 -1
  153. package/dist/esm-es5/wm-optgroup.entry.js +1 -1
  154. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  155. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  156. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  157. package/dist/esm-es5/wm-search.entry.js +1 -1
  158. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  159. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  160. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  161. package/dist/esm-es5/wm-tag-option.entry.js +1 -1
  162. package/dist/esm-es5/wm-textarea.entry.js +1 -1
  163. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  164. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  165. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  166. package/dist/esm-es5/wm-wrapper.entry.js +1 -1
  167. package/dist/loader/cdn.js +1 -2
  168. package/dist/loader/index.cjs.js +1 -2
  169. package/dist/loader/index.d.ts +3 -0
  170. package/dist/loader/index.es2017.js +1 -2
  171. package/dist/loader/index.js +1 -2
  172. package/dist/ripple/{p-65d26233.system.entry.js → p-043901ab.system.entry.js} +1 -1
  173. package/dist/ripple/{p-bfc1065f.system.entry.js → p-0c7cf863.system.entry.js} +1 -1
  174. package/dist/ripple/{p-59bb36fc.entry.js → p-0ed1e17e.entry.js} +1 -1
  175. package/dist/ripple/{p-0e36d5b8.system.entry.js → p-0f09ccc6.system.entry.js} +1 -1
  176. package/dist/ripple/p-0f356c45.entry.js +1 -0
  177. package/dist/ripple/p-105e5721.system.entry.js +1 -0
  178. package/dist/ripple/{p-48e09589.entry.js → p-13b1d775.entry.js} +1 -1
  179. package/dist/ripple/p-152b20ae.entry.js +1 -0
  180. package/dist/ripple/{p-1a71d867.system.entry.js → p-165b5d3d.system.entry.js} +1 -1
  181. package/dist/ripple/{p-f779ec68.system.entry.js → p-22dda578.system.entry.js} +1 -1
  182. package/dist/ripple/{p-3f40f06b.system.entry.js → p-23bcc6d4.system.entry.js} +1 -1
  183. package/dist/ripple/p-2a30d411.system.entry.js +1 -0
  184. package/dist/ripple/p-32b88ab2.entry.js +1 -0
  185. package/dist/ripple/{p-a04ef164.system.entry.js → p-3376581a.system.entry.js} +1 -1
  186. package/dist/ripple/{p-de272ae7.system.entry.js → p-35218430.system.entry.js} +1 -1
  187. package/dist/ripple/{p-f22e26b6.system.entry.js → p-35644be9.system.entry.js} +1 -1
  188. package/dist/ripple/{p-ce44ba70.entry.js → p-35c7696e.entry.js} +1 -1
  189. package/dist/ripple/{p-544925c2.entry.js → p-362b19a2.entry.js} +1 -1
  190. package/dist/ripple/{p-460e9ef3.system.entry.js → p-391d9f32.system.entry.js} +1 -1
  191. package/dist/ripple/{p-608f69c1.system.entry.js → p-39dd3870.system.entry.js} +1 -1
  192. package/dist/ripple/{p-b5971475.system.entry.js → p-3bde67f1.system.entry.js} +1 -1
  193. package/dist/ripple/{p-ddcbb694.system.entry.js → p-3c407959.system.entry.js} +1 -1
  194. package/dist/ripple/p-3ceed568.entry.js +1 -0
  195. package/dist/ripple/{p-bd547650.system.entry.js → p-3ec9a2a2.system.entry.js} +1 -1
  196. package/dist/ripple/p-3f486eed.system.js +1 -0
  197. package/dist/ripple/{p-7478303e.entry.js → p-42596f25.entry.js} +1 -1
  198. package/dist/ripple/p-4a1601c5.js +1 -0
  199. package/dist/ripple/p-4b8cb0a4.entry.js +1 -0
  200. package/dist/ripple/{p-e71ee9f4.system.js → p-4c1efa04.system.js} +1 -1
  201. package/dist/ripple/{p-7e0fc193.system.entry.js → p-59e50ea1.system.entry.js} +1 -1
  202. package/dist/ripple/{p-68e04222.entry.js → p-5c25870c.entry.js} +1 -1
  203. package/dist/ripple/{p-702252ba.entry.js → p-5c62e26d.entry.js} +1 -1
  204. package/dist/ripple/p-5d8386b4.system.entry.js +1 -0
  205. package/dist/ripple/{p-c2b5d9e5.entry.js → p-62a99b68.entry.js} +1 -1
  206. package/dist/ripple/{p-1a4b6b02.system.entry.js → p-658f146a.system.entry.js} +1 -1
  207. package/dist/ripple/p-68a96191.entry.js +1 -0
  208. package/dist/ripple/p-6c0c2e1f.entry.js +1 -0
  209. package/dist/ripple/{p-c7e30eb0.system.entry.js → p-72e05203.system.entry.js} +1 -1
  210. package/dist/ripple/p-72f7d6e1.system.js +1 -0
  211. package/dist/ripple/p-76542ab3.entry.js +1 -0
  212. package/dist/ripple/{p-b976c84b.entry.js → p-76d248e6.entry.js} +1 -1
  213. package/dist/ripple/p-76f9acec.entry.js +1 -0
  214. package/dist/ripple/{p-5415aaf9.system.entry.js → p-79a6b32f.system.entry.js} +1 -1
  215. package/dist/ripple/{p-32bf3f5b.system.entry.js → p-823d7b4e.system.entry.js} +1 -1
  216. package/dist/ripple/{p-b5c371aa.system.entry.js → p-8240dd82.system.entry.js} +1 -1
  217. package/dist/ripple/{p-9d461de5.entry.js → p-83d1c1fb.entry.js} +1 -1
  218. package/dist/ripple/p-86a5178d.entry.js +1 -0
  219. package/dist/ripple/p-89a2db02.js +1 -0
  220. package/dist/ripple/p-8d4f674f.entry.js +1 -0
  221. package/dist/ripple/p-8f5ac061.entry.js +1 -0
  222. package/dist/ripple/{p-2b21c6f5.system.entry.js → p-9287d70b.system.entry.js} +1 -1
  223. package/dist/ripple/{p-366920dc.js → p-96505312.js} +1 -1
  224. package/dist/ripple/{p-710c6115.js → p-9708c995.js} +1 -1
  225. package/dist/ripple/p-985fb8b9.entry.js +1 -0
  226. package/dist/ripple/{p-7cf5993c.system.entry.js → p-a3f9e2f6.system.entry.js} +1 -1
  227. package/dist/ripple/{p-704be1e8.system.entry.js → p-a40296fc.system.entry.js} +1 -1
  228. package/dist/ripple/p-aaaee14f.entry.js +1 -0
  229. package/dist/ripple/p-b4e7d63f.entry.js +1 -0
  230. package/dist/ripple/p-ba047c79.entry.js +1 -0
  231. package/dist/ripple/p-ba32888d.system.js +1 -0
  232. package/dist/ripple/{p-3322823d.system.js → p-bb25b9af.system.js} +1 -1
  233. package/dist/ripple/{p-0ba2e506.system.entry.js → p-bda9a663.system.entry.js} +1 -1
  234. package/dist/ripple/{p-58668e84.system.entry.js → p-bee47080.system.entry.js} +1 -1
  235. package/dist/ripple/{p-4743176d.system.entry.js → p-c34c9cbb.system.entry.js} +1 -1
  236. package/dist/ripple/p-c5c31818.entry.js +1 -0
  237. package/dist/ripple/{p-d57e8196.entry.js → p-c62342c4.entry.js} +1 -1
  238. package/dist/ripple/{p-e2c6052b.system.entry.js → p-cca7a151.system.entry.js} +1 -1
  239. package/dist/ripple/{p-88ebddd7.entry.js → p-cd0cc88d.entry.js} +1 -1
  240. package/dist/ripple/p-cef8a45b.system.js +2 -0
  241. package/dist/ripple/{p-878fd4af.system.entry.js → p-d0736520.system.entry.js} +1 -1
  242. package/dist/ripple/{p-a2936bcb.system.entry.js → p-d1751f87.system.entry.js} +1 -1
  243. package/dist/ripple/p-d528f5e4.entry.js +1 -0
  244. package/dist/ripple/p-d9da0502.js +2 -0
  245. package/dist/ripple/p-da424bdb.entry.js +1 -0
  246. package/dist/ripple/{p-f6eff655.system.entry.js → p-ead461fe.system.entry.js} +1 -1
  247. package/dist/ripple/p-f39b556d.entry.js +1 -0
  248. package/dist/ripple/p-f98f9a32.entry.js +1 -0
  249. package/dist/ripple/p-f9a71cf6.entry.js +1 -0
  250. package/dist/ripple/{p-79d4f14b.system.entry.js → p-fc170968.system.entry.js} +1 -1
  251. package/dist/ripple/ripple.esm.js +1 -1
  252. package/dist/ripple/ripple.js +1 -1
  253. package/dist/types/stencil-public-runtime.d.ts +3 -10
  254. package/package.json +1 -1
  255. package/dist/cjs/index-e86c28b6.js +0 -2649
  256. package/dist/collection/components/charts/chartFunctions.spec.js +0 -16
  257. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.e2e.js +0 -81
  258. package/dist/collection/components/charts/screenshots.e2e.js +0 -96
  259. package/dist/collection/components/charts/wm-chart/wm-chart.e2e.js +0 -213
  260. package/dist/collection/components/charts/wm-chart/wm-chart.spec.js +0 -37
  261. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.e2e.js +0 -176
  262. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.spec.js +0 -163
  263. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.e2e.js +0 -69
  264. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.spec.js +0 -79
  265. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.spec.js +0 -89
  266. package/dist/collection/components/datepickers/wm-date-range.e2e.js +0 -443
  267. package/dist/collection/components/datepickers/wm-date-range.spec.js +0 -22
  268. package/dist/collection/components/datepickers/wm-datepicker.e2e.js +0 -382
  269. package/dist/collection/components/datepickers/wm-datepicker.spec.js +0 -21
  270. package/dist/collection/components/selects/wm-option/wm-option.e2e.js +0 -22
  271. package/dist/collection/components/selects/wm-option/wm-option.spec.js +0 -63
  272. package/dist/collection/components/selects/wm-select/wm-select.e2e.js +0 -521
  273. package/dist/collection/components/selects/wm-select/wm-select.spec.js +0 -271
  274. package/dist/collection/components/wm-action-menu/wm-action-menu.e2e.js +0 -200
  275. package/dist/collection/components/wm-action-menu/wm-action-menu.spec.js +0 -48
  276. package/dist/collection/components/wm-button/wm-button.e2e.js +0 -55
  277. package/dist/collection/components/wm-button/wm-button.spec.js +0 -74
  278. package/dist/collection/components/wm-file/wm-file.spec.js +0 -194
  279. package/dist/collection/components/wm-file-list/wm-file-list.spec.js +0 -69
  280. package/dist/collection/components/wm-input/wm-input.e2e.js +0 -32
  281. package/dist/collection/components/wm-input/wm-input.spec.js +0 -173
  282. package/dist/collection/components/wm-menuitem/wm-menuitem.e2e.js +0 -23
  283. package/dist/collection/components/wm-menuitem/wm-menuitem.spec.js +0 -54
  284. package/dist/collection/components/wm-modal/wm-modal-footer.spec.js +0 -11
  285. package/dist/collection/components/wm-modal/wm-modal-header.spec.js +0 -8
  286. package/dist/collection/components/wm-modal/wm-modal.e2e.js +0 -104
  287. package/dist/collection/components/wm-modal/wm-modal.spec.js +0 -30
  288. package/dist/collection/components/wm-navigation/wm-navigation.e2e.js +0 -102
  289. package/dist/collection/components/wm-navigation/wm-navigation.spec.js +0 -91
  290. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.e2e.js +0 -50
  291. package/dist/collection/components/wm-navigator/wm-navigator.e2e.js +0 -209
  292. package/dist/collection/components/wm-navigator/wm-navigator.spec.js +0 -177
  293. package/dist/collection/components/wm-pagination/wm-pagination.e2e.js +0 -312
  294. package/dist/collection/components/wm-search/wm-search.e2e.js +0 -76
  295. package/dist/collection/components/wm-search/wm-search.spec.js +0 -71
  296. package/dist/collection/components/wm-snackbar/wm-snackbar.e2e.js +0 -112
  297. package/dist/collection/components/wm-snackbar/wm-snackbar.spec.js +0 -9
  298. package/dist/collection/components/wm-tabs/wm-tabs.e2e.js +0 -91
  299. package/dist/collection/components/wm-tabs/wm-tabs.spec.js +0 -12
  300. package/dist/collection/components/wm-tag-input/wm-tag-input.e2e.js +0 -204
  301. package/dist/collection/components/wm-tag-input/wm-tag-input.spec.js +0 -195
  302. package/dist/collection/components/wm-textarea/wm-textarea.e2e.js +0 -41
  303. package/dist/collection/components/wm-textarea/wm-textarea.spec.js +0 -79
  304. package/dist/collection/components/wm-timepicker/wm-timepicker.e2e.js +0 -163
  305. package/dist/collection/components/wm-timepicker/wm-timepicker.spec.js +0 -147
  306. package/dist/collection/components/wm-toggletip/wm-toggletip.e2e.js +0 -69
  307. package/dist/collection/components/wm-toggletip/wm-toggletip.spec.js +0 -21
  308. package/dist/collection/components/wm-uploader/wm-uploader.e2e.js +0 -70
  309. package/dist/collection/components/wm-uploader/wm-uploader.spec.js +0 -234
  310. package/dist/collection/global/functions.spec.js +0 -126
  311. package/dist/collection/lang/lang.spec.js +0 -20
  312. package/dist/esm/index-558b5a82.js +0 -2618
  313. package/dist/esm-es5/functions-8800c690.js +0 -1
  314. package/dist/esm-es5/global-03298ea6.js +0 -1
  315. package/dist/esm-es5/index-558b5a82.js +0 -1
  316. package/dist/ripple/p-159c4e96.entry.js +0 -1
  317. package/dist/ripple/p-1fce9f27.entry.js +0 -1
  318. package/dist/ripple/p-22cfff23.entry.js +0 -1
  319. package/dist/ripple/p-32507c13.system.entry.js +0 -1
  320. package/dist/ripple/p-39e26322.entry.js +0 -1
  321. package/dist/ripple/p-3fa38234.entry.js +0 -1
  322. package/dist/ripple/p-44f426ad.entry.js +0 -1
  323. package/dist/ripple/p-4de728e1.entry.js +0 -1
  324. package/dist/ripple/p-4ff87702.system.entry.js +0 -1
  325. package/dist/ripple/p-568c595f.js +0 -2
  326. package/dist/ripple/p-5e9c9f0d.entry.js +0 -1
  327. package/dist/ripple/p-64b1e73b.entry.js +0 -1
  328. package/dist/ripple/p-6c3ed244.system.js +0 -1
  329. package/dist/ripple/p-6e72a06c.entry.js +0 -1
  330. package/dist/ripple/p-79043436.entry.js +0 -1
  331. package/dist/ripple/p-797d65b7.entry.js +0 -1
  332. package/dist/ripple/p-8254e7a2.js +0 -1
  333. package/dist/ripple/p-828d2094.system.js +0 -1
  334. package/dist/ripple/p-8cd8f784.entry.js +0 -1
  335. package/dist/ripple/p-8d72d140.entry.js +0 -1
  336. package/dist/ripple/p-94495341.entry.js +0 -1
  337. package/dist/ripple/p-94717864.entry.js +0 -1
  338. package/dist/ripple/p-9eaa0acb.system.entry.js +0 -1
  339. package/dist/ripple/p-a69425b0.entry.js +0 -1
  340. package/dist/ripple/p-ab8d78cc.system.js +0 -2
  341. package/dist/ripple/p-adc254e6.entry.js +0 -1
  342. package/dist/ripple/p-b02048a9.entry.js +0 -1
  343. package/dist/ripple/p-b2706394.entry.js +0 -1
  344. package/dist/ripple/p-dc77d98a.entry.js +0 -1
  345. package/dist/ripple/p-eca78c2b.js +0 -1
  346. package/dist/ripple/p-edd87140.system.js +0 -1
  347. package/dist/ripple/p-f5bc8926.entry.js +0 -1
@@ -1,382 +0,0 @@
1
- import { newE2EPage } from "@stencil/core/testing";
2
- import { AxePuppeteer } from "@axe-core/puppeteer";
3
- describe("wm-datepicker", () => {
4
- let page, component, input, btn, popup, popupTitleDay;
5
- beforeEach(async () => {
6
- page = await newE2EPage();
7
- await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
8
- <wm-datepicker id="dp" label="label"></wm-datepicker>
9
- </main></body></html>`);
10
- component = await page.find("wm-datepicker");
11
- input = await page.find("wm-datepicker >>> input");
12
- btn = await page.find("wm-datepicker >>> #toggle");
13
- popup = await page.find("wm-datepicker >>> #popup");
14
- popupTitleDay = await page.find("wm-datepicker >>> #popup-title-month");
15
- // await page.keyboard.press("Tab");
16
- // await page.waitForChanges();
17
- });
18
- it("passes Axe checks", async () => {
19
- const results = await new AxePuppeteer(page).analyze();
20
- expect(results.violations.length).toBe(0);
21
- });
22
- // TODO
23
- // see https://dequeuniversity.com/checklists/web/form-validation-feedback
24
- // for Dynamic Error Detection / Error messages
25
- // see also role="alert"
26
- /* INPUT */
27
- // See datepicker-input.e2e.ts
28
- /* BUTTON */
29
- // Opening and closing the date picker
30
- it("opens at today's date by default", async () => {
31
- const popup = await page.find("wm-datepicker >>> .popup");
32
- const today = new Date();
33
- const year = today.getUTCFullYear();
34
- const month = (today.getUTCMonth() + 1).toString().padStart(2, "0");
35
- const day = today.getUTCDate().toString();
36
- const dateTable = await popup.find("[role='grid']");
37
- // await page.waitForChanges();
38
- const selDate = await dateTable.find("[aria-selected='true']");
39
- expect(selDate).toEqualAttribute("data-year", year);
40
- expect(selDate).toEqualAttribute("data-month", month);
41
- expect(selDate.textContent).toBe(day);
42
- });
43
- it("opens at the date in the input if there is one", async () => {
44
- const input = await page.find("wm-datepicker >>> input");
45
- const popup = await page.find("wm-datepicker >>> .popup");
46
- await input.type("02/01/2030");
47
- await component.setProperty("calendarDate", "2030-02-01");
48
- await page.waitForChanges();
49
- await page.keyboard.press("Tab");
50
- await page.keyboard.press("Enter");
51
- await page.waitForChanges();
52
- const dateTable = await popup.find("[role='grid']");
53
- const selDate = await dateTable.find("[aria-selected='true']");
54
- expect(selDate).toEqualAttribute("data-year", "2030");
55
- expect(selDate).toEqualAttribute("data-month", "02");
56
- expect(selDate.textContent).toBe("1");
57
- });
58
- it("Closes the popup when user triggers the calendar button", async () => {
59
- const popup = await page.find("wm-datepicker >>> .popup");
60
- await page.keyboard.press("Tab"); // in input
61
- await page.keyboard.press("Tab"); // on btn
62
- await page.keyboard.press("Enter");
63
- await page.waitForChanges();
64
- expect(popup).toHaveClass("open");
65
- await page.keyboard.press("Escape");
66
- await page.waitForChanges();
67
- expect(popup).not.toHaveClass("open");
68
- });
69
- /* POPUP */
70
- it("closes the calendar popup when the user presses ESCAPE", async () => {
71
- await input.type("02/03/2019");
72
- await component.setProperty("calendarDate", "2019-02-03");
73
- await page.waitForChanges();
74
- await page.keyboard.press("Tab");
75
- await page.keyboard.press("Enter");
76
- await page.waitForChanges();
77
- await page.keyboard.press("Escape");
78
- await page.waitForChanges();
79
- expect(popup).not.toHaveClass("open");
80
- });
81
- it("shows the next month on PAGE DOWN and shows the previous month on PAGE UP", async () => {
82
- await input.type("02/03/2019");
83
- await component.setProperty("calendarDate", "2019-02-03");
84
- await page.waitForChanges();
85
- await page.keyboard.press("Tab");
86
- await page.keyboard.press("Enter");
87
- await page.waitForChanges();
88
- await page.keyboard.press("PageDown");
89
- await page.waitForChanges();
90
- expect(popupTitleDay.textContent).toBe("March 2019");
91
- let activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
92
- expect(activeElId).toEqual("cell-20190303");
93
- await page.keyboard.press("PageUp");
94
- await page.waitForChanges();
95
- await page.keyboard.press("PageUp");
96
- await page.waitForChanges();
97
- await page.keyboard.press("PageUp");
98
- await page.waitForChanges();
99
- activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
100
- expect(activeElId).toEqual("cell-20181203");
101
- });
102
- it("handles HOME and END keys", async () => {
103
- await input.type("02/15/2020");
104
- await component.setProperty("calendarDate", "2020-02-15");
105
- await page.waitForChanges();
106
- await page.keyboard.press("Tab");
107
- await page.keyboard.press("Enter");
108
- await page.waitForChanges();
109
- await page.keyboard.press("Home");
110
- await page.waitForChanges();
111
- const firstDayOfMonth = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
112
- expect(firstDayOfMonth).toEqual("cell-20200201");
113
- await page.keyboard.press("End");
114
- await page.waitForChanges();
115
- const lastDayOfMonth = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
116
- expect(lastDayOfMonth).toEqual("cell-20200229"); // 2020 is a leap year
117
- });
118
- it("navigates the calendar with keyboard (day view)", async () => {
119
- // left/right: -1 / +1 in the row
120
- // up/down
121
- await input.type("08/15/2024");
122
- await component.setProperty("calendarDate", "2024-08-15");
123
- await page.keyboard.press("Tab"); // on the toggle popup btn
124
- await page.waitForChanges();
125
- await page.keyboard.press("Enter"); // open popup
126
- await page.waitForChanges();
127
- await page.keyboard.press("ArrowLeft");
128
- await page.waitForChanges();
129
- let focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
130
- await page.waitForChanges();
131
- expect(focusedCell).toEqualAttribute("id", "cell-20240814");
132
- await page.keyboard.press("ArrowUp");
133
- await page.waitForChanges();
134
- focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
135
- expect(focusedCell).toEqualAttribute("id", "cell-20240807");
136
- await page.keyboard.press("ArrowRight");
137
- await page.waitForChanges();
138
- focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
139
- expect(focusedCell).toEqualAttribute("id", "cell-20240808");
140
- await page.keyboard.press("ArrowDown");
141
- await page.waitForChanges();
142
- focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
143
- expect(focusedCell).toEqualAttribute("id", "cell-20240815");
144
- });
145
- it("navigates the calendar with keyboard (month view)", async () => {
146
- await input.type("08/15/2024");
147
- await component.setProperty("calendarDate", "2024-08-15");
148
- await page.keyboard.press("Tab"); // on the toggle popup btn
149
- await page.waitForChanges();
150
- await page.keyboard.press("Enter"); // open popup
151
- await page.keyboard.down("Shift");
152
- await page.waitForChanges();
153
- await page.keyboard.press("Tab"); // next btn
154
- await page.waitForChanges();
155
- await page.keyboard.press("Tab"); // popup-title (month + year)
156
- await page.waitForChanges();
157
- await page.keyboard.press("Enter");
158
- await page.waitForChanges();
159
- await page.keyboard.up("Shift");
160
- await page.waitForChanges();
161
- await page.keyboard.press("ArrowLeft");
162
- await page.waitForChanges();
163
- let focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
164
- await page.waitForChanges();
165
- expect(focusedCell).toEqualAttribute("id", "month-6"); // month is july (7), 0-indexed
166
- await page.keyboard.press("ArrowUp");
167
- await page.waitForChanges();
168
- focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
169
- expect(focusedCell).toEqualAttribute("id", "month-3");
170
- await page.keyboard.press("ArrowRight");
171
- await page.waitForChanges();
172
- focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
173
- expect(focusedCell).toEqualAttribute("id", "month-4");
174
- await page.keyboard.press("ArrowDown");
175
- await page.waitForChanges();
176
- focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
177
- expect(focusedCell).toEqualAttribute("id", "month-7");
178
- });
179
- // it("goes to the year view when the month name is clicked", async () => {
180
- // // (i.e. allows selection of a month)
181
- // });
182
- it("goes to the previous/next month when the arrow button is triggered in day view", async () => {
183
- await input.type("11/29/1999");
184
- await component.setProperty("calendarDate", "1999-11-29");
185
- await page.keyboard.press("Tab"); // on the toggle popup btn
186
- await page.waitForChanges();
187
- await page.keyboard.press("Enter"); // open popup
188
- await page.waitForChanges();
189
- await page.keyboard.down("Shift");
190
- await page.waitForChanges();
191
- await page.keyboard.press("Tab"); // next btn
192
- await page.waitForChanges();
193
- await page.keyboard.press("Tab"); // popup-title (month + year)
194
- await page.waitForChanges();
195
- await page.keyboard.press("Tab"); // prev btn
196
- await page.waitForChanges();
197
- await page.keyboard.up("Shift");
198
- await page.waitForChanges();
199
- await page.keyboard.press("Enter"); // press prev btn
200
- await page.waitForChanges();
201
- expect(popup).toHaveClasses(["open", "day-view"]);
202
- expect(popupTitleDay.textContent).toBe("October 1999");
203
- await page.keyboard.press("Tab"); // popup title btn
204
- await page.keyboard.press("Tab"); // next btn
205
- await page.keyboard.press("Enter"); // press next btn
206
- await page.waitForChanges();
207
- await page.keyboard.press("Enter"); // press next btn
208
- await page.waitForChanges();
209
- expect(popupTitleDay.textContent).toBe("December 1999");
210
- });
211
- it("goes to the previous/next year when the arrow button is clicked in month view", async () => {
212
- await input.type("11/29/1999");
213
- await component.setProperty("calendarDate", "1999-11-29");
214
- await page.waitForChanges();
215
- await page.keyboard.press("Tab"); // on the toggle popup btn
216
- await page.waitForChanges();
217
- await page.keyboard.press("Enter"); // open popup
218
- await page.waitForChanges();
219
- await page.keyboard.down("Shift");
220
- await page.keyboard.press("Tab"); // next btn
221
- await page.waitForChanges();
222
- await page.keyboard.press("Tab"); // month view btn
223
- await page.waitForChanges();
224
- await page.keyboard.up("Shift");
225
- await page.waitForChanges();
226
- await page.keyboard.press("Enter"); // press month view btn
227
- await page.waitForChanges();
228
- expect(popup).toHaveClasses(["open", "month-view"]);
229
- const title = await popup.find("#popup-title-year");
230
- expect(title.textContent).toBe("1999");
231
- await page.keyboard.down("Shift");
232
- await page.keyboard.press("Tab"); // next btn
233
- await page.keyboard.up("Shift");
234
- await page.keyboard.press("Enter"); // press next btn
235
- await page.waitForChanges();
236
- expect(title.textContent).toBe("2000");
237
- await page.keyboard.down("Shift");
238
- await page.keyboard.press("Tab"); // year btn
239
- await page.keyboard.down("Shift");
240
- await page.keyboard.press("Tab"); // prev btn
241
- await page.keyboard.up("Shift");
242
- await page.keyboard.press("Enter"); // press prev btn
243
- await page.waitForChanges();
244
- expect(title.textContent).toBe("1999");
245
- await page.keyboard.press("Enter"); // press prev btn
246
- await page.waitForChanges();
247
- await page.keyboard.press("Enter"); // press prev btn
248
- await page.waitForChanges();
249
- expect(title.textContent).toBe("1997");
250
- });
251
- it("has the aria attributes related to the popup", async () => {
252
- // NB "If the element with the aria-expanded attribute controls the expansion of another grouping container
253
- // that is not 'owned by' the element, the author SHOULD reference the container by using the aria-controls attribute."
254
- // src: https://www.w3.org/TR/wai-aria-1.1/#aria-expanded
255
- expect(btn).toHaveAttribute("aria-expanded");
256
- // Not sure is aria-haspopup is necessary. If it is present the popup should have a role
257
- // if that role is grid (the only role that seems to correspond) then the cells must have
258
- // a role of gridcell
259
- // https://www.w3.org/TR/wai-aria/#aria-haspopup
260
- // expect(btn).toHaveAttribute("aria-haspopup");
261
- //Removed aria-controls since the popup comes immediately after the aria-expanded controller:
262
- //https://www.heydonworks.com/article/aria-controls-is-poop
263
- });
264
- it("toggles aria-expanded attribute", async () => {
265
- expect(btn).toEqualAttribute("aria-expanded", "false");
266
- await page.keyboard.press("Tab");
267
- await page.keyboard.press("Tab");
268
- await page.keyboard.press("Enter");
269
- await page.waitForChanges();
270
- expect(btn).toEqualAttribute("aria-expanded", "true");
271
- });
272
- it("properly fills the-label on table cells", async () => {
273
- // screen reader should read "Thursday, May 10 2018" on focus
274
- // screen reader should read "Thursday, May 10 2018, selected" on select
275
- await input.type("05/10/2018");
276
- await component.setProperty("calendarDate", "2018-05-10");
277
- await page.waitForChanges();
278
- await page.keyboard.press("Tab");
279
- await page.waitForChanges();
280
- await page.keyboard.press("Enter");
281
- await page.waitForChanges();
282
- const focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
283
- await page.waitForChanges();
284
- // day of the week is read by sr bcse it's the table column
285
- expect(focusedCell).toEqualAttribute("aria-label", "Thursday, May 10, 2018");
286
- // screen reader should read "Thursday, May 10 2018, selected" on select
287
- await page.keyboard.press("Enter");
288
- await page.waitForChanges();
289
- const selCell = await popup.find("[aria-selected='true']");
290
- // day of the week is read by sr bcse it's the table column
291
- expect(selCell).toEqualAttribute("aria-label", "Thursday, May 10, 2018");
292
- });
293
- it("aligns dates properly", async () => {
294
- // -> check that both 01/01/1999 and 12/31/2100 are in the Friday column
295
- // couldn't figure this one out...
296
- });
297
- it("emits event on input blur", async () => {
298
- page = await newE2EPage();
299
- await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
300
- <wm-datepicker id="dp" label="label"></wm-datepicker>
301
- <div id="indicator">no event heard</div>
302
- </main></body></html>`);
303
- component = await page.find("wm-datepicker");
304
- input = await page.find("wm-datepicker >>> input");
305
- await page.waitForChanges();
306
- await page.evaluate(async () => {
307
- const indicator = document.querySelector("#indicator");
308
- await document.addEventListener("wmDatepickerInputBlurred", () => (indicator.textContent = "event heard"));
309
- });
310
- await page.waitForChanges;
311
- const indicator = await page.find("#indicator");
312
- expect(indicator.textContent).toBe("no event heard");
313
- await input.type("05/10/2018");
314
- await page.keyboard.press("Tab");
315
- await page.waitForChanges();
316
- expect(indicator.textContent).toBe("event heard");
317
- });
318
- it("emits event on change", async () => {
319
- page = await newE2EPage();
320
- await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
321
- <wm-datepicker id="dp" label="label"></wm-datepicker>
322
- <div id="indicator">events heard: 0</div>
323
- </main></body></html>`);
324
- component = await page.find("wm-datepicker");
325
- input = await page.find("wm-datepicker >>> input");
326
- await page.waitForChanges();
327
- await page.evaluate(async () => {
328
- const indicator = document.querySelector("#indicator");
329
- await document
330
- .querySelector("wm-datepicker")
331
- .addEventListener("change", () => (indicator.textContent =
332
- indicator.textContent.slice(0, -1) + (parseInt(indicator.textContent.slice(-1)) + 1)));
333
- });
334
- await page.waitForChanges;
335
- const indicator = await page.find("#indicator");
336
- expect(indicator.textContent).toBe("events heard: 0");
337
- // user types date
338
- await input.type("05/10/2018");
339
- await page.keyboard.press("Tab");
340
- await page.waitForChanges();
341
- expect(indicator.textContent).toBe("events heard: 1");
342
- // user selects date from calendar
343
- await page.keyboard.press("Enter");
344
- await page.waitForChanges();
345
- await page.keyboard.press("ArrowRight");
346
- await page.keyboard.press("Enter");
347
- await page.waitForChanges();
348
- expect(indicator.textContent).toBe("events heard: 2");
349
- });
350
- it("emits event with date on cell selection", async () => {
351
- page = await newE2EPage();
352
- await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
353
- <wm-datepicker id="dp" value="12/30/1999" label="label"></wm-datepicker>
354
- <div id="indicator"></div>
355
- </main></body></html>`);
356
- component = await page.find("wm-datepicker");
357
- input = await page.find("wm-datepicker >>> input");
358
- await page.waitForChanges();
359
- await page.evaluate(async () => {
360
- const indicator = document.querySelector("#indicator");
361
- await document.querySelector("wm-datepicker").addEventListener("wmDatepickerDateSelected", (ev) => (indicator.textContent =
362
- //@ts-ignore
363
- `date received: ${ev.detail.date}`));
364
- });
365
- await page.waitForChanges;
366
- const indicator = await page.find("#indicator");
367
- // user types date
368
- await page.keyboard.press("Tab");
369
- await page.keyboard.press("Tab");
370
- await page.waitForChanges();
371
- await page.keyboard.press("Enter");
372
- await page.waitForChanges();
373
- await page.keyboard.press("Enter");
374
- await page.waitForChanges();
375
- expect(indicator.textContent).toBe("date received: 1999-12-30");
376
- });
377
- });
378
- // Sources:
379
- // https://watermarkinsights.atlassian.net/browse/DNP-3411
380
- // https://watermarkinsights.atlassian.net/browse/DNP-4318
381
- // https://axesslab.com/accessible-datepickers/
382
- // https://www.w3.org/WAI/PF/HTML/wiki/Datepickers
@@ -1,21 +0,0 @@
1
- import { newSpecPage } from "@stencil/core/testing";
2
- import * as globalFunctions from "../../global/functions";
3
- jest.spyOn(globalFunctions, "generateId").mockReturnValue("random-id");
4
- import { DatePicker } from "./wm-datepicker";
5
- describe("wm-datepicker", () => {
6
- it("builds", async () => {
7
- const comp = await newSpecPage({
8
- components: [DatePicker],
9
- html: '<wm-datepicker label="mock label"></wm-datepicker>',
10
- });
11
- expect(comp.root).toMatchSnapshot();
12
- });
13
- it("sets input to required", async () => {
14
- const page = await newSpecPage({
15
- components: [DatePicker],
16
- html: `<wm-datepicker label='datepicker' required-field='true'></wm-datepicker>`,
17
- });
18
- const input = await page.root.shadowRoot.querySelector("input");
19
- expect(input).toEqualAttribute("aria-required", "true");
20
- });
21
- });
@@ -1,22 +0,0 @@
1
- import { newE2EPage } from "@stencil/core/testing";
2
- describe("wm-option", () => {
3
- let page;
4
- beforeEach(async () => {
5
- page = await newE2EPage();
6
- await page.setContent("<wm-select id='test' label='select something'><wm-option id='first' disabled onClick='action()'>First option</wm-option><wm-option id='second' disabled>Second option</wm-option><wm-option id='third'>Third option</wm-option></wm-select><script>function action() {document.getElementById('second').textContent = 'the function ran!'}</script>");
7
- });
8
- // RENDER
9
- it("renders", async () => {
10
- const element = await page.find("wm-option");
11
- expect(element).not.toBeNull();
12
- });
13
- it("prevents action on disabled option", async () => {
14
- await page.keyboard.press("Tab");
15
- await page.keyboard.press("Enter"); // dropdown opens
16
- await page.waitForChanges();
17
- await page.keyboard.press("Enter"); // Enter on disabled option
18
- await page.waitForChanges();
19
- let changedOption = await page.find("wm-option#second");
20
- expect(changedOption.textContent).toEqual("Second option"); // the function that shouldn't run replaces this text by: "the function ran!"
21
- });
22
- });
@@ -1,63 +0,0 @@
1
- import { newSpecPage } from "@stencil/core/testing";
2
- import { Option } from "./wm-option";
3
- import { Select } from "../wm-select/wm-select";
4
- // mock MutationObserver
5
- global.MutationObserver = jest.fn().mockImplementation(() => ({
6
- observe: jest.fn(),
7
- unobserve: jest.fn(),
8
- disconnect: jest.fn(),
9
- }));
10
- describe("wm-option", () => {
11
- it("builds", async () => {
12
- const page = await newSpecPage({
13
- components: [Option],
14
- html: `<wm-select label="abel">
15
- <wm-option>1</wm-option>
16
- <wm-option value="second">2</wm-option>
17
- </wm-select>`,
18
- });
19
- expect(page.root).toMatchSnapshot();
20
- });
21
- it("has the role of option", async () => {
22
- const page = await newSpecPage({
23
- components: [Option],
24
- html: `<wm-select label="label">
25
- <wm-option>1</wm-option>
26
- <wm-option value="second">2</wm-option>
27
- </wm-select>`,
28
- });
29
- expect(page.root).toEqualAttribute("role", "option");
30
- });
31
- it("returns the value", async () => {
32
- // if devs set the value attribute or property,
33
- // the component should return it on comp.value
34
- const page = await newSpecPage({
35
- components: [Select, Option],
36
- html: `<wm-select label="abel">
37
- <wm-option>1</wm-option>
38
- <wm-option value="second">2</wm-option>
39
- </wm-select>`,
40
- });
41
- const select = page.root;
42
- const options = select.querySelectorAll("wm-option");
43
- expect(options[0].value).toBeUndefined();
44
- expect(options[1].value).toBe("second");
45
- });
46
- it("handles disabled onClick function", async () => {
47
- const page = await newSpecPage({
48
- components: [Option],
49
- html: `<wm-select label="label">
50
- <wm-option>1</wm-option>
51
- <wm-option value="second">2</wm-option>
52
- </wm-select>`,
53
- });
54
- const menuItem = page.root;
55
- const onClickFunc = () => console.log("Message");
56
- menuItem.onclick = onClickFunc;
57
- expect(menuItem.onclick).toEqual(onClickFunc);
58
- menuItem.disabled = true;
59
- expect(menuItem.onclick).toBe(null);
60
- menuItem.disabled = false;
61
- expect(menuItem.onclick).toEqual(onClickFunc);
62
- });
63
- });