@watermarkinsights/ripple 5.3.1 → 5.4.0-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{esm/global-309e423a.js → cjs/app-globals-338dc72a.js} +10 -1
- package/dist/cjs/{chartFunctions-0238043b.js → chartFunctions-9c8c61ef.js} +4 -4
- package/dist/cjs/{functions-3be85c6d.js → functions-05e7ad5a.js} +104 -7
- package/dist/cjs/index-788526f5.js +1851 -0
- package/dist/cjs/{intl-567eb9d8.js → intl-2b550151.js} +1 -1
- package/dist/cjs/loader.cjs.js +4 -3
- package/dist/cjs/priv-calendar.cjs.entry.js +6 -5
- package/dist/cjs/priv-chart-popover.cjs.entry.js +6 -5
- package/dist/cjs/priv-navigator-button.cjs.entry.js +4 -3
- package/dist/cjs/priv-navigator-item.cjs.entry.js +4 -3
- package/dist/cjs/ripple.cjs.js +12 -11
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +8 -6
- package/dist/cjs/wm-button.cjs.entry.js +5 -4
- package/dist/cjs/wm-chart-slice.cjs.entry.js +1 -1
- package/dist/cjs/wm-chart.cjs.entry.js +7 -6
- package/dist/cjs/wm-date-range.cjs.entry.js +8 -7
- package/dist/cjs/wm-datepicker.cjs.entry.js +8 -7
- package/dist/cjs/wm-file-list.cjs.entry.js +4 -3
- package/dist/cjs/wm-file.cjs.entry.js +5 -4
- package/dist/cjs/wm-input.cjs.entry.js +6 -5
- package/dist/cjs/wm-line-chart.cjs.entry.js +15 -14
- package/dist/cjs/wm-modal-footer.cjs.entry.js +4 -3
- package/dist/cjs/wm-modal-header.cjs.entry.js +6 -5
- package/dist/cjs/wm-modal.cjs.entry.js +6 -5
- package/dist/cjs/wm-navigation_3.cjs.entry.js +13 -10
- package/dist/cjs/wm-navigator.cjs.entry.js +4 -3
- package/dist/cjs/wm-option_2.cjs.entry.js +10 -8
- package/dist/cjs/wm-pagination.cjs.entry.js +5 -4
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +9 -7
- package/dist/cjs/wm-search.cjs.entry.js +7 -6
- package/dist/cjs/wm-snackbar.cjs.entry.js +7 -6
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +11 -8
- package/dist/cjs/wm-tag-input.cjs.entry.js +8 -7
- package/dist/cjs/wm-tag-option.cjs.entry.js +2 -2
- package/dist/cjs/wm-textarea.cjs.entry.js +6 -5
- package/dist/cjs/wm-timepicker.cjs.entry.js +6 -5
- package/dist/cjs/wm-toggletip.cjs.entry.js +6 -5
- package/dist/cjs/wm-uploader.cjs.entry.js +7 -6
- package/dist/cjs/wm-wrapper.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/charts/chartFunctions.js +2 -2
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +2 -2
- package/dist/collection/components/charts/wm-chart/wm-chart.js +1 -1
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +9 -9
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +1 -1
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +1 -1
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +2 -2
- package/dist/collection/components/datepickers/wm-date-range.js +16 -12
- package/dist/collection/components/datepickers/wm-datepicker.js +16 -12
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +1 -1
- package/dist/collection/components/wm-button/wm-button.js +1 -1
- package/dist/collection/components/wm-file/wm-file.js +1 -1
- package/dist/collection/components/wm-file-list/wm-file-list.js +1 -1
- package/dist/collection/components/wm-input/wm-input.js +1 -1
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +1 -1
- package/dist/collection/components/wm-modal/wm-modal-footer.js +1 -1
- package/dist/collection/components/wm-modal/wm-modal-header.js +1 -1
- package/dist/collection/components/wm-modal/wm-modal.js +2 -2
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +1 -1
- package/dist/collection/components/wm-navigation/wm-navigation-item.js +1 -1
- package/dist/collection/components/wm-navigation/wm-navigation.js +2 -2
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +1 -1
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +1 -1
- package/dist/collection/components/wm-option/wm-option.js +1 -1
- package/dist/collection/components/wm-pagination/wm-pagination.js +1 -1
- package/dist/collection/components/wm-search/wm-search.js +5 -4
- package/dist/collection/components/wm-select/wm-select.js +2 -2
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +2 -2
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +1 -1
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +1 -1
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +1 -1
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +3 -3
- package/dist/collection/components/wm-textarea/wm-textarea.js +1 -1
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +11 -8
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +2 -2
- package/dist/collection/components/wm-uploader/wm-uploader.js +2 -2
- package/dist/collection/dev/chart.js +13 -32
- package/dist/{cjs/global-41dfa85b.js → esm/app-globals-5fa0b568.js} +7 -2
- package/dist/esm/{chartFunctions-036fdb89.js → chartFunctions-a4c41273.js} +4 -4
- package/dist/esm/{functions-46843ea0.js → functions-25781571.js} +105 -8
- package/dist/esm/index-130e07bb.js +1820 -0
- package/dist/esm/{intl-8b8740b9.js → intl-df3d34d1.js} +1 -1
- package/dist/esm/loader.js +5 -4
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/priv-calendar.entry.js +6 -5
- package/dist/esm/priv-chart-popover.entry.js +6 -5
- package/dist/esm/priv-navigator-button.entry.js +4 -3
- package/dist/esm/priv-navigator-item.entry.js +4 -3
- package/dist/esm/ripple.js +13 -12
- package/dist/esm/wm-action-menu_2.entry.js +8 -6
- package/dist/esm/wm-button.entry.js +5 -4
- package/dist/esm/wm-chart-slice.entry.js +1 -1
- package/dist/esm/wm-chart.entry.js +7 -6
- package/dist/esm/wm-date-range.entry.js +8 -7
- package/dist/esm/wm-datepicker.entry.js +8 -7
- package/dist/esm/wm-file-list.entry.js +4 -3
- package/dist/esm/wm-file.entry.js +5 -4
- package/dist/esm/wm-input.entry.js +6 -5
- package/dist/esm/wm-line-chart.entry.js +15 -14
- package/dist/esm/wm-modal-footer.entry.js +4 -3
- package/dist/esm/wm-modal-header.entry.js +6 -5
- package/dist/esm/wm-modal.entry.js +6 -5
- package/dist/esm/wm-navigation_3.entry.js +13 -10
- package/dist/esm/wm-navigator.entry.js +4 -3
- package/dist/esm/wm-option_2.entry.js +10 -8
- package/dist/esm/wm-pagination.entry.js +5 -4
- package/dist/esm/wm-progress-indicator_3.entry.js +9 -7
- package/dist/esm/wm-search.entry.js +7 -6
- package/dist/esm/wm-snackbar.entry.js +7 -6
- package/dist/esm/wm-tab-item_3.entry.js +11 -8
- package/dist/esm/wm-tag-input.entry.js +8 -7
- package/dist/esm/wm-tag-option.entry.js +2 -2
- package/dist/esm/wm-textarea.entry.js +6 -5
- package/dist/esm/wm-timepicker.entry.js +6 -5
- package/dist/esm/wm-toggletip.entry.js +6 -5
- package/dist/esm/wm-uploader.entry.js +7 -6
- package/dist/esm/wm-wrapper.entry.js +1 -1
- package/dist/esm-es5/app-globals-5fa0b568.js +1 -0
- package/dist/esm-es5/{chartFunctions-036fdb89.js → chartFunctions-a4c41273.js} +1 -1
- package/dist/esm-es5/functions-25781571.js +1 -0
- package/dist/esm-es5/index-130e07bb.js +1 -0
- package/dist/esm-es5/{intl-8b8740b9.js → intl-df3d34d1.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/priv-calendar.entry.js +1 -1
- package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
- package/dist/esm-es5/ripple.js +1 -1
- package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
- package/dist/esm-es5/wm-button.entry.js +1 -1
- package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
- package/dist/esm-es5/wm-chart.entry.js +1 -1
- package/dist/esm-es5/wm-date-range.entry.js +1 -1
- package/dist/esm-es5/wm-datepicker.entry.js +1 -1
- package/dist/esm-es5/wm-file-list.entry.js +1 -1
- package/dist/esm-es5/wm-file.entry.js +1 -1
- package/dist/esm-es5/wm-input.entry.js +1 -1
- package/dist/esm-es5/wm-line-chart.entry.js +1 -1
- package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
- package/dist/esm-es5/wm-modal-header.entry.js +1 -1
- package/dist/esm-es5/wm-modal.entry.js +1 -1
- package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
- package/dist/esm-es5/wm-navigator.entry.js +1 -1
- package/dist/esm-es5/wm-option_2.entry.js +1 -1
- package/dist/esm-es5/wm-pagination.entry.js +1 -1
- package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
- package/dist/esm-es5/wm-search.entry.js +1 -1
- package/dist/esm-es5/wm-snackbar.entry.js +1 -1
- package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
- package/dist/esm-es5/wm-tag-input.entry.js +1 -1
- package/dist/esm-es5/wm-tag-option.entry.js +1 -1
- package/dist/esm-es5/wm-textarea.entry.js +1 -1
- package/dist/esm-es5/wm-timepicker.entry.js +1 -1
- package/dist/esm-es5/wm-toggletip.entry.js +1 -1
- package/dist/esm-es5/wm-uploader.entry.js +1 -1
- package/dist/esm-es5/wm-wrapper.entry.js +1 -1
- package/dist/loader/cdn.js +1 -2
- package/dist/loader/index.cjs.js +1 -2
- package/dist/loader/index.d.ts +3 -0
- package/dist/loader/index.es2017.js +1 -2
- package/dist/loader/index.js +1 -2
- package/dist/ripple/{p-5029fcd8.system.entry.js → p-00515e48.system.entry.js} +1 -1
- package/dist/ripple/{p-45abd8fe.entry.js → p-041e579b.entry.js} +1 -1
- package/dist/ripple/{p-65d26233.system.entry.js → p-043901ab.system.entry.js} +1 -1
- package/dist/ripple/p-0af94825.entry.js +1 -0
- package/dist/ripple/p-0ff41567.system.entry.js +1 -0
- package/dist/ripple/{p-48e09589.entry.js → p-13b1d775.entry.js} +1 -1
- package/dist/ripple/p-13fc2164.entry.js +1 -0
- package/dist/ripple/p-155224a2.system.entry.js +1 -0
- package/dist/ripple/{p-d837c1f5.js → p-1a9e55ae.js} +1 -1
- package/dist/ripple/p-1f09134c.entry.js +1 -0
- package/dist/ripple/p-298c2675.entry.js +1 -0
- package/dist/ripple/p-2d619f83.entry.js +1 -0
- package/dist/ripple/{p-cc4a429b.entry.js → p-2e3728f1.entry.js} +1 -1
- package/dist/ripple/p-31781d88.system.entry.js +1 -0
- package/dist/ripple/p-31d7ecf9.system.entry.js +1 -0
- package/dist/ripple/p-341ebafa.entry.js +1 -0
- package/dist/ripple/p-3423a9b6.system.entry.js +1 -0
- package/dist/ripple/p-376efca9.entry.js +1 -0
- package/dist/ripple/p-3b5f4364.system.entry.js +1 -0
- package/dist/ripple/p-418ed08c.system.entry.js +1 -0
- package/dist/ripple/p-4520ba7b.entry.js +1 -0
- package/dist/ripple/p-45f53a78.system.js +1 -0
- package/dist/ripple/p-4670ccb4.system.js +1 -0
- package/dist/ripple/p-488e1690.entry.js +1 -0
- package/dist/ripple/p-4baaf026.entry.js +1 -0
- package/dist/ripple/p-5051034b.entry.js +1 -0
- package/dist/ripple/p-56766bb2.entry.js +1 -0
- package/dist/ripple/p-576f8e7c.js +1 -0
- package/dist/ripple/p-5caaf651.system.entry.js +1 -0
- package/dist/ripple/p-5ece78e5.system.entry.js +1 -0
- package/dist/ripple/{p-42d1c301.entry.js → p-672ae2cb.entry.js} +1 -1
- package/dist/ripple/{p-3a44e1c8.entry.js → p-67a7f0b0.entry.js} +1 -1
- package/dist/ripple/p-6d0e5159.system.entry.js +1 -0
- package/dist/ripple/p-6d56676e.system.entry.js +1 -0
- package/dist/ripple/{p-b7ead395.system.entry.js → p-6fe35d1e.system.entry.js} +1 -1
- package/dist/ripple/{p-2ba7e68e.system.entry.js → p-7c51092b.system.entry.js} +1 -1
- package/dist/ripple/p-7d32497f.system.js +1 -0
- package/dist/ripple/p-7eab6bea.system.entry.js +1 -0
- package/dist/ripple/p-7fb95b89.entry.js +1 -0
- package/dist/ripple/{p-32bf3f5b.system.entry.js → p-823d7b4e.system.entry.js} +1 -1
- package/dist/ripple/p-85cbeb7d.system.entry.js +1 -0
- package/dist/ripple/p-88cfd58d.js +1 -0
- package/dist/ripple/p-8d075bcf.system.entry.js +1 -0
- package/dist/ripple/{p-8159cdf5.entry.js → p-8e72de50.entry.js} +1 -1
- package/dist/ripple/p-9c723924.system.entry.js +1 -0
- package/dist/ripple/{p-510679f8.system.entry.js → p-a1a2f8c9.system.entry.js} +1 -1
- package/dist/ripple/p-a62e7532.entry.js +1 -0
- package/dist/ripple/{p-1ac66a15.system.js → p-a9d89ac8.system.js} +1 -1
- package/dist/ripple/{p-a152cf3a.system.entry.js → p-aab56a37.system.entry.js} +1 -1
- package/dist/ripple/{p-79106e23.system.entry.js → p-ac40417b.system.entry.js} +1 -1
- package/dist/ripple/p-ad4529d2.entry.js +1 -0
- package/dist/ripple/{p-ffb31979.system.entry.js → p-b0c566b5.system.entry.js} +1 -1
- package/dist/ripple/p-b7307be6.system.entry.js +1 -0
- package/dist/ripple/{p-624a2812.entry.js → p-bee8ab6e.entry.js} +1 -1
- package/dist/ripple/p-c2181de0.entry.js +1 -0
- package/dist/ripple/{p-d4b209ec.system.js → p-c9141443.system.js} +1 -1
- package/dist/ripple/{p-e7a64841.system.entry.js → p-ca35a8b7.system.entry.js} +1 -1
- package/dist/ripple/{p-88ebddd7.entry.js → p-cd0cc88d.entry.js} +1 -1
- package/dist/ripple/p-cef8a45b.system.js +2 -0
- package/dist/ripple/p-d5ba9de1.system.entry.js +1 -0
- package/dist/ripple/{p-df1a11f1.system.entry.js → p-d93c51dd.system.entry.js} +1 -1
- package/dist/ripple/p-d9da0502.js +2 -0
- package/dist/ripple/p-db10990a.entry.js +1 -0
- package/dist/ripple/p-de0e138f.system.entry.js +1 -0
- package/dist/ripple/p-e2fe86a7.system.entry.js +1 -0
- package/dist/ripple/p-e85b1f40.entry.js +1 -0
- package/dist/ripple/p-ea0dfadf.system.entry.js +1 -0
- package/dist/ripple/p-eb14b354.entry.js +1 -0
- package/dist/ripple/p-f17fd62b.entry.js +1 -0
- package/dist/ripple/p-f20e8a69.entry.js +1 -0
- package/dist/ripple/{p-d79fdf0b.js → p-f54e9ed0.js} +1 -1
- package/dist/ripple/p-f836a5e8.entry.js +1 -0
- package/dist/ripple/p-fabe4ca4.entry.js +1 -0
- package/dist/ripple/p-fbaae34d.system.entry.js +1 -0
- package/dist/ripple/{p-a37cf34a.entry.js → p-ff69270a.entry.js} +1 -1
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/stencil-public-runtime.d.ts +3 -10
- package/package.json +1 -1
- package/dist/cjs/index-e86c28b6.js +0 -2641
- package/dist/collection/components/charts/chartFunctions.spec.js +0 -16
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.e2e.js +0 -81
- package/dist/collection/components/charts/screenshots.e2e.js +0 -96
- package/dist/collection/components/charts/wm-chart/wm-chart.e2e.js +0 -213
- package/dist/collection/components/charts/wm-chart/wm-chart.spec.js +0 -37
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.e2e.js +0 -176
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.spec.js +0 -163
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.e2e.js +0 -69
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.spec.js +0 -79
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.spec.js +0 -89
- package/dist/collection/components/datepickers/wm-date-range.e2e.js +0 -443
- package/dist/collection/components/datepickers/wm-date-range.spec.js +0 -22
- package/dist/collection/components/datepickers/wm-datepicker.e2e.js +0 -382
- package/dist/collection/components/datepickers/wm-datepicker.spec.js +0 -21
- package/dist/collection/components/wm-action-menu/wm-action-menu.e2e.js +0 -200
- package/dist/collection/components/wm-action-menu/wm-action-menu.spec.js +0 -48
- package/dist/collection/components/wm-button/wm-button.e2e.js +0 -55
- package/dist/collection/components/wm-button/wm-button.spec.js +0 -74
- package/dist/collection/components/wm-file/wm-file.spec.js +0 -194
- package/dist/collection/components/wm-file-list/wm-file-list.spec.js +0 -69
- package/dist/collection/components/wm-input/wm-input.e2e.js +0 -32
- package/dist/collection/components/wm-input/wm-input.spec.js +0 -173
- package/dist/collection/components/wm-menuitem/wm-menuitem.e2e.js +0 -23
- package/dist/collection/components/wm-menuitem/wm-menuitem.spec.js +0 -54
- package/dist/collection/components/wm-modal/wm-modal-footer.spec.js +0 -11
- package/dist/collection/components/wm-modal/wm-modal-header.spec.js +0 -8
- package/dist/collection/components/wm-modal/wm-modal.e2e.js +0 -104
- package/dist/collection/components/wm-modal/wm-modal.spec.js +0 -30
- package/dist/collection/components/wm-navigation/wm-navigation.e2e.js +0 -102
- package/dist/collection/components/wm-navigation/wm-navigation.spec.js +0 -91
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.e2e.js +0 -50
- package/dist/collection/components/wm-navigator/wm-navigator.e2e.js +0 -209
- package/dist/collection/components/wm-navigator/wm-navigator.spec.js +0 -177
- package/dist/collection/components/wm-option/wm-option.e2e.js +0 -22
- package/dist/collection/components/wm-option/wm-option.spec.js +0 -63
- package/dist/collection/components/wm-pagination/wm-pagination.e2e.js +0 -312
- package/dist/collection/components/wm-search/wm-search.e2e.js +0 -76
- package/dist/collection/components/wm-search/wm-search.spec.js +0 -71
- package/dist/collection/components/wm-select/wm-select.e2e.js +0 -521
- package/dist/collection/components/wm-select/wm-select.spec.js +0 -271
- package/dist/collection/components/wm-snackbar/wm-snackbar.e2e.js +0 -112
- package/dist/collection/components/wm-snackbar/wm-snackbar.spec.js +0 -9
- package/dist/collection/components/wm-tabs/wm-tabs.e2e.js +0 -91
- package/dist/collection/components/wm-tabs/wm-tabs.spec.js +0 -12
- package/dist/collection/components/wm-tag-input/wm-tag-input.e2e.js +0 -204
- package/dist/collection/components/wm-tag-input/wm-tag-input.spec.js +0 -195
- package/dist/collection/components/wm-textarea/wm-textarea.e2e.js +0 -41
- package/dist/collection/components/wm-textarea/wm-textarea.spec.js +0 -79
- package/dist/collection/components/wm-timepicker/wm-timepicker.e2e.js +0 -163
- package/dist/collection/components/wm-timepicker/wm-timepicker.spec.js +0 -147
- package/dist/collection/components/wm-toggletip/wm-toggletip.e2e.js +0 -69
- package/dist/collection/components/wm-toggletip/wm-toggletip.spec.js +0 -21
- package/dist/collection/components/wm-uploader/wm-uploader.e2e.js +0 -70
- package/dist/collection/components/wm-uploader/wm-uploader.spec.js +0 -234
- package/dist/collection/global/functions.spec.js +0 -126
- package/dist/collection/lang/lang.spec.js +0 -20
- package/dist/esm/index-558b5a82.js +0 -2610
- package/dist/esm-es5/functions-46843ea0.js +0 -1
- package/dist/esm-es5/global-309e423a.js +0 -1
- package/dist/esm-es5/index-558b5a82.js +0 -1
- package/dist/ripple/p-09a31f0c.entry.js +0 -1
- package/dist/ripple/p-0aa17cac.entry.js +0 -1
- package/dist/ripple/p-0dc51fad.entry.js +0 -1
- package/dist/ripple/p-0ea8609b.system.entry.js +0 -1
- package/dist/ripple/p-240124b0.system.entry.js +0 -1
- package/dist/ripple/p-26fbc7f5.system.entry.js +0 -1
- package/dist/ripple/p-294b38ca.system.entry.js +0 -1
- package/dist/ripple/p-2b05bf05.entry.js +0 -1
- package/dist/ripple/p-311923b2.system.entry.js +0 -1
- package/dist/ripple/p-3183bba8.entry.js +0 -1
- package/dist/ripple/p-31976813.entry.js +0 -1
- package/dist/ripple/p-33679b9d.entry.js +0 -1
- package/dist/ripple/p-34b5830f.system.js +0 -1
- package/dist/ripple/p-3568472c.entry.js +0 -1
- package/dist/ripple/p-359d45dc.entry.js +0 -1
- package/dist/ripple/p-4e56f3f5.system.entry.js +0 -1
- package/dist/ripple/p-568c595f.js +0 -2
- package/dist/ripple/p-591918a4.entry.js +0 -1
- package/dist/ripple/p-62a8f09c.entry.js +0 -1
- package/dist/ripple/p-734dd52a.system.js +0 -1
- package/dist/ripple/p-75ba63ba.entry.js +0 -1
- package/dist/ripple/p-7e6f5a1e.system.entry.js +0 -1
- package/dist/ripple/p-8029af07.system.entry.js +0 -1
- package/dist/ripple/p-822618d7.entry.js +0 -1
- package/dist/ripple/p-86d655fb.system.entry.js +0 -1
- package/dist/ripple/p-884294c6.entry.js +0 -1
- package/dist/ripple/p-8fbddb6c.system.entry.js +0 -1
- package/dist/ripple/p-902a54c5.entry.js +0 -1
- package/dist/ripple/p-905dd4da.system.entry.js +0 -1
- package/dist/ripple/p-a8524a48.entry.js +0 -1
- package/dist/ripple/p-ab8d78cc.system.js +0 -2
- package/dist/ripple/p-ae43e6e0.js +0 -1
- package/dist/ripple/p-bc5e9d24.entry.js +0 -1
- package/dist/ripple/p-bf636261.entry.js +0 -1
- package/dist/ripple/p-bf80a48c.system.js +0 -1
- package/dist/ripple/p-c4b9d46d.entry.js +0 -1
- package/dist/ripple/p-c885c7f9.entry.js +0 -1
- package/dist/ripple/p-c91b10f3.system.entry.js +0 -1
- package/dist/ripple/p-c9543950.system.entry.js +0 -1
- package/dist/ripple/p-cacfbaf1.system.entry.js +0 -1
- package/dist/ripple/p-ce9a8bd1.entry.js +0 -1
- package/dist/ripple/p-d24882a7.system.entry.js +0 -1
- package/dist/ripple/p-d33d6e96.system.entry.js +0 -1
- package/dist/ripple/p-df2560f3.system.entry.js +0 -1
- package/dist/ripple/p-e3bcdde8.system.entry.js +0 -1
- package/dist/ripple/p-e3de5bbd.system.entry.js +0 -1
- package/dist/ripple/p-e83a98d3.entry.js +0 -1
- package/dist/ripple/p-e995f7f0.js +0 -1
- package/dist/ripple/p-eaac6bcd.entry.js +0 -1
- package/dist/ripple/p-f67fd802.system.entry.js +0 -1
- package/dist/ripple/p-fe8d02c3.system.entry.js +0 -1
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { amountToDegree, amountToPercent, polarToCartesian, toFixed } from "./chartFunctions";
|
|
2
|
-
describe("Chart functions", () => {
|
|
3
|
-
it("truncates", () => {
|
|
4
|
-
expect(toFixed(3.34872348)).toEqual(3.34);
|
|
5
|
-
});
|
|
6
|
-
it("converts polar coords to cartesian", () => {
|
|
7
|
-
// args: half, radius, startAngle, endAngle?
|
|
8
|
-
expect(polarToCartesian(12, 5, 34, 45)).toStrictEqual({ x1: 61.74, x2: 54.42, y1: 45.55, y2: 54.42 });
|
|
9
|
-
expect(polarToCartesian(77, 25, 4)).toStrictEqual({ x: 1997.31, y: 211.28 });
|
|
10
|
-
});
|
|
11
|
-
it("calculates percentages and degrees", () => {
|
|
12
|
-
expect(amountToPercent(3, 9, true)).toBe(33); // last arg is whether output should be int vs float
|
|
13
|
-
expect(amountToPercent(3, 9, false)).toBe(33.33);
|
|
14
|
-
expect(amountToDegree(3, 9)).toBe(120);
|
|
15
|
-
});
|
|
16
|
-
});
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
-
import { AxePuppeteer } from "@axe-core/puppeteer";
|
|
3
|
-
describe("priv-chart-popover", () => {
|
|
4
|
-
let page,
|
|
5
|
-
// chart: any,
|
|
6
|
-
// paths: any,
|
|
7
|
-
host, liveRegion;
|
|
8
|
-
beforeEach(async () => {
|
|
9
|
-
page = await newE2EPage();
|
|
10
|
-
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main style="height: 3000px"><h1>Title</h1>
|
|
11
|
-
<wm-chart label="the label">
|
|
12
|
-
<wm-chart-slice amount="2" legend="Realized" popover-title="2/10" popover-text="Dreams Realized" popover-button-text="Click for bucket list"></wm-chart-slice>
|
|
13
|
-
<wm-chart-slice amount="8" legend="Not Realized" popover-title="8/10" popover-text="Dreams Not Realized" popover-button-text="Click for bucket list"></wm-chart-slice>
|
|
14
|
-
</wm-chart>
|
|
15
|
-
</main></body></html>`);
|
|
16
|
-
// chart = await page.find("wm-chart");
|
|
17
|
-
// paths = await page.findAll("wm-chart >>> path");
|
|
18
|
-
host = await page.find("wm-chart >>> priv-chart-popover");
|
|
19
|
-
liveRegion = await page.find("wm-chart >>> .live-region");
|
|
20
|
-
// firstRect = await page.evaluate(() => {
|
|
21
|
-
// document.querySelector("wm-chart")!.shadowRoot!.querySelectorAll("rect")
|
|
22
|
-
// })
|
|
23
|
-
await page.waitForChanges();
|
|
24
|
-
});
|
|
25
|
-
it("passes Axe checks", async () => {
|
|
26
|
-
const results = await new AxePuppeteer(page).analyze();
|
|
27
|
-
expect(results.violations.length).toBe(0);
|
|
28
|
-
});
|
|
29
|
-
it("renders", async () => {
|
|
30
|
-
expect(host).not.toBeNull();
|
|
31
|
-
});
|
|
32
|
-
it("is has a live region", async () => {
|
|
33
|
-
expect(liveRegion).toEqualAttribute("aria-live", "polite");
|
|
34
|
-
});
|
|
35
|
-
// keyboard actions are handled from wm-chart. popover never actually receives focus
|
|
36
|
-
it("shows and hide the popover", async () => {
|
|
37
|
-
// initially div.popover is not there (content is not rendered when it is closed)
|
|
38
|
-
let popover = await page.find("wm-chart >>> .popover");
|
|
39
|
-
expect(popover).toBeNull();
|
|
40
|
-
// it opens / renders content when path is focused
|
|
41
|
-
await page.keyboard.press("Tab");
|
|
42
|
-
await page.waitForChanges();
|
|
43
|
-
await page.keyboard.press("ArrowDown");
|
|
44
|
-
await page.waitForChanges();
|
|
45
|
-
popover = await page.find("wm-chart >>> .popover");
|
|
46
|
-
expect(popover).not.toBeNull();
|
|
47
|
-
// closes on click away
|
|
48
|
-
await page.click("h1"); // click out of the component or slice
|
|
49
|
-
await page.waitForChanges();
|
|
50
|
-
popover = await page.find("wm-chart >>> .popover");
|
|
51
|
-
expect(popover).toBeNull();
|
|
52
|
-
});
|
|
53
|
-
it("hides the popover on scroll", async () => {
|
|
54
|
-
// initially div.popover is not there (content is not rendered when it is closed)
|
|
55
|
-
let popover = await page.find("wm-chart >>> .popover");
|
|
56
|
-
expect(popover).toBeNull();
|
|
57
|
-
// it opens / renders content when path is focused
|
|
58
|
-
await page.keyboard.press("Tab");
|
|
59
|
-
await page.waitForChanges();
|
|
60
|
-
await page.keyboard.press("ArrowDown");
|
|
61
|
-
await page.waitForChanges();
|
|
62
|
-
popover = await page.find("wm-chart >>> .popover");
|
|
63
|
-
expect(popover).not.toBeNull();
|
|
64
|
-
// closes on scroll
|
|
65
|
-
page.evaluate(() => {
|
|
66
|
-
window.scrollBy(0, 2000);
|
|
67
|
-
});
|
|
68
|
-
await page.waitForTimeout(300); // waitForChanges alone doesn't always work
|
|
69
|
-
await page.waitForChanges(); // but somehow both are needed
|
|
70
|
-
popover = await page.find("wm-chart >>> .popover");
|
|
71
|
-
expect(popover).toBeNull();
|
|
72
|
-
});
|
|
73
|
-
// button fires event wmPopoverButtonClicked when clicked, but I can't figure out how to test if the event has fired
|
|
74
|
-
});
|
|
75
|
-
// Not tested:
|
|
76
|
-
// Screen readers should re-announce the content when the button is clicked a second time (or more). Otherwise the parent element looks interactive but is inert.
|
|
77
|
-
// Sources:
|
|
78
|
-
// https://inclusive-components.design/tooltips-toggletips/
|
|
79
|
-
// https://www.w3.org/WAI/PF/aria/roles#status
|
|
80
|
-
// https://watermarkinsights.atlassian.net/wiki/spaces/WDS/pages/51938711/Popovers
|
|
81
|
-
// https://watermarkinsights.atlassian.net/secure/RapidBoard.jspa?rapidView=26&projectKey=DS&modal=detail&selectedIssue=DS-12
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
-
// split into different tests because screenshot functionality currently has a non-customizable, 600x600px viewport
|
|
3
|
-
// see https://stenciljs.com/docs/screenshot-visual-diff
|
|
4
|
-
describe("wm-chart", () => {
|
|
5
|
-
it("doughnut1 doesn't change", async () => {
|
|
6
|
-
const page = await newE2EPage();
|
|
7
|
-
await page.setContent(`<wm-chart id="doughnut1" chart-type="doughnut1" label="Type: doughnut1">
|
|
8
|
-
<wm-chart-slice amount="9" legend="Direct" popover-title="9/10" popover-text="Direct Measures"></wm-chart-slice>
|
|
9
|
-
<wm-chart-slice amount="1" legend="Indirect" popover-title="1/10" popover-text="Indirect Measures"></wm-chart-slice>
|
|
10
|
-
<wm-chart-slice amount="0" legend="Unspecified" popover-title="0/10" popover-text="Unspecified Measures"></wm-chart-slice>
|
|
11
|
-
</wm-chart>`);
|
|
12
|
-
const results = await page.compareScreenshot();
|
|
13
|
-
expect(results).toMatchScreenshot({ allowableMismatchedPixels: 10 });
|
|
14
|
-
});
|
|
15
|
-
it("doughnut2 & doughnut2b don't change", async () => {
|
|
16
|
-
const page = await newE2EPage();
|
|
17
|
-
await page.setContent(`<wm-chart id="doughnut2" chart-type="doughnut2" label="Type: doughnut2">
|
|
18
|
-
<wm-chart-slice amount="4" legend="Met" popover-title="4/15" popover-text="Objectives Met" popover-button-text="Direct Details"></wm-chart-slice>
|
|
19
|
-
<wm-chart-slice amount="5" legend="Not Met" popover-title="5/15" popover-text="Objectives Not Met" popover-button-text="Indirect Details"></wm-chart-slice>
|
|
20
|
-
<wm-chart-slice amount="6" legend="Not started" popover-title="6/15" popover-text="Objectives Not Started"></wm-chart-slice>
|
|
21
|
-
</wm-chart>
|
|
22
|
-
|
|
23
|
-
<wm-chart id="doughnut2b" chart-type="doughnut2" label="Type: doughnut2">
|
|
24
|
-
<wm-chart-slice amount="10" legend="Low Risk" popover-title="10/200" popover-text="Students at Low Risk"></wm-chart-slice>
|
|
25
|
-
<wm-chart-slice amount="115" legend="Medium Risk" popover-title="115/200" popover-text="Students at Medium Risk"></wm-chart-slice>
|
|
26
|
-
<wm-chart-slice amount="35" legend="High Risk" popover-title="35/200" popover-text="Students at High Risk"></wm-chart-slice>
|
|
27
|
-
<wm-chart-slice amount="40" legend="Not Indicated" popover-title="40/200" popover-text="Students Not Indicated"></wm-chart-slice>
|
|
28
|
-
</wm-chart>`);
|
|
29
|
-
const results = await page.compareScreenshot();
|
|
30
|
-
expect(results).toMatchScreenshot({ allowableMismatchedPixels: 10 });
|
|
31
|
-
});
|
|
32
|
-
it("doughnut3 doesn't change", async () => {
|
|
33
|
-
const page = await newE2EPage();
|
|
34
|
-
await page.setContent(`<wm-chart id="doughnut3" chart-type="doughnut3" label="Type: doughnut3">
|
|
35
|
-
<wm-chart-slice amount="1" legend="Non risus" popover-title="1/15" popover-text="Lorem"></wm-chart-slice>
|
|
36
|
-
<wm-chart-slice amount="2" legend="Non mi mattis" popover-title="2/15" popover-text="Ispum"></wm-chart-slice>
|
|
37
|
-
<wm-chart-slice amount="3" legend="Pulvinar" popover-title="3/15" popover-text="Dolor sit amet"></wm-chart-slice>
|
|
38
|
-
<wm-chart-slice amount="4" legend="Cras ut" popover-title="4/15" popover-text="Consectetur"></wm-chart-slice>
|
|
39
|
-
<wm-chart-slice amount="1" legend="Dui congue" popover-title="1/15" popover-text="Adipiscing elit"></wm-chart-slice>
|
|
40
|
-
<wm-chart-slice amount="2" legend="Ante faucibus" popover-title="2/15" popover-text="Duis vitae dapidus erat"></wm-chart-slice>
|
|
41
|
-
<wm-chart-slice amount="3" legend="Finibus" popover-title="3/15" popover-text="Cras"></wm-chart-slice>
|
|
42
|
-
</wm-chart>`);
|
|
43
|
-
const results = await page.compareScreenshot();
|
|
44
|
-
expect(results).toMatchScreenshot({ allowableMismatchedPixels: 10 });
|
|
45
|
-
});
|
|
46
|
-
it("bar2-5 don't change", async () => {
|
|
47
|
-
const page = await newE2EPage();
|
|
48
|
-
await page.setContent(`
|
|
49
|
-
<wm-chart chart-type="bar2" label="An Example of a bar2 Chart" value-format="percentage">
|
|
50
|
-
<wm-chart-slice amount="4" legend="Not Started" popover-title="4/10" popover-text="Outcomes Not Started"></wm-chart-slice>
|
|
51
|
-
<wm-chart-slice amount="3" legend="In Progress" popover-title="3/10" popover-text="Outcomes In Progress"></wm-chart-slice>
|
|
52
|
-
<wm-chart-slice amount="1" legend="Met" popover-title="1/10" popover-text="Outcomes Met"></wm-chart-slice>
|
|
53
|
-
<wm-chart-slice amount="2" legend="Not Met" popover-title="2/10" popover-text="Outcomes Not Met"></wm-chart-slice>
|
|
54
|
-
</wm-chart>
|
|
55
|
-
|
|
56
|
-
<wm-chart chart-type="bar3" label="An Example of a bar3 Chart" value-format="percentage">
|
|
57
|
-
<wm-chart-slice amount="1" legend="Exceeded" popover-title="1/10" popover-text="Outcomes Exceeded" popover-button-text="Exceeded Details"></wm-chart-slice>
|
|
58
|
-
<wm-chart-slice amount="2" legend="Met" popover-title="2/10" popover-text="Outcomes Met" popover-button-text="Met Details"></wm-chart-slice>
|
|
59
|
-
<wm-chart-slice amount="3" legend="Approached" popover-title="3/10" popover-text="Outcomes Approached"></wm-chart-slice>
|
|
60
|
-
<wm-chart-slice amount="4" legend="Not Met" popover-title="4/10" popover-text="Outcomes Not Met"></wm-chart-slice>
|
|
61
|
-
</wm-chart>
|
|
62
|
-
|
|
63
|
-
<wm-chart chart-type="bar4" label="An Example of a bar4 Chart" value-format="none">
|
|
64
|
-
<wm-chart-slice amount="1" legend="Not started" popover-title="1/10" popover-text="Outcomes Not Started"></wm-chart-slice>
|
|
65
|
-
<wm-chart-slice amount="3" legend="In Progress" popover-title="3/10" popover-text="Outcomes In Progress"></wm-chart-slice>
|
|
66
|
-
<wm-chart-slice amount="6" legend="Completed" popover-title="6/10" popover-text="Completed Outcomes"></wm-chart-slice>
|
|
67
|
-
</wm-chart>
|
|
68
|
-
|
|
69
|
-
<wm-chart chart-type="bar5" label="An Example of a bar5 Chart" value-format="amount">
|
|
70
|
-
<wm-chart-slice amount="1" legend="Non risus" popover-title="1/15" popover-text="Lorem"></wm-chart-slice>
|
|
71
|
-
<wm-chart-slice amount="2" legend="Non mi mattis" popover-title="2/15" popover-text="Ispum"></wm-chart-slice>
|
|
72
|
-
<wm-chart-slice amount="3" legend="Pulvinar" popover-title="3/15" popover-text="Dolor sit amet"></wm-chart-slice>
|
|
73
|
-
<wm-chart-slice amount="4" legend="Cras ut" popover-title="4/15" popover-text="Consectetur"></wm-chart-slice>
|
|
74
|
-
<wm-chart-slice amount="1" legend="Dui congue" popover-title="1/15" popover-text="Adipiscing elit"></wm-chart-slice>
|
|
75
|
-
<wm-chart-slice amount="2" legend="Ante faucibus" popover-title="2/15" popover-text="Duis vitae dapidus erat"></wm-chart-slice>
|
|
76
|
-
<wm-chart-slice amount="3" legend="Finibus" popover-title="3/15" popover-text="Cras"></wm-chart-slice>
|
|
77
|
-
</wm-chart>`);
|
|
78
|
-
const results = await page.compareScreenshot();
|
|
79
|
-
expect(results).toMatchScreenshot({ allowableMismatchedPixels: 10 });
|
|
80
|
-
});
|
|
81
|
-
it("progress monitor doesn't change", async () => {
|
|
82
|
-
const page = await newE2EPage();
|
|
83
|
-
await page.setContent(`<wm-progress-monitor id="organization-progress" group-legend="Complete,Incomplete">
|
|
84
|
-
<wm-progress-indicator label="Learning Outcomes">
|
|
85
|
-
<wm-progress-slice amount="12" popover-title="12/20" popover-text="Organizations with outcomes" legend="Created"></wm-progress-slice>
|
|
86
|
-
<wm-progress-slice amount="8" popover-title="8/20" popover-text="Organizations without outcomes" legend="Not created"></wm-progress-slice>
|
|
87
|
-
</wm-progress-indicator>
|
|
88
|
-
<wm-progress-indicator label="Mapped to ILOs" completion-message="All mapped!">
|
|
89
|
-
<wm-progress-slice amount="20" popover-title="20/20" popover-text="Programs with a curriculum map" legend="Mapped"></wm-progress-slice>
|
|
90
|
-
<wm-progress-slice amount="0" popover-title="0/20" popover-text="Programs without a curriculum map" legend="Not mapped"></wm-progress-slice>
|
|
91
|
-
</wm-progress-indicator>
|
|
92
|
-
</wm-progress-monitor>`);
|
|
93
|
-
const results = await page.compareScreenshot();
|
|
94
|
-
expect(results).toMatchScreenshot({ allowableMismatchedPixels: 10 });
|
|
95
|
-
});
|
|
96
|
-
});
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
-
import { AxePuppeteer } from "@axe-core/puppeteer";
|
|
3
|
-
describe("wm-chart", () => {
|
|
4
|
-
let page,
|
|
5
|
-
// @ts-ignore for some reason ts says it's unused
|
|
6
|
-
component,
|
|
7
|
-
// slices: NodeList,
|
|
8
|
-
paths, svg;
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
page = await newE2EPage();
|
|
11
|
-
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
12
|
-
<wm-chart label="the label"><wm-chart-slice amount="70" legend="Created"></wm-chart-slice><wm-chart-slice amount="2" legend="Not Created"></wm-chart-slice></wm-chart>
|
|
13
|
-
</main></body></html>`);
|
|
14
|
-
component = await page.find("wm-chart");
|
|
15
|
-
svg = await page.find("wm-chart >>> svg");
|
|
16
|
-
// slices = await page.findAll("wm-chart-slice");
|
|
17
|
-
paths = await page.findAll("wm-chart >>> path");
|
|
18
|
-
});
|
|
19
|
-
it("passes Axe tests", async () => {
|
|
20
|
-
const results = await new AxePuppeteer(page).analyze();
|
|
21
|
-
expect(results.violations.length).toBe(0);
|
|
22
|
-
});
|
|
23
|
-
it("renders", async () => {
|
|
24
|
-
expect(svg).toBeTruthy();
|
|
25
|
-
});
|
|
26
|
-
it("renders the right amount of slices and text", async () => {
|
|
27
|
-
let tmpPage = await newE2EPage();
|
|
28
|
-
await tmpPage.setContent(`<wm-chart label="the label">
|
|
29
|
-
<wm-chart-slice amount="100" legend="Created"></wm-chart-slice>
|
|
30
|
-
<wm-chart-slice amount="123" legend="Created"></wm-chart-slice>
|
|
31
|
-
<wm-chart-slice amount="0" legend="Maybe Created"></wm-chart-slice>
|
|
32
|
-
</wm-chart>`);
|
|
33
|
-
let tmpSlices = await tmpPage.findAll("wm-chart-slice");
|
|
34
|
-
let tmpPaths = await tmpPage.findAll("wm-chart >>> path");
|
|
35
|
-
let tmpTexts = await tmpPage.findAll("wm-chart >>> text.value");
|
|
36
|
-
expect(tmpSlices.length).toEqual(3);
|
|
37
|
-
// slices rendered even if amount === 0 for accessibility reasons
|
|
38
|
-
expect(tmpPaths.length).toEqual(tmpSlices.length);
|
|
39
|
-
expect(tmpTexts.length).toEqual(tmpSlices.length - 1);
|
|
40
|
-
});
|
|
41
|
-
it("hides clustered small numbers", async () => {
|
|
42
|
-
// rule: num < 4 && either neighbor < 5
|
|
43
|
-
let page = await newE2EPage();
|
|
44
|
-
await page.setContent(`<wm-chart id="one" label="the label" chart-type="doughnut3">
|
|
45
|
-
<wm-chart-slice amount="75" legend="A"></wm-chart-slice> // 89%
|
|
46
|
-
<wm-chart-slice amount="5" legend="B"></wm-chart-slice> // 6%
|
|
47
|
-
<wm-chart-slice amount="4" legend="C"></wm-chart-slice> // 5%
|
|
48
|
-
</wm-chart>
|
|
49
|
-
<wm-chart id="two" label="the label" chart-type="doughnut3">
|
|
50
|
-
<wm-chart-slice amount="65" legend="A"></wm-chart-slice> // 69%
|
|
51
|
-
<wm-chart-slice amount="14" legend="B"></wm-chart-slice> // 15%
|
|
52
|
-
<wm-chart-slice amount="4" legend="C"></wm-chart-slice> // 4%
|
|
53
|
-
<wm-chart-slice amount="4" legend="D"></wm-chart-slice> // 4%
|
|
54
|
-
<wm-chart-slice amount="4" legend="E"></wm-chart-slice> // 4%
|
|
55
|
-
<wm-chart-slice amount="3" legend="F"></wm-chart-slice> // 3%
|
|
56
|
-
</wm-chart>
|
|
57
|
-
<wm-chart id="three" label="the label" chart-type="doughnut3">
|
|
58
|
-
<wm-chart-slice amount="83" legend="A"></wm-chart-slice> // 83%
|
|
59
|
-
<wm-chart-slice amount="7" legend="B"></wm-chart-slice> // 7%
|
|
60
|
-
<wm-chart-slice amount="6" legend="C"></wm-chart-slice> // 6%
|
|
61
|
-
<wm-chart-slice amount="3" legend="D"></wm-chart-slice> // 3%
|
|
62
|
-
<wm-chart-slice amount="1" legend="E"></wm-chart-slice> // 1%
|
|
63
|
-
<wm-chart-slice amount="0" legend="F"></wm-chart-slice> // 0%
|
|
64
|
-
</wm-chart>`);
|
|
65
|
-
let [one, two, three] = await page.findAll("wm-chart");
|
|
66
|
-
let oneSlices = await one.findAll("wm-chart-slice");
|
|
67
|
-
let onePaths = await page.findAll("#one >>> path");
|
|
68
|
-
let oneTexts = await page.findAll("#one >>> text.value");
|
|
69
|
-
expect(onePaths.length).toEqual(oneSlices.length);
|
|
70
|
-
// All vals should show incl. small ones
|
|
71
|
-
// (they are not neighbors to other small vals)
|
|
72
|
-
expect(oneTexts.length).toEqual(oneSlices.length);
|
|
73
|
-
let twoSlices = await two.findAll("wm-chart-slice");
|
|
74
|
-
let twoPaths = await page.findAll("#two >>> path");
|
|
75
|
-
let twoTexts = await page.findAll("#two >>> text.value");
|
|
76
|
-
expect(twoPaths.length).toEqual(twoSlices.length);
|
|
77
|
-
// 1 small val should be hidden (3%)
|
|
78
|
-
// because it is < 4 and has a neighbor < 5
|
|
79
|
-
expect(twoTexts.length).toEqual(twoSlices.length - 1);
|
|
80
|
-
let threeSlices = await three.findAll("wm-chart-slice");
|
|
81
|
-
let threePaths = await page.findAll("#three >>> path");
|
|
82
|
-
let threeTexts = await page.findAll("#three >>> text.value");
|
|
83
|
-
// 3 small values should be hidden
|
|
84
|
-
expect(threePaths.length).toEqual(threeSlices.length);
|
|
85
|
-
expect(threeTexts.length).toEqual(threeSlices.length - 3);
|
|
86
|
-
});
|
|
87
|
-
it("handles percentages less than 1", async () => {
|
|
88
|
-
let page = await newE2EPage();
|
|
89
|
-
await page.setContent(`<wm-chart id="one" label="the label" chart-type="doughnut3">
|
|
90
|
-
// total 284
|
|
91
|
-
<wm-chart-slice amount="209" legend="A"></wm-chart-slice> // 74%
|
|
92
|
-
<wm-chart-slice amount="40" legend="B"></wm-chart-slice> // 14%
|
|
93
|
-
<wm-chart-slice amount="20" legend="C"></wm-chart-slice> // 7%
|
|
94
|
-
<wm-chart-slice amount="14" legend="D"></wm-chart-slice> // 5%
|
|
95
|
-
<wm-chart-slice amount="1" legend="E"></wm-chart-slice> // <1%
|
|
96
|
-
</wm-chart>
|
|
97
|
-
<wm-chart id="two" label="the label" chart-type="doughnut3">
|
|
98
|
-
// total 284
|
|
99
|
-
<wm-chart-slice amount="209" legend="A"></wm-chart-slice> // 73%
|
|
100
|
-
<wm-chart-slice amount="40" legend="B"></wm-chart-slice> // 14%
|
|
101
|
-
<wm-chart-slice amount="34" legend="C"></wm-chart-slice> // 12%
|
|
102
|
-
<wm-chart-slice amount="1" legend="D"></wm-chart-slice> // <1%
|
|
103
|
-
</wm-chart>`);
|
|
104
|
-
let [one, two] = await page.findAll("wm-chart");
|
|
105
|
-
let oneSlices = await one.findAll("wm-chart-slice");
|
|
106
|
-
let onePaths = await page.findAll("#one >>> path");
|
|
107
|
-
let oneTexts = await page.findAll("#one >>> text.value");
|
|
108
|
-
expect(oneSlices.length).toEqual(5);
|
|
109
|
-
// All paths are rendered
|
|
110
|
-
expect(onePaths.length).toEqual(oneSlices.length);
|
|
111
|
-
// E should be hidden because it borders a percentage < 8
|
|
112
|
-
expect(oneTexts.length).toEqual(oneSlices.length - 1);
|
|
113
|
-
let twoSlices = await two.findAll("wm-chart-slice");
|
|
114
|
-
let twoPaths = await page.findAll("#two >>> path");
|
|
115
|
-
let twoTexts = await page.findAll("#two >>> text.value");
|
|
116
|
-
expect(twoSlices.length).toEqual(4);
|
|
117
|
-
// All paths are rendered
|
|
118
|
-
expect(twoPaths.length).toEqual(twoSlices.length);
|
|
119
|
-
// Even D should be visible because it borders a percentage > 8
|
|
120
|
-
expect(twoTexts.length).toEqual(twoSlices.length);
|
|
121
|
-
});
|
|
122
|
-
it("sets the subinfo value", async () => {
|
|
123
|
-
const comp = await page.find("wm-chart");
|
|
124
|
-
comp.setProperty("subinfo", "subinfo text");
|
|
125
|
-
await page.waitForChanges();
|
|
126
|
-
const subinfo = await page.find("wm-chart >>> .subinfo");
|
|
127
|
-
expect(subinfo.textContent).toEqual("subinfo text");
|
|
128
|
-
});
|
|
129
|
-
it("changes the display values", async () => {
|
|
130
|
-
// type bar2 and bar3
|
|
131
|
-
const tmpPage = await newE2EPage();
|
|
132
|
-
await tmpPage.setContent(`<wm-chart id="bar2chart" chart-type="bar2" label="the label" value-format="percentage"><wm-chart-slice amount="10" legend="Created"></wm-chart-slice><wm-chart-slice amount="10" legend="Not Created"></wm-chart-slice></wm-chart>
|
|
133
|
-
<wm-chart id="bar3chart" chart-type="bar3" label="the label" value-format="amount"><wm-chart-slice amount="70" legend="Created"></wm-chart-slice><wm-chart-slice amount="10" legend="Not Created"></wm-chart-slice></wm-chart>`);
|
|
134
|
-
await tmpPage.waitForChanges();
|
|
135
|
-
const bar2val = await tmpPage.findAll("#bar2chart >>> .value");
|
|
136
|
-
expect(bar2val[0].textContent).toEqual("50%");
|
|
137
|
-
const bar3val = await tmpPage.findAll("#bar3chart >>> .value");
|
|
138
|
-
expect(bar3val[0].textContent).toEqual("70");
|
|
139
|
-
});
|
|
140
|
-
it("handles Arrows and Tab keys", async () => {
|
|
141
|
-
const componentWrapper = await page.find("wm-chart >>> .component-wrapper");
|
|
142
|
-
await page.keyboard.press("Tab");
|
|
143
|
-
await page.waitForChanges();
|
|
144
|
-
await page.keyboard.press("ArrowDown");
|
|
145
|
-
await page.waitForChanges();
|
|
146
|
-
paths = await page.findAll("wm-chart >>> path");
|
|
147
|
-
expect(componentWrapper).toEqualAttribute("tabindex", "-1");
|
|
148
|
-
expect(paths[0]).toEqualAttribute("tabindex", "0");
|
|
149
|
-
expect(paths[1]).toEqualAttribute("tabindex", "-1");
|
|
150
|
-
await page.keyboard.press("ArrowRight");
|
|
151
|
-
await page.waitForChanges();
|
|
152
|
-
paths = await page.findAll("wm-chart >>> path");
|
|
153
|
-
expect(componentWrapper).toEqualAttribute("tabindex", "-1");
|
|
154
|
-
expect(paths[0]).toEqualAttribute("tabindex", "-1");
|
|
155
|
-
expect(paths[1]).toEqualAttribute("tabindex", "0");
|
|
156
|
-
await page.keyboard.press("ArrowLeft");
|
|
157
|
-
await page.waitForChanges();
|
|
158
|
-
paths = await page.findAll("wm-chart >>> path");
|
|
159
|
-
expect(componentWrapper).toEqualAttribute("tabindex", "-1");
|
|
160
|
-
expect(paths[0]).toEqualAttribute("tabindex", "0");
|
|
161
|
-
expect(paths[1]).toEqualAttribute("tabindex", "-1");
|
|
162
|
-
await page.keyboard.press("ArrowUp");
|
|
163
|
-
await page.waitForChanges();
|
|
164
|
-
paths = await page.findAll("wm-chart >>> path");
|
|
165
|
-
expect(componentWrapper).toEqualAttribute("tabindex", "-1");
|
|
166
|
-
expect(paths[0]).toEqualAttribute("tabindex", "-1");
|
|
167
|
-
expect(paths[1]).toEqualAttribute("tabindex", "0");
|
|
168
|
-
await page.keyboard.press("Tab");
|
|
169
|
-
await page.waitForChanges();
|
|
170
|
-
expect(componentWrapper).toEqualAttribute("tabindex", "0");
|
|
171
|
-
expect(paths[0]).toEqualAttribute("tabindex", "-1");
|
|
172
|
-
expect(paths[1]).toEqualAttribute("tabindex", "-1");
|
|
173
|
-
});
|
|
174
|
-
it("opens popover when slice clicked", async () => {
|
|
175
|
-
const tmpPage = await newE2EPage();
|
|
176
|
-
await tmpPage.setContent(`<wm-chart id="one" label="the label" chart-type="doughnut3">
|
|
177
|
-
<wm-chart-slice amount="95" popover-title="A" popover-text="Text A" popover-button-text="A Button" legend="A"></wm-chart-slice>
|
|
178
|
-
<wm-chart-slice amount="5" popover-title="B" popover-text="Text B" popover-button-text="B Button" legend="B"></wm-chart-slice>
|
|
179
|
-
</wm-chart>`);
|
|
180
|
-
await tmpPage.waitForChanges;
|
|
181
|
-
let hasPopover = await tmpPage.find("wm-chart >>> .popover");
|
|
182
|
-
const path = await tmpPage.find("wm-chart >>> path");
|
|
183
|
-
expect(hasPopover).toBeFalsy;
|
|
184
|
-
await path.click();
|
|
185
|
-
await tmpPage.waitForChanges();
|
|
186
|
-
hasPopover = await tmpPage.find("wm-chart >>> .popover");
|
|
187
|
-
expect(hasPopover).toBeTruthy;
|
|
188
|
-
});
|
|
189
|
-
it("activating popover button fires event", async () => {
|
|
190
|
-
const tmpPage = await newE2EPage();
|
|
191
|
-
await tmpPage.setContent(`<wm-chart id="one" label="the label" chart-type="doughnut3">
|
|
192
|
-
<wm-chart-slice amount="5" popover-title="A" popover-text="Text A" popover-button-text="A Button" legend="A"></wm-chart-slice>
|
|
193
|
-
<wm-chart-slice amount="95" popover-title="B" popover-text="Text B" popover-button-text="B Button" legend="B"></wm-chart-slice>
|
|
194
|
-
</wm-chart>
|
|
195
|
-
<div id="indicator"></div>`);
|
|
196
|
-
await tmpPage.waitForChanges;
|
|
197
|
-
await tmpPage.evaluate(async () => {
|
|
198
|
-
const component = await document.querySelector("wm-chart");
|
|
199
|
-
const indicator = await document.querySelector("#indicator");
|
|
200
|
-
await component.addEventListener("wmChartPopoverButtonTriggered", () => (indicator.textContent = "event heard"));
|
|
201
|
-
});
|
|
202
|
-
await tmpPage.waitForChanges;
|
|
203
|
-
const indicator = await tmpPage.find("#indicator");
|
|
204
|
-
expect(indicator.textContent).toBe("");
|
|
205
|
-
await tmpPage.keyboard.press("Tab");
|
|
206
|
-
await tmpPage.waitForChanges();
|
|
207
|
-
await tmpPage.keyboard.press("ArrowDown");
|
|
208
|
-
await tmpPage.waitForChanges();
|
|
209
|
-
await tmpPage.keyboard.press("Enter");
|
|
210
|
-
await tmpPage.waitForChanges();
|
|
211
|
-
expect(indicator.textContent).toBe("event heard");
|
|
212
|
-
});
|
|
213
|
-
});
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
-
import * as globalFuncs from "../../../global/functions";
|
|
3
|
-
jest.spyOn(globalFuncs, "generateId");
|
|
4
|
-
// @ts-ignore
|
|
5
|
-
globalFuncs.generateId.mockImplementation(() => "random-id");
|
|
6
|
-
import { Chart } from "./wm-chart";
|
|
7
|
-
// mock ResizeObserver
|
|
8
|
-
global.ResizeObserver = jest.fn().mockImplementation(() => ({
|
|
9
|
-
observe: jest.fn(),
|
|
10
|
-
unobserve: jest.fn(),
|
|
11
|
-
disconnect: jest.fn(),
|
|
12
|
-
}));
|
|
13
|
-
describe("wm-chart", () => {
|
|
14
|
-
it("builds", async () => {
|
|
15
|
-
const page = await newSpecPage({ components: [Chart], html: '<wm-chart label="charty"></wm-chart>' });
|
|
16
|
-
expect(page.root).toMatchSnapshot();
|
|
17
|
-
});
|
|
18
|
-
it("properties and attributes", async () => {
|
|
19
|
-
const page = await newSpecPage({ components: [Chart], html: '<wm-chart label="charty"></wm-chart>' });
|
|
20
|
-
const componentWrapper = page.root.shadowRoot.querySelector(".component-wrapper");
|
|
21
|
-
expect(componentWrapper).toEqualAttribute("role", "application");
|
|
22
|
-
expect(componentWrapper).toEqualAttribute("aria-label", "charty");
|
|
23
|
-
expect(componentWrapper).toEqualAttribute("aria-roledescription", "Interactive chart");
|
|
24
|
-
expect(componentWrapper).toEqualAttribute("aria-describedby", "chart-instructions");
|
|
25
|
-
});
|
|
26
|
-
// needs refactoring before it can be tested
|
|
27
|
-
// it("generates the svg path", () => {
|
|
28
|
-
// const chart = new Chart();
|
|
29
|
-
// expect(chart.getPathData(122, 23)).toEqual("thing");
|
|
30
|
-
// })
|
|
31
|
-
// needs refactoring before it can be tested
|
|
32
|
-
// it("outputs the svg arc syntax", () => {
|
|
33
|
-
// const chart = new Chart();
|
|
34
|
-
// // the 2nd arc is set according to whether we're drawing the inner or outer arc, and whether it's concave or convex
|
|
35
|
-
// expect(chart.getArc(23, "0 1", 34, 66)).toEqual("nene");
|
|
36
|
-
// })
|
|
37
|
-
});
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
-
import { AxePuppeteer } from "@axe-core/puppeteer";
|
|
3
|
-
describe("wm-line-chart", () => {
|
|
4
|
-
let page;
|
|
5
|
-
async function createPageHelper() {
|
|
6
|
-
page = await newE2EPage();
|
|
7
|
-
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
8
|
-
<wm-line-chart
|
|
9
|
-
label="Regional Job Trends"
|
|
10
|
-
description="View job trends for your region compared to national tends from the past 3 years with a 3 year projection"
|
|
11
|
-
x-axis-label="Year"
|
|
12
|
-
y-axis-label="Change Since 2020"
|
|
13
|
-
line-data='{"Regional": {"2020": 5, "2021": 10, "2022": 13, "2023": null, "2024": 20, "2025": 23, "2026": 25, "2027": 32, "2028": 35, "2029": 40, "2030": 42, "2031": 52, "2032": 54, "2033": 61}, "National": {"2020": 8, "2021": 13, "2022": 16, "2023": 21, "2024": 23, "2025": 26, "2026": 28, "2027": 29, "2028": 32, "2029": 35, "2030": 39, "2031": 49, "2032": 51, "2033": 58} }'
|
|
14
|
-
units="year,%"
|
|
15
|
-
show-deltas="true"
|
|
16
|
-
y-range="0,25,50,75,100"
|
|
17
|
-
highlight-start="2026"
|
|
18
|
-
visibility-toggles="true"
|
|
19
|
-
>
|
|
20
|
-
</wm-line-chart>
|
|
21
|
-
</main></body></html>`);
|
|
22
|
-
}
|
|
23
|
-
it("passes Axe tests", async () => {
|
|
24
|
-
await createPageHelper();
|
|
25
|
-
const results = await new AxePuppeteer(page).analyze();
|
|
26
|
-
expect(results.violations.length).toBe(0);
|
|
27
|
-
});
|
|
28
|
-
it("has keyboard navigation for legend", async () => {
|
|
29
|
-
await createPageHelper();
|
|
30
|
-
// first focus goes to first button
|
|
31
|
-
await page.keyboard.press("Tab");
|
|
32
|
-
await page.waitForChanges();
|
|
33
|
-
let activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
34
|
-
await page.waitForChanges();
|
|
35
|
-
expect(activeElId).toBe("visibility-button-0");
|
|
36
|
-
// wraps right
|
|
37
|
-
await page.keyboard.press("ArrowLeft");
|
|
38
|
-
await page.waitForChanges();
|
|
39
|
-
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
40
|
-
await page.waitForChanges();
|
|
41
|
-
expect(activeElId).toBe("visibility-button-1");
|
|
42
|
-
await page.keyboard.press("ArrowLeft");
|
|
43
|
-
await page.waitForChanges();
|
|
44
|
-
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
45
|
-
await page.waitForChanges();
|
|
46
|
-
expect(activeElId).toBe("visibility-button-0");
|
|
47
|
-
await page.keyboard.press("ArrowRight");
|
|
48
|
-
await page.waitForChanges();
|
|
49
|
-
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
50
|
-
await page.waitForChanges();
|
|
51
|
-
expect(activeElId).toBe("visibility-button-1");
|
|
52
|
-
// wraps left
|
|
53
|
-
await page.keyboard.press("ArrowRight");
|
|
54
|
-
await page.waitForChanges();
|
|
55
|
-
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
56
|
-
await page.waitForChanges();
|
|
57
|
-
expect(activeElId).toBe("visibility-button-0");
|
|
58
|
-
});
|
|
59
|
-
it("has keyboard navigation for data points", async () => {
|
|
60
|
-
page = await newE2EPage();
|
|
61
|
-
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
62
|
-
<wm-line-chart
|
|
63
|
-
label="Regional Job Trends"
|
|
64
|
-
description="View job trends for your region compared to national tends from the past 3 years with a 3 year projection"
|
|
65
|
-
x-axis-label="Year"
|
|
66
|
-
y-axis-label="Change Since 2020"
|
|
67
|
-
line-data='{"Regional": {"2020": 5, "2021": 10, "2022": 13}, "National": {"2020": 8, "2021": null, "2022": 16}}'
|
|
68
|
-
y-range="0,25,50,75,100"
|
|
69
|
-
>
|
|
70
|
-
</wm-line-chart>
|
|
71
|
-
</main></body></html>`);
|
|
72
|
-
await page.keyboard.press("Tab");
|
|
73
|
-
await page.waitForChanges();
|
|
74
|
-
let activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
75
|
-
expect(activeElId).toBe("Regional-0");
|
|
76
|
-
await page.keyboard.press("ArrowRight");
|
|
77
|
-
await page.waitForChanges();
|
|
78
|
-
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
79
|
-
await page.waitForChanges();
|
|
80
|
-
expect(activeElId).toBe("Regional-1");
|
|
81
|
-
await page.keyboard.press("ArrowRight");
|
|
82
|
-
await page.waitForChanges();
|
|
83
|
-
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
84
|
-
expect(activeElId).toBe("Regional-2");
|
|
85
|
-
// wraps left
|
|
86
|
-
await page.keyboard.press("ArrowRight");
|
|
87
|
-
await page.waitForChanges();
|
|
88
|
-
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
89
|
-
expect(activeElId).toBe("Regional-0");
|
|
90
|
-
// wraps Left
|
|
91
|
-
await page.keyboard.press("ArrowLeft");
|
|
92
|
-
await page.waitForChanges();
|
|
93
|
-
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
94
|
-
expect(activeElId).toBe("Regional-2");
|
|
95
|
-
await page.keyboard.press("ArrowLeft");
|
|
96
|
-
await page.waitForChanges();
|
|
97
|
-
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
98
|
-
expect(activeElId).toBe("Regional-1");
|
|
99
|
-
// next line
|
|
100
|
-
await page.keyboard.press("ArrowLeft");
|
|
101
|
-
await page.waitForChanges();
|
|
102
|
-
await page.keyboard.press("ArrowDown");
|
|
103
|
-
await page.waitForChanges();
|
|
104
|
-
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
105
|
-
expect(activeElId).toBe("National-0");
|
|
106
|
-
// skips null data point
|
|
107
|
-
await page.keyboard.press("ArrowLeft");
|
|
108
|
-
await page.waitForChanges();
|
|
109
|
-
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
110
|
-
expect(activeElId).toBe("National-2");
|
|
111
|
-
// wraps to first line
|
|
112
|
-
await page.keyboard.press("ArrowLeft");
|
|
113
|
-
await page.waitForChanges();
|
|
114
|
-
await page.keyboard.press("ArrowDown");
|
|
115
|
-
await page.waitForChanges();
|
|
116
|
-
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
117
|
-
expect(activeElId).toBe("Regional-0");
|
|
118
|
-
// wraps to last line
|
|
119
|
-
await page.keyboard.press("ArrowUp");
|
|
120
|
-
await page.waitForChanges();
|
|
121
|
-
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
122
|
-
expect(activeElId).toBe("National-0");
|
|
123
|
-
await page.keyboard.press("ArrowUp");
|
|
124
|
-
await page.waitForChanges();
|
|
125
|
-
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
126
|
-
expect(activeElId).toBe("Regional-0");
|
|
127
|
-
});
|
|
128
|
-
it("visibility toggle hides lines, data points are skipped by navigation", async () => {
|
|
129
|
-
page = await newE2EPage();
|
|
130
|
-
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
131
|
-
<wm-line-chart
|
|
132
|
-
label="Regional Job Trends"
|
|
133
|
-
description="View job trends for your region compared to national tends from the past 3 years with a 3 year projection"
|
|
134
|
-
x-axis-label="Year"
|
|
135
|
-
y-axis-label="Change Since 2020"
|
|
136
|
-
line-data='{"Regional": {"2020": 5, "2021": 10, "2022": 13}, "National": {"2020": 8, "2021": 12, "2022": 16}, "International": {"2020": 8, "2021": 12, "2022": 16}}'
|
|
137
|
-
visibility-toggles="true"
|
|
138
|
-
>
|
|
139
|
-
</wm-line-chart>
|
|
140
|
-
</main></body></html>`);
|
|
141
|
-
const allLineEls = await page.findAll("wm-line-chart >>> .line");
|
|
142
|
-
expect(allLineEls[0]).not.toHaveClass("hidden");
|
|
143
|
-
await page.keyboard.press("Tab");
|
|
144
|
-
await page.waitForChanges();
|
|
145
|
-
// Enter key toggles button
|
|
146
|
-
await page.keyboard.press("Enter");
|
|
147
|
-
await page.waitForChanges();
|
|
148
|
-
expect(allLineEls[0]).toHaveClass("hidden");
|
|
149
|
-
// Space key toggles button
|
|
150
|
-
await page.keyboard.press("Space");
|
|
151
|
-
await page.waitForChanges();
|
|
152
|
-
expect(allLineEls[0]).not.toHaveClass("hidden");
|
|
153
|
-
await page.keyboard.press("Space");
|
|
154
|
-
await page.waitForChanges();
|
|
155
|
-
expect(allLineEls[0]).toHaveClass("hidden");
|
|
156
|
-
// tab focuses first visible data point
|
|
157
|
-
await page.keyboard.press("Tab");
|
|
158
|
-
await page.waitForChanges();
|
|
159
|
-
let activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
160
|
-
expect(activeElId).toBe("National-0");
|
|
161
|
-
await page.keyboard.press("ArrowDown");
|
|
162
|
-
await page.waitForChanges();
|
|
163
|
-
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
164
|
-
expect(activeElId).toBe("International-0");
|
|
165
|
-
// data point nav skips hidden line
|
|
166
|
-
await page.keyboard.press("ArrowDown");
|
|
167
|
-
await page.waitForChanges();
|
|
168
|
-
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
169
|
-
expect(activeElId).toBe("National-0");
|
|
170
|
-
// data point nav skips hidden line
|
|
171
|
-
await page.keyboard.press("ArrowUp");
|
|
172
|
-
await page.waitForChanges();
|
|
173
|
-
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
174
|
-
expect(activeElId).toBe("International-0");
|
|
175
|
-
});
|
|
176
|
-
});
|