@dimailn/vuetify 2.7.2-alpha27 → 2.7.2-alpha29
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/vuetify.js +1493 -325
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +1 -1
- package/dist/vuetify.min.js +2 -2
- package/es5/components/VAlert/VAlert.js +38 -9
- package/es5/components/VAlert/VAlert.js.map +1 -1
- package/es5/components/VAutocomplete/VAutocomplete.js +1 -0
- package/es5/components/VAutocomplete/VAutocomplete.js.map +1 -1
- package/es5/components/VBadge/VBadge.js +28 -0
- package/es5/components/VBadge/VBadge.js.map +1 -1
- package/es5/components/VBanner/VBanner.js +34 -6
- package/es5/components/VBanner/VBanner.js.map +1 -1
- package/es5/components/VBottomNavigation/VBottomNavigation.js +25 -0
- package/es5/components/VBottomNavigation/VBottomNavigation.js.map +1 -1
- package/es5/components/VCarousel/VCarousel.js +28 -3
- package/es5/components/VCarousel/VCarousel.js.map +1 -1
- package/es5/components/VCheckbox/VSimpleCheckbox.js +30 -2
- package/es5/components/VCheckbox/VSimpleCheckbox.js.map +1 -1
- package/es5/components/VChip/VChip.js +1 -0
- package/es5/components/VChip/VChip.js.map +1 -1
- package/es5/components/VColorPicker/VColorPicker.js +30 -2
- package/es5/components/VColorPicker/VColorPicker.js.map +1 -1
- package/es5/components/VCombobox/VCombobox.js +1 -0
- package/es5/components/VCombobox/VCombobox.js.map +1 -1
- package/es5/components/VDataIterator/VDataFooter.js +16 -7
- package/es5/components/VDataIterator/VDataFooter.js.map +1 -1
- package/es5/components/VDataIterator/VDataIterator.js +42 -47
- package/es5/components/VDataIterator/VDataIterator.js.map +1 -1
- package/es5/components/VDataTable/RowGroup.js +46 -15
- package/es5/components/VDataTable/RowGroup.js.map +1 -1
- package/es5/components/VDataTable/VDataTable.js +10 -18
- package/es5/components/VDataTable/VDataTable.js.map +1 -1
- package/es5/components/VDataTable/VDataTableHeader.js.map +1 -1
- package/es5/components/VDataTable/VDataTableHeaderDesktop.js +3 -0
- package/es5/components/VDataTable/VDataTableHeaderDesktop.js.map +1 -1
- package/es5/components/VDataTable/VDataTableHeaderMobile.js +28 -37
- package/es5/components/VDataTable/VDataTableHeaderMobile.js.map +1 -1
- package/es5/components/VDataTable/VEditDialog.js +3 -4
- package/es5/components/VDataTable/VEditDialog.js.map +1 -1
- package/es5/components/VDataTable/VSimpleTable.js +1 -1
- package/es5/components/VDataTable/VSimpleTable.js.map +1 -1
- package/es5/components/VDataTable/VVirtualTable.js +5 -5
- package/es5/components/VDataTable/VVirtualTable.js.map +1 -1
- package/es5/components/VDataTable/mixins/header.js +1 -1
- package/es5/components/VDataTable/mixins/header.js.map +1 -1
- package/es5/components/VDatePicker/VDatePicker.js +21 -9
- package/es5/components/VDatePicker/VDatePicker.js.map +1 -1
- package/es5/components/VDatePicker/VDatePickerHeader.js +24 -8
- package/es5/components/VDatePicker/VDatePickerHeader.js.map +1 -1
- package/es5/components/VDatePicker/VDatePickerTitle.js +33 -8
- package/es5/components/VDatePicker/VDatePickerTitle.js.map +1 -1
- package/es5/components/VDatePicker/VDatePickerYears.js +38 -13
- package/es5/components/VDatePicker/VDatePickerYears.js.map +1 -1
- package/es5/components/VDatePicker/mixins/date-picker-table.js +33 -17
- package/es5/components/VDatePicker/mixins/date-picker-table.js.map +1 -1
- package/es5/components/VInput/VInput.js +36 -8
- package/es5/components/VInput/VInput.js.map +1 -1
- package/es5/components/VList/VListGroup.js +47 -21
- package/es5/components/VList/VListGroup.js.map +1 -1
- package/es5/components/VList/VListItem.js +33 -6
- package/es5/components/VList/VListItem.js.map +1 -1
- package/es5/components/VMenu/VMenu.js +56 -31
- package/es5/components/VMenu/VMenu.js.map +1 -1
- package/es5/components/VMessages/VMessages.js +30 -7
- package/es5/components/VMessages/VMessages.js.map +1 -1
- package/es5/components/VNavigationDrawer/VNavigationDrawer.js +36 -9
- package/es5/components/VNavigationDrawer/VNavigationDrawer.js.map +1 -1
- package/es5/components/VOtpInput/VOtpInput.js +36 -0
- package/es5/components/VOtpInput/VOtpInput.js.map +1 -1
- package/es5/components/VOverlay/VOverlay.js +28 -0
- package/es5/components/VOverlay/VOverlay.js.map +1 -1
- package/es5/components/VPagination/VPagination.js +30 -6
- package/es5/components/VPagination/VPagination.js.map +1 -1
- package/es5/components/VProgressLinear/VProgressLinear.js +28 -0
- package/es5/components/VProgressLinear/VProgressLinear.js.map +1 -1
- package/es5/components/VRadioGroup/VRadioGroup.js +28 -0
- package/es5/components/VRadioGroup/VRadioGroup.js.map +1 -1
- package/es5/components/VRating/VRating.js +45 -17
- package/es5/components/VRating/VRating.js.map +1 -1
- package/es5/components/VSelect/VSelect.js +112 -84
- package/es5/components/VSelect/VSelect.js.map +1 -1
- package/es5/components/VSelect/VSelectList.js +73 -19
- package/es5/components/VSelect/VSelectList.js.map +1 -1
- package/es5/components/VSlider/VSlider.js +42 -16
- package/es5/components/VSlider/VSlider.js.map +1 -1
- package/es5/components/VSpeedDial/VSpeedDial.js +10 -8
- package/es5/components/VSpeedDial/VSpeedDial.js.map +1 -1
- package/es5/components/VTabs/VTabs.js +45 -17
- package/es5/components/VTabs/VTabs.js.map +1 -1
- package/es5/components/VTooltip/VTooltip.js +3 -3
- package/es5/components/VTooltip/VTooltip.js.map +1 -1
- package/es5/components/VTreeview/VTreeview.js +0 -7
- package/es5/components/VTreeview/VTreeview.js.map +1 -1
- package/es5/framework.js +1 -1
- package/es5/mixins/routable/index.js +5 -2
- package/es5/mixins/routable/index.js.map +1 -1
- package/es5/mixins/validatable/index.js +24 -0
- package/es5/mixins/validatable/index.js.map +1 -1
- package/es5/util/console.js +49 -18
- package/es5/util/console.js.map +1 -1
- package/es5/util/helpers.js +5 -1
- package/es5/util/helpers.js.map +1 -1
- package/lib/components/VAlert/VAlert.js +12 -7
- package/lib/components/VAlert/VAlert.js.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.js +1 -0
- package/lib/components/VAutocomplete/VAutocomplete.js.map +1 -1
- package/lib/components/VBadge/VBadge.js +11 -0
- package/lib/components/VBadge/VBadge.js.map +1 -1
- package/lib/components/VBanner/VBanner.js +11 -0
- package/lib/components/VBanner/VBanner.js.map +1 -1
- package/lib/components/VBottomNavigation/VBottomNavigation.js +7 -0
- package/lib/components/VBottomNavigation/VBottomNavigation.js.map +1 -1
- package/lib/components/VCarousel/VCarousel.js +7 -0
- package/lib/components/VCarousel/VCarousel.js.map +1 -1
- package/lib/components/VCheckbox/VSimpleCheckbox.js +11 -0
- package/lib/components/VCheckbox/VSimpleCheckbox.js.map +1 -1
- package/lib/components/VChip/VChip.js +1 -0
- package/lib/components/VChip/VChip.js.map +1 -1
- package/lib/components/VColorPicker/VColorPicker.js +12 -1
- package/lib/components/VColorPicker/VColorPicker.js.map +1 -1
- package/lib/components/VCombobox/VCombobox.js +1 -0
- package/lib/components/VCombobox/VCombobox.js.map +1 -1
- package/lib/components/VDataIterator/VDataFooter.js +14 -7
- package/lib/components/VDataIterator/VDataFooter.js.map +1 -1
- package/lib/components/VDataIterator/VDataIterator.js +26 -31
- package/lib/components/VDataIterator/VDataIterator.js.map +1 -1
- package/lib/components/VDataTable/RowGroup.js +30 -14
- package/lib/components/VDataTable/RowGroup.js.map +1 -1
- package/lib/components/VDataTable/VDataTable.js +8 -15
- package/lib/components/VDataTable/VDataTable.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeader.js +1 -1
- package/lib/components/VDataTable/VDataTableHeader.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaderDesktop.js +3 -0
- package/lib/components/VDataTable/VDataTableHeaderDesktop.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaderMobile.js +17 -25
- package/lib/components/VDataTable/VDataTableHeaderMobile.js.map +1 -1
- package/lib/components/VDataTable/VEditDialog.js +3 -4
- package/lib/components/VDataTable/VEditDialog.js.map +1 -1
- package/lib/components/VDataTable/VSimpleTable.js +1 -1
- package/lib/components/VDataTable/VSimpleTable.js.map +1 -1
- package/lib/components/VDataTable/VVirtualTable.js +1 -2
- package/lib/components/VDataTable/VVirtualTable.js.map +1 -1
- package/lib/components/VDataTable/mixins/header.js +1 -1
- package/lib/components/VDataTable/mixins/header.js.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.js +7 -1
- package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerHeader.js +12 -1
- package/lib/components/VDatePicker/VDatePickerHeader.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerTitle.js +11 -0
- package/lib/components/VDatePicker/VDatePickerTitle.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerYears.js +11 -1
- package/lib/components/VDatePicker/VDatePickerYears.js.map +1 -1
- package/lib/components/VDatePicker/mixins/date-picker-table.js +12 -1
- package/lib/components/VDatePicker/mixins/date-picker-table.js.map +1 -1
- package/lib/components/VInput/VInput.js +13 -3
- package/lib/components/VInput/VInput.js.map +1 -1
- package/lib/components/VList/VListGroup.js +16 -8
- package/lib/components/VList/VListGroup.js.map +1 -1
- package/lib/components/VList/VListItem.js +12 -3
- package/lib/components/VList/VListItem.js.map +1 -1
- package/lib/components/VMenu/VMenu.js +15 -4
- package/lib/components/VMenu/VMenu.js.map +1 -1
- package/lib/components/VMessages/VMessages.js +13 -2
- package/lib/components/VMessages/VMessages.js.map +1 -1
- package/lib/components/VNavigationDrawer/VNavigationDrawer.js +11 -2
- package/lib/components/VNavigationDrawer/VNavigationDrawer.js.map +1 -1
- package/lib/components/VOtpInput/VOtpInput.js +48 -0
- package/lib/components/VOtpInput/VOtpInput.js.map +1 -1
- package/lib/components/VOverlay/VOverlay.js +11 -0
- package/lib/components/VOverlay/VOverlay.js.map +1 -1
- package/lib/components/VPagination/VPagination.js +11 -0
- package/lib/components/VPagination/VPagination.js.map +1 -1
- package/lib/components/VProgressLinear/VProgressLinear.js +11 -0
- package/lib/components/VProgressLinear/VProgressLinear.js.map +1 -1
- package/lib/components/VRadioGroup/VRadioGroup.js +11 -0
- package/lib/components/VRadioGroup/VRadioGroup.js.map +1 -1
- package/lib/components/VRating/VRating.js +11 -0
- package/lib/components/VRating/VRating.js.map +1 -1
- package/lib/components/VSelect/VSelect.js +52 -36
- package/lib/components/VSelect/VSelect.js.map +1 -1
- package/lib/components/VSelect/VSelectList.js +32 -8
- package/lib/components/VSelect/VSelectList.js.map +1 -1
- package/lib/components/VSlider/VSlider.js +11 -1
- package/lib/components/VSlider/VSlider.js.map +1 -1
- package/lib/components/VSpeedDial/VSpeedDial.js +7 -7
- package/lib/components/VSpeedDial/VSpeedDial.js.map +1 -1
- package/lib/components/VTabs/VTabs.js +11 -0
- package/lib/components/VTabs/VTabs.js.map +1 -1
- package/lib/components/VTooltip/VTooltip.js +3 -3
- package/lib/components/VTooltip/VTooltip.js.map +1 -1
- package/lib/components/VTreeview/VTreeview.js +0 -6
- package/lib/components/VTreeview/VTreeview.js.map +1 -1
- package/lib/framework.js +1 -1
- package/lib/mixins/routable/index.js +5 -2
- package/lib/mixins/routable/index.js.map +1 -1
- package/lib/mixins/validatable/index.js +7 -1
- package/lib/mixins/validatable/index.js.map +1 -1
- package/lib/util/console.js +47 -17
- package/lib/util/console.js.map +1 -1
- package/lib/util/helpers.js +5 -1
- package/lib/util/helpers.js.map +1 -1
- package/package.json +1 -1
- package/src/components/VAlert/VAlert.ts +17 -8
- package/src/components/VAlert/__tests__/VAlert.spec.ts +78 -50
- package/src/components/VAlert/__tests__/__snapshots__/VAlert.spec.ts.snap +16 -18
- package/src/components/VApp/__tests__/VApp.spec.ts +24 -18
- package/src/components/VApp/__tests__/__snapshots__/VApp.spec.ts.snap +4 -4
- package/src/components/VAppBar/__tests__/VAppBar.spec.ts +256 -74
- package/src/components/VAppBar/__tests__/VAppBarNavIcon.spec.ts +2 -6
- package/src/components/VAppBar/__tests__/__snapshots__/VAppBar.spec.ts.snap +13 -4
- package/src/components/VAppBar/__tests__/__snapshots__/VAppBarNavIcon.spec.ts.snap +3 -4
- package/src/components/VAutocomplete/VAutocomplete.ts +22 -0
- package/src/components/VAutocomplete/__tests__/VAutocomplete.spec.ts +51 -53
- package/src/components/VAutocomplete/__tests__/VAutocomplete2.spec.ts +77 -48
- package/src/components/VAutocomplete/__tests__/VAutocomplete3.spec.ts +101 -39
- package/src/components/VBadge/VBadge.ts +13 -0
- package/src/components/VBanner/VBanner.ts +13 -0
- package/src/components/VBanner/__tests__/VBanner.spec.ts +35 -36
- package/src/components/VBanner/__tests__/__snapshots__/VBanner.spec.ts.snap +1 -1
- package/src/components/VBottomNavigation/VBottomNavigation.ts +10 -0
- package/src/components/VBtn/__tests__/VBtn.spec.ts +1 -1
- package/src/components/VCard/__tests__/VCard.spec.ts +46 -28
- package/src/components/VCard/__tests__/__snapshots__/VCard.spec.ts.snap +2 -2
- package/src/components/VCarousel/VCarousel.ts +11 -0
- package/src/components/VCheckbox/VSimpleCheckbox.ts +13 -0
- package/src/components/VCheckbox/__tests__/VCheckbox.spec.ts +157 -152
- package/src/components/VChip/VChip.ts +1 -0
- package/src/components/VChip/__tests__/VChip.spec.ts +50 -50
- package/src/components/VChip/__tests__/__snapshots__/VChip.spec.ts.snap +4 -4
- package/src/components/VChipGroup/__tests__/VChipGroup.spec.ts +14 -21
- package/src/components/VColorPicker/VColorPicker.ts +13 -0
- package/src/components/VColorPicker/__tests__/__snapshots__/VColorPicker.spec.ts.snap +35 -35
- package/src/components/VColorPicker/__tests__/__snapshots__/VColorPickerEdit.spec.ts.snap +10 -10
- package/src/components/VCombobox/VCombobox.ts +23 -0
- package/src/components/VCombobox/__tests__/VCombobox-multiple.spec.ts +118 -110
- package/src/components/VCombobox/__tests__/VCombobox.spec.ts +119 -93
- package/src/components/VData/__tests__/VData.spec.ts +69 -90
- package/src/components/VDataIterator/VDataFooter.ts +14 -9
- package/src/components/VDataIterator/VDataIterator.ts +46 -34
- package/src/components/VDataIterator/__tests__/VDataFooter.spec.ts +38 -39
- package/src/components/VDataIterator/__tests__/VDataIterator.spec.ts +90 -122
- package/src/components/VDataIterator/__tests__/__snapshots__/VDataFooter.spec.ts.snap +92 -82
- package/src/components/VDataIterator/__tests__/__snapshots__/VDataIterator.spec.ts.snap +79 -69
- package/src/components/VDataTable/RowGroup.ts +33 -16
- package/src/components/VDataTable/VDataTable.ts +8 -15
- package/src/components/VDataTable/VDataTableHeader.ts +2 -2
- package/src/components/VDataTable/VDataTableHeaderDesktop.ts +4 -0
- package/src/components/VDataTable/VDataTableHeaderMobile.ts +16 -25
- package/src/components/VDataTable/VEditDialog.ts +3 -3
- package/src/components/VDataTable/VSimpleTable.ts +2 -3
- package/src/components/VDataTable/VVirtualTable.ts +1 -2
- package/src/components/VDataTable/__tests__/MobileRow.spec.ts +55 -66
- package/src/components/VDataTable/__tests__/Row.spec.ts +64 -73
- package/src/components/VDataTable/__tests__/RowGroup.spec.ts +7 -5
- package/src/components/VDataTable/__tests__/VDataTable.spec.ts +916 -998
- package/src/components/VDataTable/__tests__/VDataTableHeader.spec.ts +39 -29
- package/src/components/VDataTable/__tests__/VEditDialog.spec.ts +33 -24
- package/src/components/VDataTable/__tests__/VSimpleTable.spec.ts +55 -29
- package/src/components/VDataTable/__tests__/VVirtualTable.spec.ts +13 -15
- package/src/components/VDataTable/__tests__/__snapshots__/Row.spec.ts.snap +30 -0
- package/src/components/VDataTable/__tests__/__snapshots__/VDataTable.spec.ts.snap +2543 -2086
- package/src/components/VDataTable/__tests__/__snapshots__/VDataTableHeader.spec.ts.snap +115 -144
- package/src/components/VDataTable/__tests__/__snapshots__/VEditDialog.spec.ts.snap +6 -6
- package/src/components/VDataTable/__tests__/__snapshots__/VSimpleTable.spec.ts.snap +22 -18
- package/src/components/VDataTable/mixins/__tests__/__snapshots__/header.spec.ts.snap +10 -13
- package/src/components/VDataTable/mixins/__tests__/header.spec.ts +15 -15
- package/src/components/VDataTable/mixins/header.ts +1 -1
- package/src/components/VDatePicker/VDatePicker.ts +11 -1
- package/src/components/VDatePicker/VDatePickerHeader.ts +13 -0
- package/src/components/VDatePicker/VDatePickerTitle.ts +12 -0
- package/src/components/VDatePicker/VDatePickerYears.ts +13 -0
- package/src/components/VDatePicker/mixins/date-picker-table.ts +13 -0
- package/src/components/VDivider/__tests__/VDivider.spec.ts +11 -15
- package/src/components/VDivider/__tests__/__snapshots__/VDivider.spec.ts.snap +2 -2
- package/src/components/VGrid/__tests__/VCol.spec.ts +17 -17
- package/src/components/VGrid/__tests__/VContainer.spec.ts +58 -3
- package/src/components/VGrid/__tests__/VFlex.spec.ts +3 -3
- package/src/components/VGrid/__tests__/VGrid.spec.ts +12 -10
- package/src/components/VGrid/__tests__/VLayout.spec.ts +3 -3
- package/src/components/VIcon/__tests__/VIcon.spec.ts +176 -70
- package/src/components/VImg/__tests__/__snapshots__/VImg.spec.ts.snap +55 -55
- package/src/components/VInput/VInput.ts +18 -5
- package/src/components/VItemGroup/__tests__/VItem.spec.ts +22 -37
- package/src/components/VItemGroup/__tests__/VItemGroup.spec.ts +96 -124
- package/src/components/VItemGroup/__tests__/__snapshots__/VItem.spec.ts.snap +2 -0
- package/src/components/VLabel/__tests__/VLabel.spec.ts +240 -14
- package/src/components/VLazy/__tests__/VLazy.spec.ts +5 -4
- package/src/components/VLazy/__tests__/__snapshots__/VLazy.spec.ts.snap +2 -1
- package/src/components/VList/VListGroup.ts +22 -10
- package/src/components/VList/VListItem.ts +19 -4
- package/src/components/VList/__tests__/VList.spec.ts +13 -12
- package/src/components/VList/__tests__/VListGroup.spec.ts +59 -51
- package/src/components/VList/__tests__/VListItem.spec.ts +142 -63
- package/src/components/VList/__tests__/VListItemAvatar.spec.ts +5 -2
- package/src/components/VList/__tests__/VListItemGroup.spec.ts +5 -2
- package/src/components/VList/__tests__/__snapshots__/VList.spec.ts.snap +10 -10
- package/src/components/VList/__tests__/__snapshots__/VListGroup.spec.ts.snap +5 -6
- package/src/components/VList/__tests__/__snapshots__/VListItem.spec.ts.snap +1 -1
- package/src/components/VMain/__tests__/VMain.spec.ts +71 -17
- package/src/components/VMenu/VMenu.ts +22 -4
- package/src/components/VMenu/__tests__/VMenu.spec.ts +90 -69
- package/src/components/VMenu/__tests__/__snapshots__/VMenu.spec.ts.snap +3 -5
- package/src/components/VMessages/VMessages.ts +15 -4
- package/src/components/VMessages/__tests__/VMessages.spec.ts +55 -16
- package/src/components/VMessages/__tests__/__snapshots__/VMessages.spec.ts.snap +16 -25
- package/src/components/VNavigationDrawer/VNavigationDrawer.ts +21 -11
- package/src/components/VOtpInput/VOtpInput.ts +37 -1
- package/src/components/VOverlay/VOverlay.ts +12 -0
- package/src/components/VPagination/VPagination.ts +23 -9
- package/src/components/VParallax/__tests__/__snapshots__/VParallax.spec.ts.snap +8 -8
- package/src/components/VPicker/__tests__/__snapshots__/VPicker.spec.ts.snap +2 -2
- package/src/components/VProgressLinear/VProgressLinear.ts +13 -0
- package/src/components/VRadioGroup/VRadioGroup.ts +14 -0
- package/src/components/VRating/VRating.ts +13 -0
- package/src/components/VResponsive/__tests__/__snapshots__/VResponsive.spec.ts.snap +2 -2
- package/src/components/VSelect/VSelect.ts +60 -43
- package/src/components/VSelect/VSelectList.ts +33 -12
- package/src/components/VSelect/__tests__/VSelect.spec.ts +166 -125
- package/src/components/VSelect/__tests__/VSelect2.spec.ts +127 -111
- package/src/components/VSelect/__tests__/VSelect3.spec.ts +109 -91
- package/src/components/VSelect/__tests__/VSelect4.spec.ts +79 -68
- package/src/components/VSelect/__tests__/VSelectList.spec.ts +23 -31
- package/src/components/VSelect/__tests__/__snapshots__/VSelect.spec.ts.snap +58 -62
- package/src/components/VSelect/__tests__/__snapshots__/VSelect2.spec.ts.snap +50 -62
- package/src/components/VSelect/__tests__/__snapshots__/VSelect3.spec.ts.snap +10 -14
- package/src/components/VSlider/VSlider.ts +14 -1
- package/src/components/VSparkline/__tests__/VSparkline.spec.ts +33 -35
- package/src/components/VSpeedDial/VSpeedDial.ts +7 -8
- package/src/components/VSpeedDial/__tests__/VSpeedDial.spec.ts +21 -13
- package/src/components/VSpeedDial/__tests__/__snapshots__/VSpeedDial.spec.ts.snap +6 -6
- package/src/components/VStepper/__tests__/VStepper.spec.ts +4 -1
- package/src/components/VStepper/__tests__/VStepperContent.spec.ts +104 -110
- package/src/components/VStepper/__tests__/VStepperStep.spec.ts +51 -44
- package/src/components/VSwitch/__tests__/VSwitch.spec.ts +30 -37
- package/src/components/VTabs/VTabs.ts +14 -0
- package/src/components/VTabs/__tests__/VTabs.spec.ts +0 -7
- package/src/components/VTextField/__tests__/VTextField.spec.ts +342 -246
- package/src/components/VTextarea/__tests__/VTextarea.spec.ts +112 -35
- package/src/components/VTimePicker/__tests__/__snapshots__/VTimePicker.spec.ts.snap +0 -40
- package/src/components/VToolbar/__tests__/VToolbar.spec.ts +49 -25
- package/src/components/VTooltip/VTooltip.ts +3 -3
- package/src/components/VTooltip/__tests__/__snapshots__/VTooltip.spec.ts.snap +34 -18
- package/src/components/VTreeview/VTreeview.ts +0 -5
- package/src/mixins/routable/index.ts +6 -4
- package/src/mixins/validatable/index.ts +11 -1
- package/src/util/__tests__/console.spec.ts +124 -11
- package/src/util/__tests__/helpers.spec.ts +59 -31
- package/src/util/console.ts +43 -24
- package/src/util/helpers.ts +8 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Libraries
|
|
2
|
-
import
|
|
2
|
+
import { defineComponent, h } from 'vue'
|
|
3
3
|
|
|
4
4
|
// Components
|
|
5
5
|
import VSelect from '../VSelect'
|
|
@@ -13,7 +13,8 @@ import {
|
|
|
13
13
|
// Utilities
|
|
14
14
|
import {
|
|
15
15
|
mount,
|
|
16
|
-
|
|
16
|
+
VueWrapper,
|
|
17
|
+
enableAutoUnmount,
|
|
17
18
|
} from '@vue/test-utils'
|
|
18
19
|
import { keyCodes } from '../../../util/helpers'
|
|
19
20
|
import { waitAnimationFrame } from '../../../../test'
|
|
@@ -21,7 +22,7 @@ import { waitAnimationFrame } from '../../../../test'
|
|
|
21
22
|
// eslint-disable-next-line max-statements
|
|
22
23
|
describe('VSelect.ts', () => {
|
|
23
24
|
type Instance = InstanceType<typeof VSelect>
|
|
24
|
-
let mountFunction: (options?: object) =>
|
|
25
|
+
let mountFunction: (options?: object) => VueWrapper<Instance>
|
|
25
26
|
let el
|
|
26
27
|
|
|
27
28
|
beforeEach(() => {
|
|
@@ -30,15 +31,18 @@ describe('VSelect.ts', () => {
|
|
|
30
31
|
document.body.appendChild(el)
|
|
31
32
|
mountFunction = (options = {}) => {
|
|
32
33
|
return mount(VSelect, {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
global: {
|
|
35
|
+
mocks: {
|
|
36
|
+
$vuetify: {
|
|
37
|
+
lang: {
|
|
38
|
+
t: (val: string) => val,
|
|
39
|
+
},
|
|
40
|
+
theme: {
|
|
41
|
+
dark: false,
|
|
42
|
+
},
|
|
43
|
+
icons: {
|
|
44
|
+
component: 'mdi',
|
|
45
|
+
},
|
|
42
46
|
},
|
|
43
47
|
},
|
|
44
48
|
},
|
|
@@ -51,28 +55,32 @@ describe('VSelect.ts', () => {
|
|
|
51
55
|
document.body.removeChild(el)
|
|
52
56
|
})
|
|
53
57
|
|
|
58
|
+
enableAutoUnmount(afterEach)
|
|
59
|
+
|
|
54
60
|
it('should return numeric 0', async () => {
|
|
55
61
|
const item = { value: 0, text: '0' }
|
|
56
62
|
const wrapper = mountFunction({
|
|
57
|
-
|
|
58
|
-
|
|
63
|
+
props: {
|
|
64
|
+
modelValue: null,
|
|
59
65
|
items: [item],
|
|
60
66
|
multiple: true,
|
|
61
67
|
},
|
|
62
68
|
})
|
|
63
69
|
|
|
64
|
-
const change = jest.fn()
|
|
65
|
-
wrapper.vm.$on('change', change)
|
|
66
70
|
wrapper.vm.selectItem(item)
|
|
67
71
|
|
|
68
72
|
await wrapper.vm.$nextTick()
|
|
69
73
|
|
|
70
|
-
|
|
74
|
+
// Проверяем, что событие было эмитировано через emitted
|
|
75
|
+
const emitted = wrapper.emitted('update:modelValue')
|
|
76
|
+
expect(emitted).toBeTruthy()
|
|
77
|
+
expect(emitted[0]).toEqual([[0]])
|
|
71
78
|
})
|
|
72
79
|
|
|
73
|
-
it('should disable list items', () => {
|
|
80
|
+
it('should disable list items', async () => {
|
|
74
81
|
const wrapper = mountFunction({
|
|
75
|
-
|
|
82
|
+
attachTo: el,
|
|
83
|
+
props: {
|
|
76
84
|
eager: true,
|
|
77
85
|
items: [{
|
|
78
86
|
text: 'item',
|
|
@@ -81,41 +89,46 @@ describe('VSelect.ts', () => {
|
|
|
81
89
|
},
|
|
82
90
|
})
|
|
83
91
|
|
|
84
|
-
|
|
92
|
+
// Открываем меню, чтобы элементы отрендерились
|
|
93
|
+
wrapper.vm.isMenuActive = true
|
|
94
|
+
await wrapper.vm.$nextTick()
|
|
85
95
|
|
|
86
|
-
|
|
96
|
+
// Ищем элементы меню в document.body, так как VMenu рендерится через Teleport
|
|
97
|
+
const item = document.querySelector('.v-list-item--disabled')
|
|
98
|
+
|
|
99
|
+
expect(item).toBeTruthy()
|
|
100
|
+
if (item) {
|
|
101
|
+
expect(item.tabIndex).toBe(-1)
|
|
102
|
+
}
|
|
87
103
|
})
|
|
88
104
|
|
|
89
105
|
it('should render v-select correctly when using v-list-item in item scope slot', async () => {
|
|
90
106
|
const items = Array.from({ length: 2 }, (x, i) => ({ value: i, text: `Text ${i}` }))
|
|
91
107
|
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
VListItem,
|
|
95
|
-
},
|
|
96
|
-
})
|
|
97
|
-
const itemSlot = ({ item, attrs, on }) => vm.$createElement('v-list-item', {
|
|
98
|
-
on,
|
|
108
|
+
const itemSlot = ({ item, attrs, on }) => h(VListItem, {
|
|
109
|
+
...on,
|
|
99
110
|
...attrs,
|
|
100
111
|
class: item.value % 2 === 0 ? '' : 'red lighten-1',
|
|
101
|
-
}, [
|
|
112
|
+
}, () => [
|
|
102
113
|
item.text,
|
|
103
114
|
])
|
|
104
|
-
const selectionSlot = ({ item }) =>
|
|
105
|
-
const component =
|
|
106
|
-
render (
|
|
115
|
+
const selectionSlot = ({ item }) => h(VListItem, () => item.value)
|
|
116
|
+
const component = defineComponent({
|
|
117
|
+
render () {
|
|
107
118
|
return h(VSelect, {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
119
|
+
items,
|
|
120
|
+
modelValue: 1,
|
|
121
|
+
}, {
|
|
122
|
+
item: itemSlot,
|
|
123
|
+
selection: selectionSlot,
|
|
113
124
|
})
|
|
114
125
|
},
|
|
115
126
|
})
|
|
116
127
|
const wrapper = mountFunction(component)
|
|
117
128
|
|
|
118
|
-
|
|
129
|
+
// Access child component through refs or direct access
|
|
130
|
+
const selectComponent = wrapper.findComponent(VSelect)
|
|
131
|
+
selectComponent.vm.setValue(items[0])
|
|
119
132
|
|
|
120
133
|
await wrapper.vm.$nextTick()
|
|
121
134
|
|
|
@@ -125,29 +138,26 @@ describe('VSelect.ts', () => {
|
|
|
125
138
|
it('should render v-select correctly when not using v-list-item in item scope slot', async () => {
|
|
126
139
|
const items = Array.from({ length: 2 }, (x, i) => ({ value: i, text: `Text ${i}` }))
|
|
127
140
|
|
|
128
|
-
const
|
|
129
|
-
components: {
|
|
130
|
-
VListItemTitle,
|
|
131
|
-
VListItemContent,
|
|
132
|
-
},
|
|
133
|
-
})
|
|
134
|
-
const itemSlot = ({ item }) => vm.$createElement('v-list-item-content', {
|
|
141
|
+
const itemSlot = ({ item }) => h(VListItemContent, {
|
|
135
142
|
class: item.value % 2 === 0 ? '' : 'red lighten-1',
|
|
136
|
-
}, [
|
|
137
|
-
|
|
143
|
+
}, () => [
|
|
144
|
+
h(VListItemTitle, () => [item.value]),
|
|
138
145
|
])
|
|
139
|
-
const component =
|
|
140
|
-
render (
|
|
146
|
+
const component = defineComponent({
|
|
147
|
+
render () {
|
|
141
148
|
return h(VSelect, {
|
|
142
|
-
|
|
143
|
-
|
|
149
|
+
items,
|
|
150
|
+
}, {
|
|
151
|
+
item: itemSlot,
|
|
144
152
|
})
|
|
145
153
|
},
|
|
146
154
|
})
|
|
147
155
|
|
|
148
156
|
const wrapper = mountFunction(component)
|
|
149
157
|
|
|
150
|
-
|
|
158
|
+
// Access child component through refs or direct access
|
|
159
|
+
const selectComponent = wrapper.findComponent(VSelect)
|
|
160
|
+
selectComponent.vm.setValue(items[0])
|
|
151
161
|
|
|
152
162
|
await wrapper.vm.$nextTick()
|
|
153
163
|
|
|
@@ -157,17 +167,19 @@ describe('VSelect.ts', () => {
|
|
|
157
167
|
it('should render v-select correctly when not using scope slot', async () => {
|
|
158
168
|
const items = Array.from({ length: 2 }, (x, i) => ({ value: i, text: `Text ${i}` }))
|
|
159
169
|
|
|
160
|
-
const component =
|
|
161
|
-
render (
|
|
170
|
+
const component = defineComponent({
|
|
171
|
+
render () {
|
|
162
172
|
return h(VSelect, {
|
|
163
|
-
|
|
173
|
+
items,
|
|
164
174
|
})
|
|
165
175
|
},
|
|
166
176
|
})
|
|
167
177
|
|
|
168
178
|
const wrapper = mountFunction(component)
|
|
169
179
|
|
|
170
|
-
|
|
180
|
+
// Access child component through refs or direct access
|
|
181
|
+
const selectComponent = wrapper.findComponent(VSelect)
|
|
182
|
+
selectComponent.vm.setValue(items[0])
|
|
171
183
|
|
|
172
184
|
await wrapper.vm.$nextTick()
|
|
173
185
|
|
|
@@ -176,15 +188,14 @@ describe('VSelect.ts', () => {
|
|
|
176
188
|
|
|
177
189
|
it('should not close menu when using multiple prop', async () => {
|
|
178
190
|
const wrapper = mountFunction({
|
|
179
|
-
|
|
180
|
-
|
|
191
|
+
attachTo: el,
|
|
192
|
+
props: {
|
|
181
193
|
items: [1, 2, 3, 4],
|
|
182
194
|
multiple: true,
|
|
183
195
|
},
|
|
184
196
|
})
|
|
185
197
|
|
|
186
|
-
|
|
187
|
-
wrapper.vm.$on('blur', blur)
|
|
198
|
+
// blur event will be tested via emitted()
|
|
188
199
|
|
|
189
200
|
const menu = wrapper.find('.v-input__slot')
|
|
190
201
|
|
|
@@ -214,7 +225,7 @@ describe('VSelect.ts', () => {
|
|
|
214
225
|
// https://github.com/vuejs/vue-test-utils/issues/1130
|
|
215
226
|
it.skip('should only show items if they are in items', async () => {
|
|
216
227
|
const wrapper = mountFunction({
|
|
217
|
-
|
|
228
|
+
props: {
|
|
218
229
|
value: 'foo',
|
|
219
230
|
items: ['foo'],
|
|
220
231
|
},
|
|
@@ -226,7 +237,7 @@ describe('VSelect.ts', () => {
|
|
|
226
237
|
expect(wrapper.vm.selectedItems).toEqual(['foo'])
|
|
227
238
|
expect(wrapper.html()).toMatchSnapshot()
|
|
228
239
|
|
|
229
|
-
wrapper.setProps({
|
|
240
|
+
await wrapper.setProps({ modelValue: 'bar' })
|
|
230
241
|
|
|
231
242
|
await wrapper.vm.$nextTick()
|
|
232
243
|
|
|
@@ -234,7 +245,7 @@ describe('VSelect.ts', () => {
|
|
|
234
245
|
expect(wrapper.vm.selectedItems).toEqual([])
|
|
235
246
|
expect(wrapper.html()).toMatchSnapshot()
|
|
236
247
|
|
|
237
|
-
wrapper.setProps({ items: ['foo', 'bar'] })
|
|
248
|
+
await wrapper.setProps({ items: ['foo', 'bar'] })
|
|
238
249
|
|
|
239
250
|
await wrapper.vm.$nextTick()
|
|
240
251
|
|
|
@@ -242,10 +253,10 @@ describe('VSelect.ts', () => {
|
|
|
242
253
|
expect(wrapper.vm.selectedItems).toEqual(['bar'])
|
|
243
254
|
expect(wrapper.html()).toMatchSnapshot()
|
|
244
255
|
|
|
245
|
-
wrapper.setProps({ multiple: true })
|
|
256
|
+
await wrapper.setProps({ multiple: true })
|
|
246
257
|
await wrapper.vm.$nextTick()
|
|
247
258
|
|
|
248
|
-
wrapper.setProps({
|
|
259
|
+
await wrapper.setProps({ modelValue: ['foo', 'bar'] })
|
|
249
260
|
|
|
250
261
|
await wrapper.vm.$nextTick()
|
|
251
262
|
|
|
@@ -258,13 +269,13 @@ describe('VSelect.ts', () => {
|
|
|
258
269
|
// https://github.com/vuejs/vue-test-utils/issues/1130
|
|
259
270
|
it.skip('should update the displayed value when items changes', async () => {
|
|
260
271
|
const wrapper = mountFunction({
|
|
261
|
-
|
|
272
|
+
props: {
|
|
262
273
|
value: 1,
|
|
263
274
|
items: [],
|
|
264
275
|
},
|
|
265
276
|
})
|
|
266
277
|
|
|
267
|
-
wrapper.setProps({ items: [{ text: 'foo', value: 1 }] })
|
|
278
|
+
await wrapper.setProps({ items: [{ text: 'foo', value: 1 }] })
|
|
268
279
|
|
|
269
280
|
await wrapper.vm.$nextTick()
|
|
270
281
|
|
|
@@ -275,24 +286,31 @@ describe('VSelect.ts', () => {
|
|
|
275
286
|
const items = ['abc']
|
|
276
287
|
|
|
277
288
|
const wrapper = mountFunction({
|
|
278
|
-
|
|
289
|
+
attachTo: el,
|
|
290
|
+
props: {
|
|
279
291
|
menuProps: { contentClass: 'v-menu-class', eager: true },
|
|
280
292
|
items,
|
|
281
293
|
},
|
|
282
294
|
})
|
|
283
295
|
|
|
284
|
-
|
|
285
|
-
|
|
296
|
+
wrapper.vm.isMenuActive = true
|
|
297
|
+
await wrapper.vm.$nextTick()
|
|
298
|
+
|
|
299
|
+
const menu = document.querySelector('.v-menu__content')
|
|
300
|
+
expect(menu).toBeTruthy()
|
|
301
|
+
if (menu) {
|
|
302
|
+
expect(menu.classList).toContain('v-menu-class')
|
|
303
|
+
}
|
|
286
304
|
})
|
|
287
305
|
|
|
288
306
|
it('should have deletable chips', async () => {
|
|
289
307
|
const wrapper = mountFunction({
|
|
290
|
-
|
|
291
|
-
|
|
308
|
+
attachTo: el,
|
|
309
|
+
props: {
|
|
292
310
|
chips: true,
|
|
293
311
|
deletableChips: true,
|
|
294
312
|
items: ['foo', 'bar'],
|
|
295
|
-
|
|
313
|
+
modelValue: 'foo',
|
|
296
314
|
},
|
|
297
315
|
})
|
|
298
316
|
|
|
@@ -304,20 +322,27 @@ describe('VSelect.ts', () => {
|
|
|
304
322
|
|
|
305
323
|
it('should escape items in menu', async () => {
|
|
306
324
|
const wrapper = mountFunction({
|
|
307
|
-
|
|
325
|
+
attachTo: el,
|
|
326
|
+
props: {
|
|
308
327
|
eager: true,
|
|
309
328
|
items: ['<strong>foo</strong>'],
|
|
310
329
|
},
|
|
311
330
|
})
|
|
312
331
|
|
|
313
|
-
|
|
314
|
-
|
|
332
|
+
wrapper.vm.isMenuActive = true
|
|
333
|
+
await wrapper.vm.$nextTick()
|
|
334
|
+
|
|
335
|
+
const tileTitle = document.querySelector('.v-list-item__title')
|
|
336
|
+
expect(tileTitle).toBeTruthy()
|
|
337
|
+
if (tileTitle) {
|
|
338
|
+
expect(tileTitle.outerHTML).toMatchSnapshot()
|
|
339
|
+
}
|
|
315
340
|
})
|
|
316
341
|
|
|
317
342
|
it('should use value comparator', async () => {
|
|
318
343
|
const wrapper = mountFunction({
|
|
319
|
-
|
|
320
|
-
|
|
344
|
+
attachTo: el,
|
|
345
|
+
props: {
|
|
321
346
|
multiple: true,
|
|
322
347
|
items: [
|
|
323
348
|
{ text: 'one', value: 1 },
|
|
@@ -327,7 +352,7 @@ describe('VSelect.ts', () => {
|
|
|
327
352
|
itemText: 'text',
|
|
328
353
|
itemValue: 'value',
|
|
329
354
|
valueComparator: (a, b) => Math.round(a) === Math.round(b),
|
|
330
|
-
|
|
355
|
+
modelValue: [3.1],
|
|
331
356
|
},
|
|
332
357
|
})
|
|
333
358
|
|
|
@@ -337,7 +362,7 @@ describe('VSelect.ts', () => {
|
|
|
337
362
|
|
|
338
363
|
it('should not open if readonly', async () => {
|
|
339
364
|
const wrapper = mountFunction({
|
|
340
|
-
|
|
365
|
+
props: {
|
|
341
366
|
readonly: true,
|
|
342
367
|
items: ['foo', 'bar'],
|
|
343
368
|
},
|
|
@@ -354,8 +379,8 @@ describe('VSelect.ts', () => {
|
|
|
354
379
|
|
|
355
380
|
it('can use itemValue as function', async () => {
|
|
356
381
|
const wrapper = mountFunction({
|
|
357
|
-
|
|
358
|
-
|
|
382
|
+
attachTo: el,
|
|
383
|
+
props: {
|
|
359
384
|
multiple: true,
|
|
360
385
|
items: [
|
|
361
386
|
{ text: 'one', v1: 'prop v1' },
|
|
@@ -364,7 +389,7 @@ describe('VSelect.ts', () => {
|
|
|
364
389
|
],
|
|
365
390
|
itemText: 'text',
|
|
366
391
|
itemValue: item => item.hasOwnProperty('v1') ? item.v1 : item.v2,
|
|
367
|
-
|
|
392
|
+
modelValue: ['prop v1', 'prop v2'],
|
|
368
393
|
},
|
|
369
394
|
})
|
|
370
395
|
|
|
@@ -375,8 +400,8 @@ describe('VSelect.ts', () => {
|
|
|
375
400
|
|
|
376
401
|
it('should work correctly with return-object', async () => {
|
|
377
402
|
const wrapper = mountFunction({
|
|
378
|
-
|
|
379
|
-
|
|
403
|
+
attachTo: el,
|
|
404
|
+
props: {
|
|
380
405
|
multiple: false,
|
|
381
406
|
returnObject: true,
|
|
382
407
|
items: [
|
|
@@ -386,7 +411,7 @@ describe('VSelect.ts', () => {
|
|
|
386
411
|
],
|
|
387
412
|
itemText: 'text',
|
|
388
413
|
itemValue: 'value',
|
|
389
|
-
|
|
414
|
+
modelValue: { text: 'two', value: { x: [3, 4], y: ['a', 'b'] } },
|
|
390
415
|
},
|
|
391
416
|
})
|
|
392
417
|
|
|
@@ -396,8 +421,8 @@ describe('VSelect.ts', () => {
|
|
|
396
421
|
|
|
397
422
|
it('should work correctly with return-object [multiple]', async () => {
|
|
398
423
|
const wrapper = mountFunction({
|
|
399
|
-
|
|
400
|
-
|
|
424
|
+
attachTo: el,
|
|
425
|
+
props: {
|
|
401
426
|
multiple: true,
|
|
402
427
|
returnObject: true,
|
|
403
428
|
items: [
|
|
@@ -407,7 +432,7 @@ describe('VSelect.ts', () => {
|
|
|
407
432
|
],
|
|
408
433
|
itemText: 'text',
|
|
409
434
|
itemValue: 'value',
|
|
410
|
-
|
|
435
|
+
modelValue: [
|
|
411
436
|
{ text: 'two', value: { x: [3, 4], y: ['a', 'b'] } },
|
|
412
437
|
{ text: 'one', value: { x: [1, 2], y: ['a', 'b'] } },
|
|
413
438
|
],
|
|
@@ -425,29 +450,36 @@ describe('VSelect.ts', () => {
|
|
|
425
450
|
expect(wrapper.vm.internalValue).toBeUndefined()
|
|
426
451
|
|
|
427
452
|
const wrapper2 = mountFunction({
|
|
428
|
-
|
|
453
|
+
props: { multiple: true },
|
|
429
454
|
})
|
|
430
455
|
|
|
431
456
|
expect(wrapper2.vm.internalValue).toEqual([])
|
|
432
457
|
})
|
|
433
458
|
|
|
434
|
-
it('should use slotted no-data', () => {
|
|
459
|
+
it('should use slotted no-data', async () => {
|
|
435
460
|
const wrapper = mountFunction({
|
|
436
|
-
|
|
461
|
+
attachTo: el,
|
|
462
|
+
props: {
|
|
437
463
|
eager: true,
|
|
438
|
-
items: [
|
|
464
|
+
items: [], // Убираем элементы, чтобы показать no-data слот
|
|
439
465
|
},
|
|
440
466
|
slots: {
|
|
441
|
-
'no-data':
|
|
442
|
-
render: h => h('div', 'foo'),
|
|
443
|
-
}],
|
|
467
|
+
'no-data': () => h('div', 'foo'),
|
|
444
468
|
},
|
|
445
469
|
})
|
|
446
470
|
|
|
447
|
-
|
|
471
|
+
// Открываем меню
|
|
472
|
+
wrapper.vm.isMenuActive = true
|
|
473
|
+
await wrapper.vm.$nextTick()
|
|
474
|
+
|
|
475
|
+
// Ищем элементы меню в document.body, так как VMenu рендерится через Teleport
|
|
476
|
+
const list = document.querySelector('.v-list')
|
|
448
477
|
|
|
449
478
|
expect(wrapper.vm.$slots['no-data']).toBeTruthy()
|
|
450
|
-
expect(list
|
|
479
|
+
expect(list).toBeTruthy()
|
|
480
|
+
if (list) {
|
|
481
|
+
expect(list.outerHTML).toMatchSnapshot()
|
|
482
|
+
}
|
|
451
483
|
})
|
|
452
484
|
|
|
453
485
|
it('should change autocomplete attribute', () => {
|
|
@@ -468,59 +500,68 @@ describe('VSelect.ts', () => {
|
|
|
468
500
|
|
|
469
501
|
const dialogWrapper = mount(VDialog, {
|
|
470
502
|
slots: {
|
|
471
|
-
default: {
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
items,
|
|
475
|
-
},
|
|
476
|
-
}),
|
|
477
|
-
},
|
|
503
|
+
default: () => h(VSelect, {
|
|
504
|
+
items,
|
|
505
|
+
}),
|
|
478
506
|
},
|
|
479
|
-
|
|
480
|
-
|
|
507
|
+
props: {
|
|
508
|
+
modelValue: false,
|
|
481
509
|
fullscreen: true,
|
|
482
510
|
},
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
511
|
+
global: {
|
|
512
|
+
mocks: {
|
|
513
|
+
$vuetify: {
|
|
514
|
+
lang: {
|
|
515
|
+
t: (val: string) => val,
|
|
516
|
+
},
|
|
517
|
+
theme: {
|
|
518
|
+
dark: false,
|
|
519
|
+
},
|
|
520
|
+
icons: {
|
|
521
|
+
component: 'mdi',
|
|
522
|
+
},
|
|
523
|
+
breakpoint: {},
|
|
490
524
|
},
|
|
491
|
-
breakpoint: {},
|
|
492
525
|
},
|
|
493
526
|
},
|
|
494
|
-
}) as
|
|
527
|
+
}) as VueWrapper<InstanceType<typeof VDialog>>
|
|
495
528
|
|
|
496
|
-
|
|
529
|
+
// click:outside event will be tested via emitted()
|
|
497
530
|
|
|
498
531
|
// Open dialog
|
|
499
|
-
dialogWrapper.setProps({
|
|
532
|
+
await dialogWrapper.setProps({ modelValue: true })
|
|
500
533
|
await dialogWrapper.vm.$nextTick()
|
|
501
534
|
|
|
502
|
-
// Confirm Dialog is open
|
|
503
|
-
expect(dialogWrapper.
|
|
535
|
+
// Confirm Dialog is open (проверяем существование диалога)
|
|
536
|
+
expect(dialogWrapper.exists()).toBe(true)
|
|
537
|
+
|
|
538
|
+
const selectWrapper = dialogWrapper.findComponent(VSelect) as VueWrapper<Instance>
|
|
504
539
|
|
|
505
|
-
|
|
540
|
+
// Для навигации по клавишам меню должно быть неактивно
|
|
541
|
+
// Сначала закрываем меню, если оно открыто
|
|
542
|
+
selectWrapper.vm.isMenuActive = false
|
|
543
|
+
await selectWrapper.vm.$nextTick()
|
|
506
544
|
|
|
507
545
|
// Press key down twice to move selected item from null to Bar
|
|
508
546
|
const keyDownEvent = new KeyboardEvent('keydown', { keyCode: keyCodes.down })
|
|
509
547
|
selectWrapper.vm.onKeyDown(keyDownEvent)
|
|
510
548
|
await waitAnimationFrame()
|
|
549
|
+
await selectWrapper.vm.$nextTick()
|
|
511
550
|
selectWrapper.vm.onKeyDown(keyDownEvent)
|
|
512
551
|
await waitAnimationFrame()
|
|
552
|
+
await selectWrapper.vm.$nextTick()
|
|
513
553
|
expect(selectWrapper.vm.internalValue).toBe('Bar')
|
|
514
554
|
|
|
515
555
|
// Press key up once to move selected item from Bar to Foo
|
|
516
|
-
const keyUpEvent = new KeyboardEvent('
|
|
556
|
+
const keyUpEvent = new KeyboardEvent('keydown', { keyCode: keyCodes.up })
|
|
517
557
|
selectWrapper.vm.onKeyDown(keyUpEvent)
|
|
518
558
|
await waitAnimationFrame()
|
|
559
|
+
await selectWrapper.vm.$nextTick()
|
|
519
560
|
expect(selectWrapper.vm.internalValue).toBe('Foo')
|
|
520
561
|
|
|
521
562
|
// Confirm dialog click outside event has not been called
|
|
522
|
-
expect(
|
|
523
|
-
// Confirm dialog is still open
|
|
524
|
-
expect(dialogWrapper.
|
|
563
|
+
expect(dialogWrapper.emitted('click:outside')).toBeFalsy()
|
|
564
|
+
// Confirm dialog is still open (проверяем существование)
|
|
565
|
+
expect(dialogWrapper.exists()).toBe(true)
|
|
525
566
|
})
|
|
526
567
|
})
|