@ukic/web-components 2.7.0 → 2.8.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
- package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +2 -2
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card.cjs.entry.js +1 -1
- package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js +1 -1
- package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-entity.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-entity.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +86 -65
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +76 -67
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-menu.cjs.entry.js +5 -2
- package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +28 -59
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
- package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +2 -2
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-select.cjs.entry.js +3 -2
- package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
- package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-step.cjs.entry.js +1 -1
- package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-text-field.cjs.entry.js +16 -24
- package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-top-navigation.cjs.entry.js +8 -4
- package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-accordion-group/test/basic/ic-accordion-group.e2e.js +3 -0
- package/dist/collection/components/ic-accordion-group/test/basic/ic-accordion-group.e2e.js.map +1 -1
- package/dist/collection/components/ic-accordion-group/test/basic/ic-accordion-group.spec.js +3 -0
- package/dist/collection/components/ic-accordion-group/test/basic/ic-accordion-group.spec.js.map +1 -1
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.css +3 -3
- package/dist/collection/components/ic-badge/ic-badge.js +1 -1
- package/dist/collection/components/ic-badge/ic-badge.js.map +1 -1
- package/dist/collection/components/ic-button/ic-button.css +3 -1
- package/dist/collection/components/ic-card/ic-card.css +1 -1
- package/dist/collection/components/ic-checkbox/ic-checkbox.css +5 -5
- package/dist/collection/components/ic-chip/ic-chip.css +1 -1
- package/dist/collection/components/ic-data-entity/ic-data-entity.css +1 -1
- package/dist/collection/components/ic-data-row/ic-data-row.css +1 -1
- package/dist/collection/components/ic-data-row/test/a11y/ic-data-row.test.a11y.js +3 -1
- package/dist/collection/components/ic-data-row/test/a11y/ic-data-row.test.a11y.js.map +1 -1
- package/dist/collection/components/ic-dialog/ic-dialog.css +56 -22
- package/dist/collection/components/ic-dialog/ic-dialog.js +103 -64
- package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -1
- package/dist/collection/components/ic-dialog/test/basic/ic-dialog.e2e.js +129 -48
- package/dist/collection/components/ic-dialog/test/basic/ic-dialog.e2e.js.map +1 -1
- package/dist/collection/components/ic-dialog/test/basic/ic-dialog.spec.js +38 -39
- package/dist/collection/components/ic-dialog/test/basic/ic-dialog.spec.js.map +1 -1
- package/dist/collection/components/ic-footer/test/a11y/ic-footer.test.a11y.js +2 -0
- package/dist/collection/components/ic-footer/test/a11y/ic-footer.test.a11y.js.map +1 -1
- package/dist/collection/components/ic-horizontal-scroll/test/a11y/ic-horizontal-scroll.test.a11y.js +2 -0
- package/dist/collection/components/ic-horizontal-scroll/test/a11y/ic-horizontal-scroll.test.a11y.js.map +1 -1
- package/dist/collection/components/ic-input-component-container/ic-input-component-container.css +4 -4
- package/dist/collection/components/ic-menu/ic-menu.css +1 -5
- package/dist/collection/components/ic-menu/ic-menu.js +124 -65
- package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
- package/dist/collection/components/ic-menu/test/basic/ic-menu.spec.js +17 -0
- package/dist/collection/components/ic-menu/test/basic/ic-menu.spec.js.map +1 -1
- package/dist/collection/components/ic-navigation-group/ic-navigation-group.css +1 -1
- package/dist/collection/components/ic-navigation-group/test/a11y/ic-navigation-group.test.a11y.js +2 -0
- package/dist/collection/components/ic-navigation-group/test/a11y/ic-navigation-group.test.a11y.js.map +1 -1
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +11 -5
- package/dist/collection/components/ic-navigation-item/test/a11y/ic-navigation-item.test.a11y.js +2 -0
- package/dist/collection/components/ic-navigation-item/test/a11y/ic-navigation-item.test.a11y.js.map +1 -1
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.css +7 -3
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +4 -1
- package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js.map +1 -1
- package/dist/collection/components/ic-pagination/test/a11y/ic-pagination.test.a11y.js +1 -1
- package/dist/collection/components/ic-pagination/test/a11y/ic-pagination.test.a11y.js.map +1 -1
- package/dist/collection/components/ic-pagination/test/basic/ic-pagination.spec.js +37 -36
- package/dist/collection/components/ic-pagination/test/basic/ic-pagination.spec.js.map +1 -1
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +28 -59
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -1
- package/dist/collection/components/ic-popover-menu/test/basic/ic-popover-menu.e2e.js +3 -0
- package/dist/collection/components/ic-popover-menu/test/basic/ic-popover-menu.e2e.js.map +1 -1
- package/dist/collection/components/ic-radio-option/ic-radio-option.css +3 -3
- package/dist/collection/components/ic-search-bar/ic-search-bar.css +1 -1
- package/dist/collection/components/ic-search-bar/ic-search-bar.js +1 -1
- package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
- package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.e2e.js +14 -30
- package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.e2e.js.map +1 -1
- package/dist/collection/components/ic-select/ic-select.css +1 -1
- package/dist/collection/components/ic-select/ic-select.js +20 -1
- package/dist/collection/components/ic-select/ic-select.js.map +1 -1
- package/dist/collection/components/ic-select/test/basic/ic-select.e2e.js +1 -0
- package/dist/collection/components/ic-select/test/basic/ic-select.e2e.js.map +1 -1
- package/dist/collection/components/ic-select/test/basic/ic-select.spec.js +2 -2
- package/dist/collection/components/ic-select/test/basic/ic-select.spec.js.map +1 -1
- package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.e2e.js +1 -2
- package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.e2e.js.map +1 -1
- package/dist/collection/components/ic-status-tag/ic-status-tag.css +4 -4
- package/dist/collection/components/ic-step/ic-step.css +1 -1
- package/dist/collection/components/ic-switch/ic-switch.css +3 -2
- package/dist/collection/components/ic-tab-group/ic-tab-group.css +1 -1
- package/dist/collection/components/ic-text-field/ic-text-field.js +16 -24
- package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
- package/dist/collection/components/ic-tooltip/ic-tooltip.css +2 -2
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +3 -3
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +8 -3
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
- package/dist/collection/components/ic-top-navigation/test/a11y/ic-top-navigation.test.a11y.js +2 -0
- package/dist/collection/components/ic-top-navigation/test/a11y/ic-top-navigation.test.a11y.js.map +1 -1
- package/dist/collection/components/ic-top-navigation/test/basic/ic-top-navigation.spec.js +15 -0
- package/dist/collection/components/ic-top-navigation/test/basic/ic-top-navigation.spec.js.map +1 -1
- package/dist/components/ic-back-to-top.js +1 -1
- package/dist/components/ic-back-to-top.js.map +1 -1
- package/dist/components/ic-badge.js +1 -1
- package/dist/components/ic-badge.js.map +1 -1
- package/dist/components/ic-button2.js +1 -1
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-card.js +1 -1
- package/dist/components/ic-card.js.map +1 -1
- package/dist/components/ic-checkbox.js +1 -1
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-chip.js +1 -1
- package/dist/components/ic-chip.js.map +1 -1
- package/dist/components/ic-data-entity.js +1 -1
- package/dist/components/ic-data-entity.js.map +1 -1
- package/dist/components/ic-data-row.js +1 -1
- package/dist/components/ic-data-row.js.map +1 -1
- package/dist/components/ic-dialog.js +88 -66
- package/dist/components/ic-dialog.js.map +1 -1
- package/dist/components/ic-input-component-container2.js +1 -1
- package/dist/components/ic-input-component-container2.js.map +1 -1
- package/dist/components/ic-menu2.js +79 -67
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-group.js +1 -1
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-navigation-item.js +1 -1
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-navigation-menu2.js +5 -2
- package/dist/components/ic-navigation-menu2.js.map +1 -1
- package/dist/components/ic-popover-menu.js +28 -59
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-option.js +1 -1
- package/dist/components/ic-radio-option.js.map +1 -1
- package/dist/components/ic-search-bar.js +2 -2
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-select.js +4 -2
- package/dist/components/ic-select.js.map +1 -1
- package/dist/components/ic-status-tag.js +1 -1
- package/dist/components/ic-status-tag.js.map +1 -1
- package/dist/components/ic-step.js +1 -1
- package/dist/components/ic-step.js.map +1 -1
- package/dist/components/ic-switch.js +1 -1
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-tab-group.js +1 -1
- package/dist/components/ic-tab-group.js.map +1 -1
- package/dist/components/ic-text-field2.js +16 -24
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-tooltip2.js +1 -1
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/components/ic-top-navigation.js +8 -4
- package/dist/components/ic-top-navigation.js.map +1 -1
- package/dist/core/core.css +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-24da56e7.entry.js +2 -0
- package/dist/core/p-24da56e7.entry.js.map +1 -0
- package/dist/core/p-43af3cf6.entry.js +2 -0
- package/dist/core/p-43af3cf6.entry.js.map +1 -0
- package/dist/core/p-4bc35224.entry.js +2 -0
- package/dist/core/p-4bc35224.entry.js.map +1 -0
- package/dist/core/p-5a3ca50a.entry.js +2 -0
- package/dist/core/p-5a3ca50a.entry.js.map +1 -0
- package/dist/core/{p-eb063498.entry.js → p-5ccbb042.entry.js} +2 -2
- package/dist/core/p-5ccbb042.entry.js.map +1 -0
- package/dist/core/p-657513b5.entry.js +2 -0
- package/dist/core/p-657513b5.entry.js.map +1 -0
- package/dist/core/p-69d15528.entry.js +2 -0
- package/dist/core/p-69d15528.entry.js.map +1 -0
- package/dist/core/p-6c376756.entry.js +2 -0
- package/dist/core/p-6c376756.entry.js.map +1 -0
- package/dist/core/p-717907de.entry.js +2 -0
- package/dist/core/p-717907de.entry.js.map +1 -0
- package/dist/core/p-748159fe.entry.js +2 -0
- package/dist/core/p-748159fe.entry.js.map +1 -0
- package/dist/core/p-7ce86152.entry.js +2 -0
- package/dist/core/p-7ce86152.entry.js.map +1 -0
- package/dist/core/p-8b18346a.entry.js.map +1 -1
- package/dist/core/p-99fad66b.entry.js +2 -0
- package/dist/core/p-99fad66b.entry.js.map +1 -0
- package/dist/core/p-9f6ffced.entry.js +2 -0
- package/dist/core/p-9f6ffced.entry.js.map +1 -0
- package/dist/core/{p-af9f1caa.entry.js → p-9ff57f09.entry.js} +2 -2
- package/dist/core/p-9ff57f09.entry.js.map +1 -0
- package/dist/core/p-a76912b0.entry.js +2 -0
- package/dist/core/p-a76912b0.entry.js.map +1 -0
- package/dist/core/p-b879fa3e.entry.js +2 -0
- package/dist/core/p-b879fa3e.entry.js.map +1 -0
- package/dist/core/p-c0719bf4.entry.js +2 -0
- package/dist/core/p-c0719bf4.entry.js.map +1 -0
- package/dist/core/{p-ec82fa24.entry.js → p-ca6073be.entry.js} +2 -2
- package/dist/core/p-ca6073be.entry.js.map +1 -0
- package/dist/core/p-cb5f19ea.entry.js +2 -0
- package/dist/core/p-cb5f19ea.entry.js.map +1 -0
- package/dist/core/p-d80f99e0.entry.js +2 -0
- package/dist/core/p-d80f99e0.entry.js.map +1 -0
- package/dist/core/p-e9ddb8cd.entry.js +2 -0
- package/dist/core/p-e9ddb8cd.entry.js.map +1 -0
- package/dist/core/p-eb4641a9.entry.js +2 -0
- package/dist/core/p-eb4641a9.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/ic-back-to-top.entry.js +1 -1
- package/dist/esm/ic-back-to-top.entry.js.map +1 -1
- package/dist/esm/ic-badge.entry.js.map +1 -1
- package/dist/esm/ic-button_3.entry.js +2 -2
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-card.entry.js +1 -1
- package/dist/esm/ic-card.entry.js.map +1 -1
- package/dist/esm/ic-checkbox.entry.js +1 -1
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-chip.entry.js +1 -1
- package/dist/esm/ic-chip.entry.js.map +1 -1
- package/dist/esm/ic-data-entity.entry.js +1 -1
- package/dist/esm/ic-data-entity.entry.js.map +1 -1
- package/dist/esm/ic-data-row.entry.js +1 -1
- package/dist/esm/ic-data-row.entry.js.map +1 -1
- package/dist/esm/ic-dialog.entry.js +87 -66
- package/dist/esm/ic-dialog.entry.js.map +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +76 -67
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-navigation-group.entry.js +1 -1
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +1 -1
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +5 -2
- package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +28 -59
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-option.entry.js +1 -1
- package/dist/esm/ic-radio-option.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +2 -2
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-select.entry.js +3 -2
- package/dist/esm/ic-select.entry.js.map +1 -1
- package/dist/esm/ic-status-tag.entry.js +1 -1
- package/dist/esm/ic-status-tag.entry.js.map +1 -1
- package/dist/esm/ic-step.entry.js +1 -1
- package/dist/esm/ic-step.entry.js.map +1 -1
- package/dist/esm/ic-switch.entry.js +1 -1
- package/dist/esm/ic-switch.entry.js.map +1 -1
- package/dist/esm/ic-tab-group.entry.js +1 -1
- package/dist/esm/ic-tab-group.entry.js.map +1 -1
- package/dist/esm/ic-text-field.entry.js +16 -24
- package/dist/esm/ic-text-field.entry.js.map +1 -1
- package/dist/esm/ic-top-navigation.entry.js +8 -4
- package/dist/esm/ic-top-navigation.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-dialog/ic-dialog.d.ts +13 -2
- package/dist/types/components/ic-menu/ic-menu.d.ts +12 -2
- package/dist/types/components/ic-popover-menu/ic-popover-menu.d.ts +1 -1
- package/dist/types/components/ic-select/ic-select.d.ts +4 -0
- package/dist/types/components/ic-text-field/ic-text-field.d.ts +1 -0
- package/dist/types/components/ic-top-navigation/ic-top-navigation.d.ts +1 -0
- package/dist/types/components.d.ts +18 -0
- package/hydrate/index.js +246 -242
- package/package.json +2 -2
- package/dist/core/p-0dc4f225.entry.js +0 -2
- package/dist/core/p-0dc4f225.entry.js.map +0 -1
- package/dist/core/p-12124e24.entry.js +0 -2
- package/dist/core/p-12124e24.entry.js.map +0 -1
- package/dist/core/p-1cf2a6aa.entry.js +0 -2
- package/dist/core/p-1cf2a6aa.entry.js.map +0 -1
- package/dist/core/p-3fd897c9.entry.js +0 -2
- package/dist/core/p-3fd897c9.entry.js.map +0 -1
- package/dist/core/p-432f8ff0.entry.js +0 -2
- package/dist/core/p-432f8ff0.entry.js.map +0 -1
- package/dist/core/p-4559600a.entry.js +0 -2
- package/dist/core/p-4559600a.entry.js.map +0 -1
- package/dist/core/p-5b487daa.entry.js +0 -2
- package/dist/core/p-5b487daa.entry.js.map +0 -1
- package/dist/core/p-5ca39ed5.entry.js +0 -2
- package/dist/core/p-5ca39ed5.entry.js.map +0 -1
- package/dist/core/p-763d0822.entry.js +0 -2
- package/dist/core/p-763d0822.entry.js.map +0 -1
- package/dist/core/p-7bb3c340.entry.js +0 -2
- package/dist/core/p-7bb3c340.entry.js.map +0 -1
- package/dist/core/p-9ccfb863.entry.js +0 -2
- package/dist/core/p-9ccfb863.entry.js.map +0 -1
- package/dist/core/p-a448d873.entry.js +0 -2
- package/dist/core/p-a448d873.entry.js.map +0 -1
- package/dist/core/p-af9f1caa.entry.js.map +0 -1
- package/dist/core/p-b77ab20a.entry.js +0 -2
- package/dist/core/p-b77ab20a.entry.js.map +0 -1
- package/dist/core/p-c36cbd8a.entry.js +0 -2
- package/dist/core/p-c36cbd8a.entry.js.map +0 -1
- package/dist/core/p-e2903ce9.entry.js +0 -2
- package/dist/core/p-e2903ce9.entry.js.map +0 -1
- package/dist/core/p-ea6ad791.entry.js +0 -2
- package/dist/core/p-ea6ad791.entry.js.map +0 -1
- package/dist/core/p-eb063498.entry.js.map +0 -1
- package/dist/core/p-ec82fa24.entry.js.map +0 -1
- package/dist/core/p-f00e510b.entry.js +0 -2
- package/dist/core/p-f00e510b.entry.js.map +0 -1
- package/dist/core/p-f69fb26b.entry.js +0 -2
- package/dist/core/p-f69fb26b.entry.js.map +0 -1
- package/dist/core/p-fe6e0c0e.entry.js +0 -2
- package/dist/core/p-fe6e0c0e.entry.js.map +0 -1
@@ -6,21 +6,21 @@ describe("ic-pagination simple appearance component", () => {
|
|
6
6
|
it("should render with 10 pages", async () => {
|
7
7
|
const page = await newSpecPage({
|
8
8
|
components: [Pagination],
|
9
|
-
html: `<ic-pagination pages=10
|
9
|
+
html: `<ic-pagination pages=10></ic-pagination>`,
|
10
10
|
});
|
11
11
|
expect(page.root).toMatchSnapshot("render with ten pages");
|
12
12
|
});
|
13
|
-
it("should
|
13
|
+
it("should render on the last page", async () => {
|
14
14
|
const page = await newSpecPage({
|
15
15
|
components: [Pagination],
|
16
|
-
html: `<ic-pagination pages="15" default-page="15"
|
16
|
+
html: `<ic-pagination pages="15" default-page="15"></ic-pagination>`,
|
17
17
|
});
|
18
|
-
expect(page.root).toMatchSnapshot("render
|
18
|
+
expect(page.root).toMatchSnapshot("render on the last page");
|
19
19
|
});
|
20
20
|
it("should render with the default page selected", async () => {
|
21
21
|
const page = await newSpecPage({
|
22
22
|
components: [Pagination],
|
23
|
-
html: `<ic-pagination pages="15" default-page=4
|
23
|
+
html: `<ic-pagination pages="15" default-page=4></ic-pagination>`,
|
24
24
|
});
|
25
25
|
expect(page.root).toMatchSnapshot("render at the default page");
|
26
26
|
});
|
@@ -34,7 +34,7 @@ describe("ic-pagination simple appearance component", () => {
|
|
34
34
|
it("should render without current page", async () => {
|
35
35
|
const page = await newSpecPage({
|
36
36
|
components: [Pagination],
|
37
|
-
html: `<ic-pagination pages="15" hide-current-page=true
|
37
|
+
html: `<ic-pagination pages="15" hide-current-page=true></ic-pagination>`,
|
38
38
|
});
|
39
39
|
expect(page.root).toMatchSnapshot("no current page");
|
40
40
|
});
|
@@ -45,21 +45,21 @@ describe("ic-pagination simple appearance component", () => {
|
|
45
45
|
pages="11"
|
46
46
|
type="complex"
|
47
47
|
adjacent-count="2"
|
48
|
-
boundary-count="2"
|
48
|
+
boundary-count="2"></ic-pagination>`,
|
49
49
|
});
|
50
50
|
expect(page.root).toMatchSnapshot("pages less than adjacent-count + boundary-count");
|
51
51
|
});
|
52
52
|
it("should render with interactions disabled", async () => {
|
53
53
|
const page = await newSpecPage({
|
54
54
|
components: [Pagination],
|
55
|
-
html: `<ic-pagination pages="15" loading=true
|
55
|
+
html: `<ic-pagination pages="15" loading=true></ic-pagination>`,
|
56
56
|
});
|
57
57
|
expect(page.root).toMatchSnapshot("loading");
|
58
58
|
});
|
59
59
|
it("should click the next page button", async () => {
|
60
60
|
const page = await newSpecPage({
|
61
61
|
components: [Pagination, Button, PaginationItem],
|
62
|
-
html: `<ic-pagination pages="15"
|
62
|
+
html: `<ic-pagination pages="15"></ic-pagination>
|
63
63
|
`,
|
64
64
|
});
|
65
65
|
const btn = (await page.root.shadowRoot.querySelector("#next-page-button"));
|
@@ -71,7 +71,7 @@ describe("ic-pagination simple appearance component", () => {
|
|
71
71
|
it("should click the last page button", async () => {
|
72
72
|
const page = await newSpecPage({
|
73
73
|
components: [Pagination, Button, PaginationItem],
|
74
|
-
html: `<ic-pagination pages="15"
|
74
|
+
html: `<ic-pagination pages="15"></ic-pagination>
|
75
75
|
`,
|
76
76
|
});
|
77
77
|
const btn = (await page.root.shadowRoot.querySelector("#last-page-button"));
|
@@ -83,7 +83,7 @@ describe("ic-pagination simple appearance component", () => {
|
|
83
83
|
it("should click the previous page button", async () => {
|
84
84
|
const page = await newSpecPage({
|
85
85
|
components: [Pagination, Button, PaginationItem],
|
86
|
-
html: `<ic-pagination pages="15" default-page=5
|
86
|
+
html: `<ic-pagination pages="15" default-page=5></ic-pagination>
|
87
87
|
`,
|
88
88
|
});
|
89
89
|
const btn = (await page.root.shadowRoot.querySelector("#previous-page-button"));
|
@@ -95,7 +95,7 @@ describe("ic-pagination simple appearance component", () => {
|
|
95
95
|
it("should click the first page button", async () => {
|
96
96
|
const page = await newSpecPage({
|
97
97
|
components: [Pagination, Button, PaginationItem],
|
98
|
-
html: `<ic-pagination pages="15" default-page=5
|
98
|
+
html: `<ic-pagination pages="15" default-page=5></ic-pagination>
|
99
99
|
`,
|
100
100
|
});
|
101
101
|
const btn = (await page.root.shadowRoot.querySelector("#first-page-button"));
|
@@ -109,28 +109,28 @@ describe("ic-pagination complex type", () => {
|
|
109
109
|
it("should render as complex type", async () => {
|
110
110
|
const page = await newSpecPage({
|
111
111
|
components: [Pagination],
|
112
|
-
html: `<ic-pagination pages=15 type='complex'
|
112
|
+
html: `<ic-pagination pages=15 type='complex'></ic-pagination>`,
|
113
113
|
});
|
114
114
|
expect(page.root).toMatchSnapshot("render complex pagination");
|
115
115
|
});
|
116
116
|
it("should render as complex type without first page button", async () => {
|
117
117
|
const page = await newSpecPage({
|
118
118
|
components: [Pagination],
|
119
|
-
html: `<ic-pagination pages=15 type='complex' hide-first-page-button=true
|
119
|
+
html: `<ic-pagination pages=15 type='complex' hide-first-page-button=true></ic-pagination>`,
|
120
120
|
});
|
121
121
|
expect(page.root).toMatchSnapshot("render complex pagination with no first page button");
|
122
122
|
});
|
123
123
|
it("should render as complex type without last page button", async () => {
|
124
124
|
const page = await newSpecPage({
|
125
125
|
components: [Pagination],
|
126
|
-
html: `<ic-pagination pages=15 type='complex' hide-last-page-button=true
|
126
|
+
html: `<ic-pagination pages=15 type='complex' hide-last-page-button=true></ic-pagination>`,
|
127
127
|
});
|
128
128
|
expect(page.root).toMatchSnapshot("render complex pagination with no last page button");
|
129
129
|
});
|
130
130
|
it("should render as complex type with 20 pages", async () => {
|
131
131
|
const page = await newSpecPage({
|
132
132
|
components: [Pagination],
|
133
|
-
html: `<ic-pagination type="complex" pages=20
|
133
|
+
html: `<ic-pagination type="complex" pages=20></ic-pagination>`,
|
134
134
|
});
|
135
135
|
expect(page.root).toMatchSnapshot("render complex pagination with 20 pages");
|
136
136
|
});
|
@@ -148,70 +148,70 @@ describe("ic-pagination complex type", () => {
|
|
148
148
|
it("should render as complex type with 0 adjacent items and 0 boundary items with default page set at 7", async () => {
|
149
149
|
const page = await newSpecPage({
|
150
150
|
components: [Pagination],
|
151
|
-
html: `<ic-pagination pages=15 type="complex" adjacent-count=0 boundary-count=0 default-page=7
|
151
|
+
html: `<ic-pagination pages=15 type="complex" adjacent-count=0 boundary-count=0 default-page=7></ic-pagination>`,
|
152
152
|
});
|
153
153
|
expect(page.root).toMatchSnapshot("render complex type with 0 adjacent items and 0 boundary items and default page 7");
|
154
154
|
});
|
155
155
|
it("should render as complex type with 0 adjacent items and 0 boundary items with default page set at 15", async () => {
|
156
156
|
const page = await newSpecPage({
|
157
157
|
components: [Pagination],
|
158
|
-
html: `<ic-pagination pages=15 type="complex" adjacent-count=0 boundary-count=0 default-page=15
|
158
|
+
html: `<ic-pagination pages=15 type="complex" adjacent-count=0 boundary-count=0 default-page=15></ic-pagination>`,
|
159
159
|
});
|
160
160
|
expect(page.root).toMatchSnapshot("render complex type with 0 adjacent items and 0 boundary items and default page 15");
|
161
161
|
});
|
162
162
|
it("should render in complex type with 1 adjacent items and 0 boundary items", async () => {
|
163
163
|
const page = await newSpecPage({
|
164
164
|
components: [Pagination],
|
165
|
-
html: `<ic-pagination pages=15 type="complex" adjacent-count=1 boundary-count=0
|
165
|
+
html: `<ic-pagination pages=15 type="complex" adjacent-count=1 boundary-count=0></ic-pagination>`,
|
166
166
|
});
|
167
167
|
expect(page.root).toMatchSnapshot("render complex type with 1 adjacent items and 0 boundary items");
|
168
168
|
});
|
169
169
|
it("should render as complex type with 2 adjacent items and 0 boundary items", async () => {
|
170
170
|
const page = await newSpecPage({
|
171
171
|
components: [Pagination],
|
172
|
-
html: `<ic-pagination pages=15 type="complex" adjacent-count=2 boundary-count=0
|
172
|
+
html: `<ic-pagination pages=15 type="complex" adjacent-count=2 boundary-count=0></ic-pagination>`,
|
173
173
|
});
|
174
174
|
expect(page.root).toMatchSnapshot("render complex type with 2 adjacent items and 0 boundary items");
|
175
175
|
});
|
176
176
|
it("should render as complex type with 0 adjacent items and 1 boundary items", async () => {
|
177
177
|
const page = await newSpecPage({
|
178
178
|
components: [Pagination],
|
179
|
-
html: `<ic-pagination pages=15 type="complex" adjacent-count=0 boundary-count=1
|
179
|
+
html: `<ic-pagination pages=15 type="complex" adjacent-count=0 boundary-count=1></ic-pagination>`,
|
180
180
|
});
|
181
181
|
expect(page.root).toMatchSnapshot("render complex type with 0 adjacent items and 1 boundary items");
|
182
182
|
});
|
183
183
|
it("should render as complex type with 0 adjacent items and 2 boundary items", async () => {
|
184
184
|
const page = await newSpecPage({
|
185
185
|
components: [Pagination],
|
186
|
-
html: `<ic-pagination pages=15 type="complex" adjacent-count=0 boundary-count=2
|
186
|
+
html: `<ic-pagination pages=15 type="complex" adjacent-count=0 boundary-count=2></ic-pagination>`,
|
187
187
|
});
|
188
188
|
expect(page.root).toMatchSnapshot("render complex type with 0 adjacent items and 2 boundary items");
|
189
189
|
});
|
190
190
|
it("should render as complex type with 1 adjacent items and 2 boundary items", async () => {
|
191
191
|
const page = await newSpecPage({
|
192
192
|
components: [Pagination],
|
193
|
-
html: `<ic-pagination pages=15 type="complex" adjacent-count=1 boundary-count=2
|
193
|
+
html: `<ic-pagination pages=15 type="complex" adjacent-count=1 boundary-count=2></ic-pagination>`,
|
194
194
|
});
|
195
195
|
expect(page.root).toMatchSnapshot("render complex type with 1 adjacent items and 2 boundary items");
|
196
196
|
});
|
197
197
|
it("should render as complex type with 2 adjacent items and 1 boundary items", async () => {
|
198
198
|
const page = await newSpecPage({
|
199
199
|
components: [Pagination],
|
200
|
-
html: `<ic-pagination pages=15 type="complex" adjacent-count=2 boundary-count=1
|
200
|
+
html: `<ic-pagination pages=15 type="complex" adjacent-count=2 boundary-count=1></ic-pagination>`,
|
201
201
|
});
|
202
202
|
expect(page.root).toMatchSnapshot("render complex type with 2 adjacent items and 1 boundary items");
|
203
203
|
});
|
204
204
|
it("should render as complex type with 2 adjacent items and 2 boundary items", async () => {
|
205
205
|
const page = await newSpecPage({
|
206
206
|
components: [Pagination],
|
207
|
-
html: `<ic-pagination pages=15 type="complex" adjacent-count=2 boundary-count=2
|
207
|
+
html: `<ic-pagination pages=15 type="complex" adjacent-count=2 boundary-count=2></ic-pagination>`,
|
208
208
|
});
|
209
209
|
expect(page.root).toMatchSnapshot("render complex type with 2 adjacent items and 2 boundary items");
|
210
210
|
});
|
211
211
|
it("should click the next page button in complex type", async () => {
|
212
212
|
const page = await newSpecPage({
|
213
213
|
components: [Pagination, Button, PaginationItem],
|
214
|
-
html: `<ic-pagination pages=15 type="complex" default-page=5
|
214
|
+
html: `<ic-pagination pages=15 type="complex" default-page=5></ic-pagination>
|
215
215
|
`,
|
216
216
|
});
|
217
217
|
const btn = (await page.root.shadowRoot.querySelector("#next-page-button"));
|
@@ -223,7 +223,7 @@ describe("ic-pagination complex type", () => {
|
|
223
223
|
it("should click the previous page button in complex type", async () => {
|
224
224
|
const page = await newSpecPage({
|
225
225
|
components: [Pagination, Button, PaginationItem],
|
226
|
-
html: `<ic-pagination pages="15" type="complex" default-page=5
|
226
|
+
html: `<ic-pagination pages="15" type="complex" default-page=5></ic-pagination>
|
227
227
|
`,
|
228
228
|
});
|
229
229
|
const btn = (await page.root.shadowRoot.querySelector("#previous-page-button"));
|
@@ -235,7 +235,7 @@ describe("ic-pagination complex type", () => {
|
|
235
235
|
it("should click the last page button in complex type", async () => {
|
236
236
|
const page = await newSpecPage({
|
237
237
|
components: [Pagination, Button, PaginationItem],
|
238
|
-
html: `<ic-pagination pages="15" type="complex" default-page=5
|
238
|
+
html: `<ic-pagination pages="15" type="complex" default-page=5></ic-pagination>
|
239
239
|
`,
|
240
240
|
});
|
241
241
|
const btn = (await page.root.shadowRoot.querySelector("#last-page-button"));
|
@@ -247,7 +247,7 @@ describe("ic-pagination complex type", () => {
|
|
247
247
|
it("should click the first page button in complex type", async () => {
|
248
248
|
const page = await newSpecPage({
|
249
249
|
components: [Pagination, Button, PaginationItem],
|
250
|
-
html: `<ic-pagination pages="15" type="complex" default-page="15"
|
250
|
+
html: `<ic-pagination pages="15" type="complex" default-page="15"></ic-pagination>
|
251
251
|
`,
|
252
252
|
});
|
253
253
|
const btn = (await page.root.shadowRoot.querySelector("#first-page-button"));
|
@@ -260,7 +260,7 @@ describe("ic-pagination complex type", () => {
|
|
260
260
|
it("should click the pagination-item in complex type", async () => {
|
261
261
|
const page = await newSpecPage({
|
262
262
|
components: [Pagination, Button, PaginationItem],
|
263
|
-
html: `<ic-pagination pages="15" type="complex" default-page=2
|
263
|
+
html: `<ic-pagination pages="15" type="complex" default-page=2></ic-pagination>
|
264
264
|
`,
|
265
265
|
});
|
266
266
|
const icPagItem = (await page.root.shadowRoot.querySelector("ic-pagination-item"));
|
@@ -273,7 +273,7 @@ describe("ic-pagination complex type", () => {
|
|
273
273
|
it("should emit an event", async () => {
|
274
274
|
const page = await newSpecPage({
|
275
275
|
components: [Pagination, Button, PaginationItem],
|
276
|
-
html: `<ic-pagination pages="15" type="complex" default-page=2
|
276
|
+
html: `<ic-pagination pages="15" type="complex" default-page=2></ic-pagination>
|
277
277
|
`,
|
278
278
|
});
|
279
279
|
await page.rootInstance.paginationItemClickHandler({ detail: { page: 1 } });
|
@@ -285,28 +285,28 @@ describe("ic-pagination appearance tests", () => {
|
|
285
285
|
it("should render as simple type in dark appearance", async () => {
|
286
286
|
const page = await newSpecPage({
|
287
287
|
components: [Pagination],
|
288
|
-
html: `<ic-pagination pages="15" appearance='dark'
|
288
|
+
html: `<ic-pagination pages="15" appearance='dark'></ic-pagination>`,
|
289
289
|
});
|
290
290
|
expect(page.root).toMatchSnapshot("render dark simple pagination");
|
291
291
|
});
|
292
292
|
it("should render as simple type in light appearance", async () => {
|
293
293
|
const page = await newSpecPage({
|
294
294
|
components: [Pagination],
|
295
|
-
html: `<ic-pagination pages="15" appearance='light'
|
295
|
+
html: `<ic-pagination pages="15" appearance='light'></ic-pagination>`,
|
296
296
|
});
|
297
297
|
expect(page.root).toMatchSnapshot("render light simple pagination");
|
298
298
|
});
|
299
299
|
it("should render as complex type in dark appearance", async () => {
|
300
300
|
const page = await newSpecPage({
|
301
301
|
components: [Pagination],
|
302
|
-
html: `<ic-pagination pages="15" type='complex' appearance='dark'
|
302
|
+
html: `<ic-pagination pages="15" type='complex' appearance='dark'></ic-pagination>`,
|
303
303
|
});
|
304
304
|
expect(page.root).toMatchSnapshot("render dark complex pagination");
|
305
305
|
});
|
306
306
|
it("should render as complex type in light appearance", async () => {
|
307
307
|
const page = await newSpecPage({
|
308
308
|
components: [Pagination],
|
309
|
-
html: `<ic-pagination pages="15" type='complex' appearance='light'
|
309
|
+
html: `<ic-pagination pages="15" type='complex' appearance='light'></ic-pagination>`,
|
310
310
|
});
|
311
311
|
expect(page.root).toMatchSnapshot("render light complex pagination");
|
312
312
|
});
|
@@ -324,9 +324,10 @@ describe("ic-pagination appearance tests", () => {
|
|
324
324
|
it("should update number of pages dynamically if the prop is updated", async () => {
|
325
325
|
const page = await newSpecPage({
|
326
326
|
components: [Pagination],
|
327
|
-
html: `<ic-pagination pages=15
|
327
|
+
html: `<ic-pagination pages=15></ic-pagination>`,
|
328
328
|
});
|
329
329
|
expect(page.rootInstance.pages).toEqual(15);
|
330
|
+
jest.spyOn(console, "warn").mockImplementation(jest.fn());
|
330
331
|
page.rootInstance.pages = 7;
|
331
332
|
await page.waitForChanges();
|
332
333
|
expect(page.rootInstance.pages).toEqual(7);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ic-pagination.spec.js","sourceRoot":"","sources":["../../../../../src/components/ic-pagination/test/basic/ic-pagination.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAEhF,QAAQ,CAAC,2CAA2C,EAAE,GAAG,EAAE;EACzD,EAAE,CAAC,6BAA6B,EAAE,KAAK,IAAI,EAAE;IAC3C,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,UAAU,CAAC;MACxB,IAAI,EAAE,2CAA2C;KAClD,CAAC,CAAC;IAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,uBAAuB,CAAC,CAAC;EAC7D,CAAC,CAAC,CAAC;EACH,EAAE,CAAC,gCAAgC,EAAE,KAAK,IAAI,EAAE;IAC9C,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,UAAU,CAAC;MACxB,IAAI,EAAE,+DAA+D;KACtE,CAAC,CAAC;IAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,uBAAuB,CAAC,CAAC;EAC7D,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,8CAA8C,EAAE,KAAK,IAAI,EAAE;IAC5D,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,U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;KACtF,CAAC,CAAC;IAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,iCAAiC,CAAC,CAAC;EACvE,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,6DAA6D,EAAE,KAAK,IAAI,EAAE;IAC3E,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,CAAC;MAChD,IAAI,EAAE;OACL;KACF,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAE9C,MAAM,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IAClC,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;EAChD,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,kEAAkE,EAAE,KAAK,IAAI,EAAE;IAChF,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,UAAU,CAAC;MACxB,IAAI,EAAE,2CAA2C;KAClD,CAAC,CAAC;IAEH,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAE5C,IAAI,CAAC,YAAY,CAAC,KAAK,GAAG,CAAC,CAAC;IAE5B,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;EAC7C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { Pagination } from \"../../ic-pagination\";\nimport { Button } from \"../../../ic-button/ic-button\";\nimport { newSpecPage } from \"@stencil/core/testing\";\nimport { AnyHTMLElement } from \"@stencil/core/internal\";\nimport { PaginationItem } from \"../../../ic-pagination-item/ic-pagination-item\";\n\ndescribe(\"ic-pagination simple appearance component\", () => {\n it(\"should render with 10 pages\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=10 ></ic-pagination>`,\n });\n\n expect(page.root).toMatchSnapshot(\"render with ten pages\");\n });\n it(\"should renderon the last pages\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=\"15\" default-page=\"15\" ></ic-pagination>`,\n });\n\n expect(page.root).toMatchSnapshot(\"render with ten pages\");\n });\n\n it(\"should render with the default page selected\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=\"15\" default-page=4 ></ic-pagination>`,\n });\n\n expect(page.root).toMatchSnapshot(\"render at the default page\");\n });\n\n it(\"should render with first and last buttons disabled\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=\"15\" hide-first-page-button=true hide-last-page-button=true></ic-pagination>`,\n });\n\n expect(page.root).toMatchSnapshot(\"no first or last page button\");\n });\n it(\"should render without current page\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=\"15\" hide-current-page=true ></ic-pagination>`,\n });\n\n expect(page.root).toMatchSnapshot(\"no current page\");\n });\n it(\"should render all pages when total pages less than min width based on boundary-count and adjacent-count\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination\n pages=\"11\"\n type=\"complex\"\n adjacent-count=\"2\"\n boundary-count=\"2\" ></ic-pagination>`,\n });\n\n expect(page.root).toMatchSnapshot(\n \"pages less than adjacent-count + boundary-count\"\n );\n });\n it(\"should render with interactions disabled\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=\"15\" loading=true ></ic-pagination>`,\n });\n\n expect(page.root).toMatchSnapshot(\"loading\");\n });\n it(\"should click the next page button\", async () => {\n const page = await newSpecPage({\n components: [Pagination, Button, PaginationItem],\n html: `<ic-pagination pages=\"15\" ></ic-pagination>\n `,\n });\n\n const btn = (await page.root.shadowRoot.querySelector(\n \"#next-page-button\"\n )) as HTMLIcButtonElement;\n const pageEl = (await page.root.shadowRoot.querySelector(\n \"ic-pagination-item\"\n )) as HTMLIcPaginationItemElement;\n\n await btn.click();\n await page.waitForChanges();\n\n expect(pageEl.page).toBe(2);\n });\n\n it(\"should click the last page button\", async () => {\n const page = await newSpecPage({\n components: [Pagination, Button, PaginationItem],\n html: `<ic-pagination pages=\"15\" ></ic-pagination>\n `,\n });\n\n const btn = (await page.root.shadowRoot.querySelector(\n \"#last-page-button\"\n )) as HTMLIcButtonElement;\n const pageEl = (await page.root.shadowRoot.querySelector(\n \"ic-pagination-item\"\n )) as HTMLIcPaginationItemElement;\n\n await btn.click();\n await page.waitForChanges();\n\n expect(pageEl.page).toBe(15);\n });\n it(\"should click the previous page button\", async () => {\n const page = await newSpecPage({\n components: [Pagination, Button, PaginationItem],\n html: `<ic-pagination pages=\"15\" default-page=5 ></ic-pagination>\n `,\n });\n\n const btn = (await page.root.shadowRoot.querySelector(\n \"#previous-page-button\"\n )) as HTMLIcButtonElement;\n const pageEl = (await page.root.shadowRoot.querySelector(\n \"ic-pagination-item\"\n )) as HTMLIcPaginationItemElement;\n\n await btn.click();\n await page.waitForChanges();\n\n expect(pageEl.page).toBe(4);\n });\n it(\"should click the first page button\", async () => {\n const page = await newSpecPage({\n components: [Pagination, Button, PaginationItem],\n html: `<ic-pagination pages=\"15\" default-page=5 ></ic-pagination>\n `,\n });\n\n const btn = (await page.root.shadowRoot.querySelector(\n \"#first-page-button\"\n )) as HTMLIcButtonElement;\n const pageEl = (await page.root.shadowRoot.querySelector(\n \"ic-pagination-item\"\n )) as HTMLIcPaginationItemElement;\n\n await btn.click();\n await page.waitForChanges();\n\n expect(pageEl.page).toBe(1);\n });\n});\ndescribe(\"ic-pagination complex type\", () => {\n it(\"should render as complex type\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15 type='complex' ></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\"render complex pagination\");\n });\n\n it(\"should render as complex type without first page button\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15 type='complex' hide-first-page-button=true ></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex pagination with no first page button\"\n );\n });\n\n it(\"should render as complex type without last page button\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15 type='complex' hide-last-page-button=true ></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex pagination with no last page button\"\n );\n });\n\n it(\"should render as complex type with 20 pages\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination type=\"complex\" pages=20 ></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex pagination with 20 pages\"\n );\n });\n\n it(\"should render as complex type with 0 adjacent items and 0 boundary items\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination\n pages=15\n type=\"complex\"\n adjacent-count=0\n ></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex type with 0 adjacent items and 0 boundary items\"\n );\n });\n\n it(\"should render as complex type with 0 adjacent items and 0 boundary items with default page set at 7\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15 type=\"complex\" adjacent-count=0 boundary-count=0 default-page=7 ></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex type with 0 adjacent items and 0 boundary items and default page 7\"\n );\n });\n\n it(\"should render as complex type with 0 adjacent items and 0 boundary items with default page set at 15\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15 type=\"complex\" adjacent-count=0 boundary-count=0 default-page=15 ></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex type with 0 adjacent items and 0 boundary items and default page 15\"\n );\n });\n\n it(\"should render in complex type with 1 adjacent items and 0 boundary items\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15 type=\"complex\" adjacent-count=1 boundary-count=0 ></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex type with 1 adjacent items and 0 boundary items\"\n );\n });\n\n it(\"should render as complex type with 2 adjacent items and 0 boundary items\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15 type=\"complex\" adjacent-count=2 boundary-count=0 ></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex type with 2 adjacent items and 0 boundary items\"\n );\n });\n\n it(\"should render as complex type with 0 adjacent items and 1 boundary items\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15 type=\"complex\" adjacent-count=0 boundary-count=1 ></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex type with 0 adjacent items and 1 boundary items\"\n );\n });\n\n it(\"should render as complex type with 0 adjacent items and 2 boundary items\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15 type=\"complex\" adjacent-count=0 boundary-count=2 ></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex type with 0 adjacent items and 2 boundary items\"\n );\n });\n\n it(\"should render as complex type with 1 adjacent items and 2 boundary items\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15 type=\"complex\" adjacent-count=1 boundary-count=2 ></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex type with 1 adjacent items and 2 boundary items\"\n );\n });\n\n it(\"should render as complex type with 2 adjacent items and 1 boundary items\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15 type=\"complex\" adjacent-count=2 boundary-count=1 ></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex type with 2 adjacent items and 1 boundary items\"\n );\n });\n\n it(\"should render as complex type with 2 adjacent items and 2 boundary items\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15 type=\"complex\" adjacent-count=2 boundary-count=2 ></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex type with 2 adjacent items and 2 boundary items\"\n );\n });\n\n it(\"should click the next page button in complex type\", async () => {\n const page = await newSpecPage({\n components: [Pagination, Button, PaginationItem],\n html: `<ic-pagination pages=15 type=\"complex\" default-page=5 ></ic-pagination>\n `,\n });\n\n const btn = (await page.root.shadowRoot.querySelector(\n \"#next-page-button\"\n )) as HTMLIcButtonElement;\n const pageEl = (await page.root.shadowRoot.querySelector(\n \"ic-pagination-item\"\n )) as HTMLIcPaginationItemElement;\n\n await btn.click();\n await page.waitForChanges();\n\n expect(pageEl.page).toBe(1);\n });\n it(\"should click the previous page button in complex type\", async () => {\n const page = await newSpecPage({\n components: [Pagination, Button, PaginationItem],\n html: `<ic-pagination pages=\"15\" type=\"complex\" default-page=5 ></ic-pagination>\n `,\n });\n\n const btn = (await page.root.shadowRoot.querySelector(\n \"#previous-page-button\"\n )) as HTMLIcButtonElement;\n const pageEl = (await page.root.shadowRoot.querySelector(\n \"ic-pagination-item\"\n )) as HTMLIcPaginationItemElement;\n\n await btn.click();\n await page.waitForChanges();\n\n expect(pageEl.page).toBe(1);\n });\n it(\"should click the last page button in complex type\", async () => {\n const page = await newSpecPage({\n components: [Pagination, Button, PaginationItem],\n html: `<ic-pagination pages=\"15\" type=\"complex\" default-page=5 ></ic-pagination>\n `,\n });\n\n const btn = (await page.root.shadowRoot.querySelector(\n \"#last-page-button\"\n )) as HTMLIcButtonElement;\n const pageEl = (await page.root.shadowRoot.querySelector(\n \"ic-pagination-item\"\n )) as HTMLIcPaginationItemElement;\n\n await btn.click();\n await page.waitForChanges();\n\n expect(pageEl.page).toBe(1);\n });\n it(\"should click the first page button in complex type\", async () => {\n const page = await newSpecPage({\n components: [Pagination, Button, PaginationItem],\n html: `<ic-pagination pages=\"15\" type=\"complex\" default-page=\"15\" ></ic-pagination>\n `,\n });\n\n const btn = (await page.root.shadowRoot.querySelector(\n \"#first-page-button\"\n )) as HTMLIcButtonElement;\n const pageEl = (await page.root.shadowRoot.querySelector(\n \"ic-pagination-item\"\n )) as HTMLIcPaginationItemElement;\n\n await pageEl.click();\n await btn.click();\n await page.waitForChanges();\n\n expect(pageEl.page).toBe(1);\n });\n it(\"should click the pagination-item in complex type\", async () => {\n const page = await newSpecPage({\n components: [Pagination, Button, PaginationItem],\n html: `<ic-pagination pages=\"15\" type=\"complex\" default-page=2 pages=\"15\" ></ic-pagination>\n `,\n });\n\n const icPagItem = (await page.root.shadowRoot.querySelector(\n \"ic-pagination-item\"\n )) as HTMLIcPaginationItemElement;\n\n const btn = (await icPagItem.shadowRoot.querySelector(\n \".item-container.default.page\"\n )) as AnyHTMLElement;\n\n await btn.click();\n await icPagItem.click();\n await page.waitForChanges();\n\n expect(icPagItem.page).toBe(1);\n });\n\n it(\"should emit an event\", async () => {\n const page = await newSpecPage({\n components: [Pagination, Button, PaginationItem],\n html: `<ic-pagination pages=\"15\" type=\"complex\" default-page=2 pages=\"15\" ></ic-pagination>\n `,\n });\n await page.rootInstance.paginationItemClickHandler({ detail: { page: 1 } });\n await page.waitForChanges();\n\n expect(page.root.currentPage).toBe(1);\n });\n});\ndescribe(\"ic-pagination appearance tests\", () => {\n it(\"should render as simple type in dark appearance\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=\"15\" appearance='dark' ></ic-pagination>`,\n });\n\n expect(page.root).toMatchSnapshot(\"render dark simple pagination\");\n });\n it(\"should render as simple type in light appearance\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=\"15\" appearance='light' ></ic-pagination>`,\n });\n\n expect(page.root).toMatchSnapshot(\"render light simple pagination\");\n });\n it(\"should render as complex type in dark appearance\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=\"15\" type='complex' appearance='dark' ></ic-pagination>`,\n });\n\n expect(page.root).toMatchSnapshot(\"render dark complex pagination\");\n });\n it(\"should render as complex type in light appearance\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=\"15\" type='complex' appearance='light' ></ic-pagination>`,\n });\n\n expect(page.root).toMatchSnapshot(\"render light complex pagination\");\n });\n\n it(\"should change page when current page set with public method\", async () => {\n const page = await newSpecPage({\n components: [Pagination, Button, PaginationItem],\n html: `<ic-pagination pages=\"15\" type=\"complex\"></ic-pagination>\n `,\n });\n expect(page.rootInstance.currentPage).toBe(1);\n\n await page.root.setCurrentPage(3);\n await page.waitForChanges();\n\n expect(page.rootInstance.currentPage).toBe(3);\n });\n\n it(\"should update number of pages dynamically if the prop is updated\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15 ></ic-pagination>`,\n });\n\n expect(page.rootInstance.pages).toEqual(15);\n\n page.rootInstance.pages = 7;\n\n await page.waitForChanges();\n\n expect(page.rootInstance.pages).toEqual(7);\n });\n});\n"]}
|
1
|
+
{"version":3,"file":"ic-pagination.spec.js","sourceRoot":"","sources":["../../../../../src/components/ic-pagination/test/basic/ic-pagination.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAEhF,QAAQ,CAAC,2CAA2C,EAAE,GAAG,EAAE;EACzD,EAAE,CAAC,6BAA6B,EAAE,KAAK,IAAI,EAAE;IAC3C,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,UAAU,CAAC;MACxB,IAAI,EAAE,0CAA0C;KACjD,CAAC,CAAC;IAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,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0C;KACjD,CAAC,CAAC;IAEH,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAE5C,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAE1D,IAAI,CAAC,YAAY,CAAC,KAAK,GAAG,CAAC,CAAC;IAE5B,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;EAC7C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { Pagination } from \"../../ic-pagination\";\nimport { Button } from \"../../../ic-button/ic-button\";\nimport { newSpecPage } from \"@stencil/core/testing\";\nimport { AnyHTMLElement } from \"@stencil/core/internal\";\nimport { PaginationItem } from \"../../../ic-pagination-item/ic-pagination-item\";\n\ndescribe(\"ic-pagination simple appearance component\", () => {\n it(\"should render with 10 pages\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=10></ic-pagination>`,\n });\n\n expect(page.root).toMatchSnapshot(\"render with ten pages\");\n });\n it(\"should render on the last page\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=\"15\" default-page=\"15\"></ic-pagination>`,\n });\n\n expect(page.root).toMatchSnapshot(\"render on the last page\");\n });\n\n it(\"should render with the default page selected\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=\"15\" default-page=4></ic-pagination>`,\n });\n\n expect(page.root).toMatchSnapshot(\"render at the default page\");\n });\n\n it(\"should render with first and last buttons disabled\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=\"15\" hide-first-page-button=true hide-last-page-button=true></ic-pagination>`,\n });\n\n expect(page.root).toMatchSnapshot(\"no first or last page button\");\n });\n it(\"should render without current page\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=\"15\" hide-current-page=true></ic-pagination>`,\n });\n\n expect(page.root).toMatchSnapshot(\"no current page\");\n });\n it(\"should render all pages when total pages less than min width based on boundary-count and adjacent-count\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination\n pages=\"11\"\n type=\"complex\"\n adjacent-count=\"2\"\n boundary-count=\"2\"></ic-pagination>`,\n });\n\n expect(page.root).toMatchSnapshot(\n \"pages less than adjacent-count + boundary-count\"\n );\n });\n it(\"should render with interactions disabled\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=\"15\" loading=true></ic-pagination>`,\n });\n\n expect(page.root).toMatchSnapshot(\"loading\");\n });\n it(\"should click the next page button\", async () => {\n const page = await newSpecPage({\n components: [Pagination, Button, PaginationItem],\n html: `<ic-pagination pages=\"15\"></ic-pagination>\n `,\n });\n\n const btn = (await page.root.shadowRoot.querySelector(\n \"#next-page-button\"\n )) as HTMLIcButtonElement;\n const pageEl = (await page.root.shadowRoot.querySelector(\n \"ic-pagination-item\"\n )) as HTMLIcPaginationItemElement;\n\n await btn.click();\n await page.waitForChanges();\n\n expect(pageEl.page).toBe(2);\n });\n\n it(\"should click the last page button\", async () => {\n const page = await newSpecPage({\n components: [Pagination, Button, PaginationItem],\n html: `<ic-pagination pages=\"15\"></ic-pagination>\n `,\n });\n\n const btn = (await page.root.shadowRoot.querySelector(\n \"#last-page-button\"\n )) as HTMLIcButtonElement;\n const pageEl = (await page.root.shadowRoot.querySelector(\n \"ic-pagination-item\"\n )) as HTMLIcPaginationItemElement;\n\n await btn.click();\n await page.waitForChanges();\n\n expect(pageEl.page).toBe(15);\n });\n it(\"should click the previous page button\", async () => {\n const page = await newSpecPage({\n components: [Pagination, Button, PaginationItem],\n html: `<ic-pagination pages=\"15\" default-page=5></ic-pagination>\n `,\n });\n\n const btn = (await page.root.shadowRoot.querySelector(\n \"#previous-page-button\"\n )) as HTMLIcButtonElement;\n const pageEl = (await page.root.shadowRoot.querySelector(\n \"ic-pagination-item\"\n )) as HTMLIcPaginationItemElement;\n\n await btn.click();\n await page.waitForChanges();\n\n expect(pageEl.page).toBe(4);\n });\n it(\"should click the first page button\", async () => {\n const page = await newSpecPage({\n components: [Pagination, Button, PaginationItem],\n html: `<ic-pagination pages=\"15\" default-page=5></ic-pagination>\n `,\n });\n\n const btn = (await page.root.shadowRoot.querySelector(\n \"#first-page-button\"\n )) as HTMLIcButtonElement;\n const pageEl = (await page.root.shadowRoot.querySelector(\n \"ic-pagination-item\"\n )) as HTMLIcPaginationItemElement;\n\n await btn.click();\n await page.waitForChanges();\n\n expect(pageEl.page).toBe(1);\n });\n});\ndescribe(\"ic-pagination complex type\", () => {\n it(\"should render as complex type\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15 type='complex'></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\"render complex pagination\");\n });\n\n it(\"should render as complex type without first page button\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15 type='complex' hide-first-page-button=true></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex pagination with no first page button\"\n );\n });\n\n it(\"should render as complex type without last page button\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15 type='complex' hide-last-page-button=true></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex pagination with no last page button\"\n );\n });\n\n it(\"should render as complex type with 20 pages\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination type=\"complex\" pages=20></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex pagination with 20 pages\"\n );\n });\n\n it(\"should render as complex type with 0 adjacent items and 0 boundary items\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination\n pages=15\n type=\"complex\"\n adjacent-count=0\n ></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex type with 0 adjacent items and 0 boundary items\"\n );\n });\n\n it(\"should render as complex type with 0 adjacent items and 0 boundary items with default page set at 7\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15 type=\"complex\" adjacent-count=0 boundary-count=0 default-page=7></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex type with 0 adjacent items and 0 boundary items and default page 7\"\n );\n });\n\n it(\"should render as complex type with 0 adjacent items and 0 boundary items with default page set at 15\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15 type=\"complex\" adjacent-count=0 boundary-count=0 default-page=15></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex type with 0 adjacent items and 0 boundary items and default page 15\"\n );\n });\n\n it(\"should render in complex type with 1 adjacent items and 0 boundary items\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15 type=\"complex\" adjacent-count=1 boundary-count=0></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex type with 1 adjacent items and 0 boundary items\"\n );\n });\n\n it(\"should render as complex type with 2 adjacent items and 0 boundary items\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15 type=\"complex\" adjacent-count=2 boundary-count=0></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex type with 2 adjacent items and 0 boundary items\"\n );\n });\n\n it(\"should render as complex type with 0 adjacent items and 1 boundary items\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15 type=\"complex\" adjacent-count=0 boundary-count=1></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex type with 0 adjacent items and 1 boundary items\"\n );\n });\n\n it(\"should render as complex type with 0 adjacent items and 2 boundary items\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15 type=\"complex\" adjacent-count=0 boundary-count=2></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex type with 0 adjacent items and 2 boundary items\"\n );\n });\n\n it(\"should render as complex type with 1 adjacent items and 2 boundary items\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15 type=\"complex\" adjacent-count=1 boundary-count=2></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex type with 1 adjacent items and 2 boundary items\"\n );\n });\n\n it(\"should render as complex type with 2 adjacent items and 1 boundary items\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15 type=\"complex\" adjacent-count=2 boundary-count=1></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex type with 2 adjacent items and 1 boundary items\"\n );\n });\n\n it(\"should render as complex type with 2 adjacent items and 2 boundary items\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15 type=\"complex\" adjacent-count=2 boundary-count=2></ic-pagination>`,\n });\n expect(page.root).toMatchSnapshot(\n \"render complex type with 2 adjacent items and 2 boundary items\"\n );\n });\n\n it(\"should click the next page button in complex type\", async () => {\n const page = await newSpecPage({\n components: [Pagination, Button, PaginationItem],\n html: `<ic-pagination pages=15 type=\"complex\" default-page=5></ic-pagination>\n `,\n });\n\n const btn = (await page.root.shadowRoot.querySelector(\n \"#next-page-button\"\n )) as HTMLIcButtonElement;\n const pageEl = (await page.root.shadowRoot.querySelector(\n \"ic-pagination-item\"\n )) as HTMLIcPaginationItemElement;\n\n await btn.click();\n await page.waitForChanges();\n\n expect(pageEl.page).toBe(1);\n });\n it(\"should click the previous page button in complex type\", async () => {\n const page = await newSpecPage({\n components: [Pagination, Button, PaginationItem],\n html: `<ic-pagination pages=\"15\" type=\"complex\" default-page=5></ic-pagination>\n `,\n });\n\n const btn = (await page.root.shadowRoot.querySelector(\n \"#previous-page-button\"\n )) as HTMLIcButtonElement;\n const pageEl = (await page.root.shadowRoot.querySelector(\n \"ic-pagination-item\"\n )) as HTMLIcPaginationItemElement;\n\n await btn.click();\n await page.waitForChanges();\n\n expect(pageEl.page).toBe(1);\n });\n it(\"should click the last page button in complex type\", async () => {\n const page = await newSpecPage({\n components: [Pagination, Button, PaginationItem],\n html: `<ic-pagination pages=\"15\" type=\"complex\" default-page=5></ic-pagination>\n `,\n });\n\n const btn = (await page.root.shadowRoot.querySelector(\n \"#last-page-button\"\n )) as HTMLIcButtonElement;\n const pageEl = (await page.root.shadowRoot.querySelector(\n \"ic-pagination-item\"\n )) as HTMLIcPaginationItemElement;\n\n await btn.click();\n await page.waitForChanges();\n\n expect(pageEl.page).toBe(1);\n });\n it(\"should click the first page button in complex type\", async () => {\n const page = await newSpecPage({\n components: [Pagination, Button, PaginationItem],\n html: `<ic-pagination pages=\"15\" type=\"complex\" default-page=\"15\"></ic-pagination>\n `,\n });\n\n const btn = (await page.root.shadowRoot.querySelector(\n \"#first-page-button\"\n )) as HTMLIcButtonElement;\n const pageEl = (await page.root.shadowRoot.querySelector(\n \"ic-pagination-item\"\n )) as HTMLIcPaginationItemElement;\n\n await pageEl.click();\n await btn.click();\n await page.waitForChanges();\n\n expect(pageEl.page).toBe(1);\n });\n it(\"should click the pagination-item in complex type\", async () => {\n const page = await newSpecPage({\n components: [Pagination, Button, PaginationItem],\n html: `<ic-pagination pages=\"15\" type=\"complex\" default-page=2></ic-pagination>\n `,\n });\n\n const icPagItem = (await page.root.shadowRoot.querySelector(\n \"ic-pagination-item\"\n )) as HTMLIcPaginationItemElement;\n\n const btn = (await icPagItem.shadowRoot.querySelector(\n \".item-container.default.page\"\n )) as AnyHTMLElement;\n\n await btn.click();\n await icPagItem.click();\n await page.waitForChanges();\n\n expect(icPagItem.page).toBe(1);\n });\n\n it(\"should emit an event\", async () => {\n const page = await newSpecPage({\n components: [Pagination, Button, PaginationItem],\n html: `<ic-pagination pages=\"15\" type=\"complex\" default-page=2></ic-pagination>\n `,\n });\n await page.rootInstance.paginationItemClickHandler({ detail: { page: 1 } });\n await page.waitForChanges();\n\n expect(page.root.currentPage).toBe(1);\n });\n});\ndescribe(\"ic-pagination appearance tests\", () => {\n it(\"should render as simple type in dark appearance\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=\"15\" appearance='dark'></ic-pagination>`,\n });\n\n expect(page.root).toMatchSnapshot(\"render dark simple pagination\");\n });\n it(\"should render as simple type in light appearance\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=\"15\" appearance='light'></ic-pagination>`,\n });\n\n expect(page.root).toMatchSnapshot(\"render light simple pagination\");\n });\n it(\"should render as complex type in dark appearance\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=\"15\" type='complex' appearance='dark'></ic-pagination>`,\n });\n\n expect(page.root).toMatchSnapshot(\"render dark complex pagination\");\n });\n it(\"should render as complex type in light appearance\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=\"15\" type='complex' appearance='light'></ic-pagination>`,\n });\n\n expect(page.root).toMatchSnapshot(\"render light complex pagination\");\n });\n\n it(\"should change page when current page set with public method\", async () => {\n const page = await newSpecPage({\n components: [Pagination, Button, PaginationItem],\n html: `<ic-pagination pages=\"15\" type=\"complex\"></ic-pagination>\n `,\n });\n expect(page.rootInstance.currentPage).toBe(1);\n\n await page.root.setCurrentPage(3);\n await page.waitForChanges();\n\n expect(page.rootInstance.currentPage).toBe(3);\n });\n\n it(\"should update number of pages dynamically if the prop is updated\", async () => {\n const page = await newSpecPage({\n components: [Pagination],\n html: `<ic-pagination pages=15></ic-pagination>`,\n });\n\n expect(page.rootInstance.pages).toEqual(15);\n\n jest.spyOn(console, \"warn\").mockImplementation(jest.fn());\n\n page.rootInstance.pages = 7;\n\n await page.waitForChanges();\n\n expect(page.rootInstance.pages).toEqual(7);\n });\n});\n"]}
|
@@ -4,7 +4,6 @@ import { createPopper } from "@popperjs/core";
|
|
4
4
|
export class PopoverMenu {
|
5
5
|
constructor() {
|
6
6
|
this.ARIA_LABEL = "aria-label";
|
7
|
-
this.firstRender = true;
|
8
7
|
this.popoverMenuEls = [];
|
9
8
|
this.setButtonFocus = () => {
|
10
9
|
var _a;
|
@@ -78,6 +77,26 @@ export class PopoverMenu {
|
|
78
77
|
this.parentPopover.openFromChild();
|
79
78
|
this.open = false;
|
80
79
|
};
|
80
|
+
this.initPopperJS = () => {
|
81
|
+
this.popperInstance = createPopper(this.anchorEl, this.el, {
|
82
|
+
placement: "bottom-start",
|
83
|
+
modifiers: [
|
84
|
+
{
|
85
|
+
name: "offset",
|
86
|
+
options: {
|
87
|
+
offset: [0, 4],
|
88
|
+
},
|
89
|
+
},
|
90
|
+
{
|
91
|
+
name: "flip",
|
92
|
+
options: {
|
93
|
+
fallbackPlacements: ["top-start", "top-end", "bottom-end"],
|
94
|
+
rootBoundary: "viewport",
|
95
|
+
},
|
96
|
+
},
|
97
|
+
],
|
98
|
+
});
|
99
|
+
};
|
81
100
|
this.openingFromChild = false;
|
82
101
|
this.openingFromParent = false;
|
83
102
|
this.anchor = undefined;
|
@@ -97,6 +116,12 @@ export class PopoverMenu {
|
|
97
116
|
// Needed so that anchorEl isn't always focused
|
98
117
|
setTimeout(this.setButtonFocus, 50);
|
99
118
|
}
|
119
|
+
else {
|
120
|
+
if (this.popperInstance) {
|
121
|
+
this.popperInstance.destroy();
|
122
|
+
this.popperInstance = null;
|
123
|
+
}
|
124
|
+
}
|
100
125
|
}
|
101
126
|
disconnectedCallback() {
|
102
127
|
if (this.popperInstance !== undefined) {
|
@@ -118,64 +143,8 @@ export class PopoverMenu {
|
|
118
143
|
this.anchorEl = this.findAnchorEl(this.anchor);
|
119
144
|
}
|
120
145
|
componentDidRender() {
|
121
|
-
if (this.
|
122
|
-
this.
|
123
|
-
let adjust = false;
|
124
|
-
const dialogEl = this.el.closest("ic-dialog");
|
125
|
-
const onDialog = dialogEl !== null;
|
126
|
-
if (onDialog) {
|
127
|
-
this.el.classList.add("on-dialog");
|
128
|
-
const menu = this.el.getBoundingClientRect();
|
129
|
-
const dialogBottom = dialogEl.getBoundingClientRect().bottom;
|
130
|
-
const anchorHeight = this.anchorEl.getBoundingClientRect().height;
|
131
|
-
let offset;
|
132
|
-
if (dialogEl.getAttribute("data-overflow") === "false") {
|
133
|
-
if (dialogBottom - menu.top < menu.height) {
|
134
|
-
adjust = true;
|
135
|
-
offset = menu.height + anchorHeight + 8;
|
136
|
-
}
|
137
|
-
}
|
138
|
-
else {
|
139
|
-
adjust = true;
|
140
|
-
// 100 added here as that's the offset when data-overflow is true
|
141
|
-
offset = menu.height + anchorHeight + 8 + 100;
|
142
|
-
}
|
143
|
-
if (adjust === false) {
|
144
|
-
this.el.classList.add("on-dialog-fix-translate");
|
145
|
-
}
|
146
|
-
else {
|
147
|
-
this.el.style.setProperty("--translate-y", `${offset}px`, "important");
|
148
|
-
this.el.classList.add("on-dialog-translate-y");
|
149
|
-
}
|
150
|
-
}
|
151
|
-
if (adjust) {
|
152
|
-
this.popperInstance = createPopper(this.anchorEl, this.el, {
|
153
|
-
placement: "top",
|
154
|
-
});
|
155
|
-
}
|
156
|
-
else {
|
157
|
-
this.popperInstance = createPopper(this.anchorEl, this.el, {
|
158
|
-
placement: "bottom-start",
|
159
|
-
modifiers: [
|
160
|
-
{
|
161
|
-
name: "offset",
|
162
|
-
options: {
|
163
|
-
offset: [0, 4],
|
164
|
-
},
|
165
|
-
},
|
166
|
-
{
|
167
|
-
name: "flip",
|
168
|
-
options: {
|
169
|
-
fallbackPlacements: ["top-start", "top-end", "bottom-end"],
|
170
|
-
rootBoundary: "viewport",
|
171
|
-
},
|
172
|
-
},
|
173
|
-
],
|
174
|
-
});
|
175
|
-
}
|
176
|
-
}
|
177
|
-
else if (this.open) {
|
178
|
-
this.popperInstance.update();
|
146
|
+
if (this.open && !this.popperInstance) {
|
147
|
+
this.initPopperJS();
|
179
148
|
}
|
180
149
|
}
|
181
150
|
handleMenuItemClick(ev) {
|