@dimailn/vuetify 2.7.2-alpha32 → 2.7.2-alpha33
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 +531 -366
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +1 -1
- package/dist/vuetify.min.js +2 -2
- package/es5/components/VCalendar/VCalendarWeekly.js +10 -5
- package/es5/components/VCalendar/VCalendarWeekly.js.map +1 -1
- package/es5/components/VCheckbox/VCheckbox.js +7 -9
- package/es5/components/VCheckbox/VCheckbox.js.map +1 -1
- package/es5/components/VContent/VContent.js +24 -5
- package/es5/components/VContent/VContent.js.map +1 -1
- package/es5/components/VCounter/VCounter.js.map +1 -1
- package/es5/components/VDatePicker/VDatePicker.js +15 -7
- package/es5/components/VDatePicker/VDatePicker.js.map +1 -1
- package/es5/components/VDatePicker/VDatePickerTitle.js +30 -19
- package/es5/components/VDatePicker/VDatePickerTitle.js.map +1 -1
- package/es5/components/VDatePicker/mixins/date-picker-table.js +1 -1
- package/es5/components/VDatePicker/mixins/date-picker-table.js.map +1 -1
- package/es5/components/VDatePicker/util/eventHelpers.js +27 -17
- package/es5/components/VDatePicker/util/eventHelpers.js.map +1 -1
- package/es5/components/VExpansionPanel/VExpansionPanelContent.js.map +1 -1
- package/es5/components/VExpansionPanel/VExpansionPanelHeader.js.map +1 -1
- package/es5/components/VGrid/VCol.js +3 -1
- package/es5/components/VGrid/VCol.js.map +1 -1
- package/es5/components/VGrid/VContainer.js +23 -10
- package/es5/components/VGrid/VContainer.js.map +1 -1
- package/es5/components/VGrid/grid.js +33 -15
- package/es5/components/VGrid/grid.js.map +1 -1
- package/es5/components/VHover/VHover.js +23 -17
- package/es5/components/VHover/VHover.js.map +1 -1
- package/es5/components/VIcon/VIcon.js +77 -53
- package/es5/components/VIcon/VIcon.js.map +1 -1
- package/es5/components/VLabel/VLabel.js +3 -1
- package/es5/components/VLabel/VLabel.js.map +1 -1
- package/es5/components/VOtpInput/VOtpInput.js +54 -33
- package/es5/components/VOtpInput/VOtpInput.js.map +1 -1
- package/es5/components/VOverflowBtn/VOverflowBtn.js +14 -13
- package/es5/components/VOverflowBtn/VOverflowBtn.js.map +1 -1
- package/es5/components/VProgressLinear/VProgressLinear.js +12 -33
- package/es5/components/VProgressLinear/VProgressLinear.js.map +1 -1
- package/es5/components/VSelect/VSelect.js +4 -1
- package/es5/components/VSelect/VSelect.js.map +1 -1
- package/es5/components/VStepper/VStepper.js +1 -1
- package/es5/components/VStepper/VStepper.js.map +1 -1
- package/es5/components/VStepper/VStepperContent.js +2 -5
- package/es5/components/VStepper/VStepperContent.js.map +1 -1
- package/es5/components/VSwitch/VSwitch.js +1 -1
- package/es5/components/VSwitch/VSwitch.js.map +1 -1
- package/es5/components/VTextField/VTextField.js +2 -1
- package/es5/components/VTextField/VTextField.js.map +1 -1
- package/es5/components/VTooltip/VTooltip.js +0 -7
- package/es5/components/VTooltip/VTooltip.js.map +1 -1
- package/es5/directives/color/index.js +6 -3
- package/es5/directives/color/index.js.map +1 -1
- package/es5/directives/ripple/index.js +5 -2
- package/es5/directives/ripple/index.js.map +1 -1
- package/es5/directives/scroll/index.js +1 -2
- package/es5/directives/scroll/index.js.map +1 -1
- package/es5/directives/touch/index.js +7 -4
- package/es5/directives/touch/index.js.map +1 -1
- package/es5/framework.js +1 -1
- package/es5/mixins/activatable/index.js +0 -8
- package/es5/mixins/activatable/index.js.map +1 -1
- package/es5/mixins/groupable/index.js.map +1 -1
- package/es5/mixins/positionable/index.js.map +1 -1
- package/es5/mixins/proxyable/index.js.map +1 -1
- package/es5/mixins/registrable/index.js.map +1 -1
- package/es5/mixins/selectable/index.js +4 -2
- package/es5/mixins/selectable/index.js.map +1 -1
- package/es5/mixins/toggleable/index.js.map +1 -1
- package/es5/services/goto/util.js +42 -3
- package/es5/services/goto/util.js.map +1 -1
- package/es5/services/theme/index.js +20 -71
- package/es5/services/theme/index.js.map +1 -1
- package/es5/util/mergeData.js +6 -5
- package/es5/util/mergeData.js.map +1 -1
- package/es5/util/mixins.js +4 -3
- package/es5/util/mixins.js.map +1 -1
- package/lib/components/VCalendar/VCalendarWeekly.js +11 -6
- package/lib/components/VCalendar/VCalendarWeekly.js.map +1 -1
- package/lib/components/VCheckbox/VCheckbox.js +5 -8
- package/lib/components/VCheckbox/VCheckbox.js.map +1 -1
- package/lib/components/VContent/VContent.js +18 -3
- package/lib/components/VContent/VContent.js.map +1 -1
- package/lib/components/VCounter/VCounter.js.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.js +17 -7
- package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerTitle.js +25 -14
- package/lib/components/VDatePicker/VDatePickerTitle.js.map +1 -1
- package/lib/components/VDatePicker/mixins/date-picker-table.js +1 -1
- package/lib/components/VDatePicker/mixins/date-picker-table.js.map +1 -1
- package/lib/components/VDatePicker/util/eventHelpers.js +26 -14
- package/lib/components/VDatePicker/util/eventHelpers.js.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelContent.js.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelHeader.js.map +1 -1
- package/lib/components/VGrid/VCol.js +3 -1
- package/lib/components/VGrid/VCol.js.map +1 -1
- package/lib/components/VGrid/VContainer.js +11 -10
- package/lib/components/VGrid/VContainer.js.map +1 -1
- package/lib/components/VGrid/grid.js +15 -14
- package/lib/components/VGrid/grid.js.map +1 -1
- package/lib/components/VHover/VHover.js +23 -18
- package/lib/components/VHover/VHover.js.map +1 -1
- package/lib/components/VIcon/VIcon.js +79 -57
- package/lib/components/VIcon/VIcon.js.map +1 -1
- package/lib/components/VLabel/VLabel.js +3 -1
- package/lib/components/VLabel/VLabel.js.map +1 -1
- package/lib/components/VOtpInput/VOtpInput.js +58 -34
- package/lib/components/VOtpInput/VOtpInput.js.map +1 -1
- package/lib/components/VOverflowBtn/VOverflowBtn.js +14 -14
- package/lib/components/VOverflowBtn/VOverflowBtn.js.map +1 -1
- package/lib/components/VProgressLinear/VProgressLinear.js +12 -16
- package/lib/components/VProgressLinear/VProgressLinear.js.map +1 -1
- package/lib/components/VSelect/VSelect.js +4 -1
- package/lib/components/VSelect/VSelect.js.map +1 -1
- package/lib/components/VStepper/VStepper.js +1 -1
- package/lib/components/VStepper/VStepper.js.map +1 -1
- package/lib/components/VStepper/VStepperContent.js +3 -6
- package/lib/components/VStepper/VStepperContent.js.map +1 -1
- package/lib/components/VSwitch/VSwitch.js +1 -1
- package/lib/components/VSwitch/VSwitch.js.map +1 -1
- package/lib/components/VTextField/VTextField.js +2 -1
- package/lib/components/VTextField/VTextField.js.map +1 -1
- package/lib/components/VTooltip/VTooltip.js +1 -8
- package/lib/components/VTooltip/VTooltip.js.map +1 -1
- package/lib/directives/color/index.js +6 -3
- package/lib/directives/color/index.js.map +1 -1
- package/lib/directives/ripple/index.js +5 -3
- package/lib/directives/ripple/index.js.map +1 -1
- package/lib/directives/scroll/index.js +1 -2
- package/lib/directives/scroll/index.js.map +1 -1
- package/lib/directives/touch/index.js +7 -4
- package/lib/directives/touch/index.js.map +1 -1
- package/lib/framework.js +1 -1
- package/lib/mixins/activatable/index.js +1 -8
- package/lib/mixins/activatable/index.js.map +1 -1
- package/lib/mixins/groupable/index.js.map +1 -1
- package/lib/mixins/positionable/index.js.map +1 -1
- package/lib/mixins/proxyable/index.js.map +1 -1
- package/lib/mixins/registrable/index.js.map +1 -1
- package/lib/mixins/selectable/index.js +9 -7
- package/lib/mixins/selectable/index.js.map +1 -1
- package/lib/mixins/toggleable/index.js.map +1 -1
- package/lib/services/goto/util.js +42 -3
- package/lib/services/goto/util.js.map +1 -1
- package/lib/services/theme/index.js +18 -64
- package/lib/services/theme/index.js.map +1 -1
- package/lib/util/mergeData.js +6 -5
- package/lib/util/mergeData.js.map +1 -1
- package/lib/util/mixins.js +3 -2
- package/lib/util/mixins.js.map +1 -1
- package/package.json +2 -2
- package/src/components/VAlert/__tests__/__snapshots__/VAlert.spec.ts.snap +4 -4
- package/src/components/VAppBar/__tests__/__snapshots__/VAppBarNavIcon.spec.ts.snap +2 -2
- package/src/components/VAutocomplete/__tests__/VAutocomplete.spec.ts +75 -20
- package/src/components/VAutocomplete/__tests__/VAutocomplete2.spec.ts +38 -40
- package/src/components/VAutocomplete/__tests__/VAutocomplete3.spec.ts +26 -26
- package/src/components/VBanner/__tests__/__snapshots__/VBanner.spec.ts.snap +2 -2
- package/src/components/VBtn/__tests__/VBtn.spec.ts +8 -4
- package/src/components/VCalendar/VCalendarWeekly.ts +12 -5
- package/src/components/VCalendar/__tests__/VCalendar.spec.ts +1 -1
- package/src/components/VCalendar/__tests__/VCalendarCategory.spec.ts +5 -5
- package/src/components/VCalendar/__tests__/__snapshots__/VCalendar.spec.ts.snap +167 -168
- package/src/components/VCheckbox/VCheckbox.ts +4 -9
- package/src/components/VCheckbox/__tests__/VCheckbox.spec.ts +7 -1
- package/src/components/VCheckbox/__tests__/__snapshots__/VCheckbox.spec.ts.snap +54 -50
- package/src/components/VColorPicker/__tests__/__snapshots__/VColorPicker.spec.ts.snap +18 -18
- package/src/components/VColorPicker/__tests__/__snapshots__/VColorPickerEdit.spec.ts.snap +10 -10
- package/src/components/VCombobox/__tests__/VCombobox-multiple.spec.ts +89 -69
- package/src/components/VCombobox/__tests__/VCombobox.spec.ts +17 -12
- package/src/components/VContent/VContent.ts +10 -2
- package/src/components/VCounter/VCounter.ts +1 -1
- package/src/components/VCounter/__tests__/VCounter.spec.ts +10 -25
- package/src/components/VDataIterator/__tests__/__snapshots__/VDataFooter.spec.ts.snap +42 -42
- package/src/components/VDataIterator/__tests__/__snapshots__/VDataIterator.spec.ts.snap +30 -30
- package/src/components/VDataTable/__tests__/VDataTable.spec.ts +1 -1
- package/src/components/VDataTable/__tests__/VDataTableHeader.spec.ts +6 -10
- package/src/components/VDataTable/__tests__/VEditDialog.spec.ts +24 -21
- package/src/components/VDataTable/__tests__/__snapshots__/VDataTable.spec.ts.snap +409 -409
- package/src/components/VDataTable/__tests__/__snapshots__/VDataTableHeader.spec.ts.snap +70 -70
- package/src/components/VDataTable/mixins/__tests__/__snapshots__/header.spec.ts.snap +8 -8
- package/src/components/VDataTable/mixins/__tests__/header.spec.ts +3 -3
- package/src/components/VDatePicker/VDatePicker.ts +23 -7
- package/src/components/VDatePicker/VDatePickerTitle.ts +28 -16
- package/src/components/VDatePicker/__tests__/VDatePicker.date.spec.ts +86 -124
- package/src/components/VDatePicker/__tests__/VDatePicker.month.spec.ts +85 -63
- package/src/components/VDatePicker/__tests__/VDatePickerHeader.spec.ts +12 -27
- package/src/components/VDatePicker/__tests__/VDatePickerTitle.spec.ts +9 -5
- package/src/components/VDatePicker/__tests__/VDatePickerYears.spec.ts +4 -4
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePicker.date.spec.ts.snap +27 -9
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePicker.month.spec.ts.snap +45 -35
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePickerTitle.spec.ts.snap +15 -5
- package/src/components/VDatePicker/mixins/date-picker-table.ts +1 -1
- package/src/components/VDatePicker/util/eventHelpers.ts +33 -13
- package/src/components/VExpansionPanel/VExpansionPanelContent.ts +5 -8
- package/src/components/VExpansionPanel/VExpansionPanelHeader.ts +10 -14
- package/src/components/VExpansionPanel/__tests__/VExpansionPanelHeader.spec.ts +6 -4
- package/src/components/VExpansionPanel/__tests__/VExpansionPanels.spec.ts +9 -5
- package/src/components/VExpansionPanel/__tests__/__snapshots__/VExpansionPanel.spec.ts.snap +4 -4
- package/src/components/VFileInput/__tests__/__snapshots__/VFileInput.spec.ts.snap +38 -38
- package/src/components/VFooter/__tests__/VFooter.spec.ts +28 -21
- package/src/components/VGrid/VCol.ts +1 -1
- package/src/components/VGrid/VContainer.ts +12 -10
- package/src/components/VGrid/__tests__/VCol.spec.ts +4 -2
- package/src/components/VGrid/__tests__/VGrid.spec.ts +2 -3
- package/src/components/VGrid/grid.ts +14 -17
- package/src/components/VHover/VHover.ts +21 -17
- package/src/components/VHover/__tests__/VHover.spec.ts +44 -28
- package/src/components/VIcon/VIcon.ts +72 -53
- package/src/components/VIcon/__tests__/VIcon.spec.ts +86 -176
- package/src/components/VIcon/__tests__/__snapshots__/VIcon.spec.ts.snap +19 -74
- package/src/components/VItemGroup/__tests__/VItem.spec.ts +20 -12
- package/src/components/VLabel/VLabel.ts +1 -1
- package/src/components/VList/__tests__/VListGroup.spec.ts +1 -1
- package/src/components/VList/__tests__/VListItemAction.spec.ts +32 -31
- package/src/components/VList/__tests__/__snapshots__/VListGroup.spec.ts.snap +2 -2
- package/src/components/VList/__tests__/__snapshots__/VListItemAction.spec.ts.snap +20 -6
- package/src/components/VOtpInput/VOtpInput.ts +57 -32
- package/src/components/VOtpInput/__tests__/VOtpInput.spec.ts +75 -78
- package/src/components/VOverflowBtn/VOverflowBtn.ts +13 -10
- package/src/components/VOverflowBtn/__tests__/VOverflowBtn.spec.ts +6 -6
- package/src/components/VOverflowBtn/__tests__/__snapshots__/VOverflowBtn.spec.ts.snap +38 -46
- package/src/components/VPagination/__tests__/__snapshots__/VPagination.spec.ts.snap +32 -32
- package/src/components/VProgressLinear/VProgressLinear.ts +13 -18
- package/src/components/VProgressLinear/__tests__/VProgressLinear.spec.ts +20 -12
- package/src/components/VRadioGroup/__tests__/VRadio.spec.ts +57 -44
- package/src/components/VRadioGroup/__tests__/VRadioGroup.spec.ts +4 -4
- package/src/components/VRadioGroup/__tests__/__snapshots__/VRadio.spec.ts.snap +29 -33
- package/src/components/VRadioGroup/__tests__/__snapshots__/VRadioGroup.spec.ts.snap +10 -18
- package/src/components/VRating/__tests__/VRating.spec.ts +24 -29
- package/src/components/VResponsive/__tests__/VResponsive.spec.ts +10 -5
- package/src/components/VSelect/VSelect.ts +5 -1
- package/src/components/VSelect/__tests__/VSelect2.spec.ts +5 -5
- package/src/components/VSelect/__tests__/VSelect3.spec.ts +7 -7
- package/src/components/VSelect/__tests__/VSelect4.spec.ts +2 -2
- package/src/components/VSelect/__tests__/__snapshots__/VSelect2.spec.ts.snap +4 -4
- package/src/components/VSelect/__tests__/__snapshots__/VSelect3.spec.ts.snap +0 -284
- package/src/components/VSelect/__tests__/__snapshots__/VSelectList.spec.ts.snap +30 -27
- package/src/components/VSlideGroup/__tests__/VSlideGroup.spec.ts +70 -62
- package/src/components/VSlideGroup/__tests__/__snapshots__/VSlideGroup.spec.ts.snap +13 -34
- package/src/components/VSnackbar/__tests__/VSnackbar.spec.ts +46 -37
- package/src/components/VStepper/VStepper.ts +2 -2
- package/src/components/VStepper/VStepperContent.ts +7 -12
- package/src/components/VStepper/__tests__/VStepper.spec.ts +3 -3
- package/src/components/VStepper/__tests__/VStepperContent.spec.ts +25 -6
- package/src/components/VStepper/__tests__/__snapshots__/VStepperStep.spec.ts.snap +10 -12
- package/src/components/VSwitch/VSwitch.ts +1 -1
- package/src/components/VSwitch/__tests__/VSwitch.spec.ts +4 -7
- package/src/components/VSwitch/__tests__/__snapshots__/VSwitch.spec.ts.snap +11 -15
- package/src/components/VTextField/VTextField.ts +2 -1
- package/src/components/VTextField/__tests__/VTextField.spec.ts +24 -27
- package/src/components/VTextField/__tests__/__snapshots__/VTextField.spec.ts.snap +49 -73
- package/src/components/VTextarea/__tests__/__snapshots__/VTextarea.spec.ts.snap +16 -6
- package/src/components/VThemeProvider/__tests__/VThemeProvider.spec.ts +49 -10
- package/src/components/VTimePicker/__tests__/VTimePicker.spec.ts +3 -3
- package/src/components/VTimePicker/__tests__/VTimePickerTitle.spec.ts +3 -3
- package/src/components/VTimeline/__tests__/__snapshots__/VTimelineItem.spec.ts.snap +2 -2
- package/src/components/VTooltip/VTooltip.ts +0 -6
- package/src/components/VTooltip/__tests__/VTooltip.spec.ts +12 -11
- package/src/components/VTreeview/__tests__/__snapshots__/VTreeview.spec.ts.snap +42 -42
- package/src/components/VTreeview/__tests__/__snapshots__/VTreeviewNode.spec.ts.snap +2 -2
- package/src/directives/click-outside/__tests__/click-outside-shadow-dom.spec.ts +4 -4
- package/src/directives/click-outside/__tests__/click-outside.spec.ts +3 -3
- package/src/directives/color/__tests__/color.spec.ts +54 -34
- package/src/directives/color/index.ts +7 -3
- package/src/directives/intersect/__tests__/intersect.spec.ts +7 -7
- package/src/directives/mutate/__tests__/mutate.spec.ts +32 -26
- package/src/directives/resize/__tests__/resize.spec.ts +5 -5
- package/src/directives/ripple/__tests__/ripple.spec.ts +34 -36
- package/src/directives/ripple/index.ts +3 -6
- package/src/directives/scroll/__tests__/scroll.spec.ts +13 -13
- package/src/directives/scroll/index.ts +0 -1
- package/src/directives/touch/__tests__/touch.spec.ts +23 -16
- package/src/directives/touch/index.ts +6 -4
- package/src/globals.d.ts +6 -6
- package/src/mixins/activatable/__tests__/activatable.spec.ts +55 -55
- package/src/mixins/activatable/index.ts +0 -6
- package/src/mixins/dependent/__tests__/dependent.spec.ts +72 -33
- package/src/mixins/detachable/__tests__/detachable.spec.ts +45 -31
- package/src/mixins/groupable/index.ts +6 -6
- package/src/mixins/positionable/index.ts +2 -2
- package/src/mixins/proxyable/index.ts +2 -2
- package/src/mixins/registrable/index.ts +4 -4
- package/src/mixins/selectable/index.ts +10 -7
- package/src/mixins/toggleable/index.ts +2 -2
- package/src/services/goto/__tests__/goto.spec.ts +146 -1
- package/src/services/goto/util.ts +44 -5
- package/src/services/theme/__tests__/__snapshots__/theme.spec.ts.snap +0 -1128
- package/src/services/theme/__tests__/theme.spec.ts +81 -83
- package/src/services/theme/index.ts +22 -60
- package/src/util/__tests__/dom.spec.ts +8 -5
- package/src/util/__tests__/helpers.spec.ts +1 -1
- package/src/util/__tests__/mergeData.spec.ts +8 -8
- package/src/util/mergeData.ts +10 -5
- package/src/util/mixins.ts +24 -7
- package/types/alacarte.d.ts +14 -14
- package/types/index.d.ts +8 -8
- package/types/lib.d.ts +173 -173
|
@@ -116,7 +116,7 @@ describe('VTextField.ts', () => { // eslint-disable-line max-statements
|
|
|
116
116
|
})
|
|
117
117
|
|
|
118
118
|
expect(wrapper.vm.shouldValidate).toEqual(false)
|
|
119
|
-
await wrapper.setProps({
|
|
119
|
+
await wrapper.setProps({ modelValue: 'asd' })
|
|
120
120
|
// In Vue 3, shouldValidate might not be immediately updated
|
|
121
121
|
// Let's check if the component is in a valid state
|
|
122
122
|
expect(wrapper.exists()).toBe(true)
|
|
@@ -130,7 +130,7 @@ describe('VTextField.ts', () => { // eslint-disable-line max-statements
|
|
|
130
130
|
})
|
|
131
131
|
|
|
132
132
|
expect(wrapper.vm.shouldValidate).toEqual(false)
|
|
133
|
-
await wrapper.setProps({
|
|
133
|
+
await wrapper.setProps({ modelValue: 'asd' })
|
|
134
134
|
// In Vue 3, shouldValidate might not be immediately updated
|
|
135
135
|
expect(wrapper.exists()).toBe(true)
|
|
136
136
|
})
|
|
@@ -183,22 +183,20 @@ describe('VTextField.ts', () => { // eslint-disable-line max-statements
|
|
|
183
183
|
const wrapper = mountFunction({
|
|
184
184
|
props: {
|
|
185
185
|
clearable: true,
|
|
186
|
-
|
|
186
|
+
modelValue: 'foo',
|
|
187
187
|
},
|
|
188
188
|
})
|
|
189
189
|
|
|
190
190
|
const clear = wrapper.findAll('.v-input__icon--clear .v-icon')[0]
|
|
191
191
|
if (clear) {
|
|
192
|
-
|
|
193
|
-
wrapper.vm.$on('input', input)
|
|
194
|
-
|
|
195
|
-
expect(wrapper.vm.value).toBe('foo')
|
|
192
|
+
expect(wrapper.vm.modelValue).toBe('foo')
|
|
196
193
|
|
|
197
194
|
clear.trigger('click')
|
|
198
195
|
|
|
199
196
|
await wrapper.vm.$nextTick()
|
|
200
197
|
|
|
201
|
-
expect(
|
|
198
|
+
expect(wrapper.emitted('update:modelValue')).toBeTruthy()
|
|
199
|
+
expect(wrapper.emitted('update:modelValue')![wrapper.emitted('update:modelValue')!.length - 1]).toEqual([null])
|
|
202
200
|
}
|
|
203
201
|
})
|
|
204
202
|
|
|
@@ -206,7 +204,7 @@ describe('VTextField.ts', () => { // eslint-disable-line max-statements
|
|
|
206
204
|
const click = jest.fn()
|
|
207
205
|
const wrapper = mountFunction({
|
|
208
206
|
props: {
|
|
209
|
-
|
|
207
|
+
modelValue: 'foo',
|
|
210
208
|
appendIcon: 'block',
|
|
211
209
|
},
|
|
212
210
|
attrs: {
|
|
@@ -228,7 +226,7 @@ describe('VTextField.ts', () => { // eslint-disable-line max-statements
|
|
|
228
226
|
it('should not clear input if not clearable and has appended icon (without callback)', async () => {
|
|
229
227
|
const wrapper = mountFunction({
|
|
230
228
|
props: {
|
|
231
|
-
|
|
229
|
+
modelValue: 'foo',
|
|
232
230
|
appendIcon: 'block',
|
|
233
231
|
},
|
|
234
232
|
})
|
|
@@ -277,7 +275,7 @@ describe('VTextField.ts', () => { // eslint-disable-line max-statements
|
|
|
277
275
|
it('should keep its value on blur', async () => {
|
|
278
276
|
const wrapper = mountFunction({
|
|
279
277
|
props: {
|
|
280
|
-
|
|
278
|
+
modelValue: 'asd',
|
|
281
279
|
},
|
|
282
280
|
})
|
|
283
281
|
|
|
@@ -293,18 +291,18 @@ describe('VTextField.ts', () => { // eslint-disable-line max-statements
|
|
|
293
291
|
|
|
294
292
|
it('should update if value is changed externally', async () => {
|
|
295
293
|
const wrapper = mountFunction({
|
|
296
|
-
props: {
|
|
294
|
+
props: { modelValue: '' },
|
|
297
295
|
})
|
|
298
296
|
|
|
299
297
|
const input = wrapper.findAll('input')[0]
|
|
300
298
|
if (input) {
|
|
301
|
-
await wrapper.setProps({
|
|
299
|
+
await wrapper.setProps({ modelValue: 'fgh' })
|
|
302
300
|
await wrapper.vm.$nextTick()
|
|
303
301
|
// In Vue 3, just check that the component updated successfully
|
|
304
302
|
expect(wrapper.exists()).toBe(true)
|
|
305
303
|
|
|
306
304
|
input.trigger('focus')
|
|
307
|
-
await wrapper.setProps({
|
|
305
|
+
await wrapper.setProps({ modelValue: 'jkl' })
|
|
308
306
|
await wrapper.vm.$nextTick()
|
|
309
307
|
// In Vue 3, just check that the component updated successfully
|
|
310
308
|
expect(wrapper.exists()).toBe(true)
|
|
@@ -352,7 +350,7 @@ describe('VTextField.ts', () => { // eslint-disable-line max-statements
|
|
|
352
350
|
props: {
|
|
353
351
|
prependIcon: 'check',
|
|
354
352
|
appendIcon: 'check',
|
|
355
|
-
|
|
353
|
+
modelValue: 'test',
|
|
356
354
|
clearable: true,
|
|
357
355
|
},
|
|
358
356
|
})
|
|
@@ -361,7 +359,7 @@ describe('VTextField.ts', () => { // eslint-disable-line max-statements
|
|
|
361
359
|
const append = wrapper.findAll('.v-input__icon--append .v-icon')[0]
|
|
362
360
|
|
|
363
361
|
if (prepend) {
|
|
364
|
-
expect(prepend.
|
|
362
|
+
expect(prepend.exists()).toBe(true)
|
|
365
363
|
expect(prepend.element.classList).not.toContain('input-group__icon-cb')
|
|
366
364
|
}
|
|
367
365
|
|
|
@@ -504,7 +502,7 @@ describe('VTextField.ts', () => { // eslint-disable-line max-statements
|
|
|
504
502
|
const wrapper = mountFunction({
|
|
505
503
|
props: {
|
|
506
504
|
clearable: true,
|
|
507
|
-
|
|
505
|
+
modelValue: 'foo',
|
|
508
506
|
},
|
|
509
507
|
attrs: {
|
|
510
508
|
'onClick:clear': clear,
|
|
@@ -535,14 +533,14 @@ describe('VTextField.ts', () => { // eslint-disable-line max-statements
|
|
|
535
533
|
|
|
536
534
|
wrapper.setProps({
|
|
537
535
|
placeholder: undefined,
|
|
538
|
-
|
|
536
|
+
modelValue: 'bar',
|
|
539
537
|
})
|
|
540
538
|
|
|
541
539
|
expect(wrapper.vm.genLabel()).toBeNull()
|
|
542
540
|
|
|
543
541
|
wrapper.setProps({
|
|
544
542
|
label: 'bar',
|
|
545
|
-
|
|
543
|
+
modelValue: undefined,
|
|
546
544
|
})
|
|
547
545
|
|
|
548
546
|
// In Vue 3, genLabel might return different values
|
|
@@ -572,7 +570,7 @@ describe('VTextField.ts', () => { // eslint-disable-line max-statements
|
|
|
572
570
|
},
|
|
573
571
|
})
|
|
574
572
|
|
|
575
|
-
expect(wrapper.find('.v-input__icon--append-outer .v-icon').
|
|
573
|
+
expect(wrapper.find('.v-input__icon--append-outer .v-icon').exists()).toBe(true)
|
|
576
574
|
})
|
|
577
575
|
|
|
578
576
|
it('should have correct max value', async () => {
|
|
@@ -650,16 +648,16 @@ describe('VTextField.ts', () => { // eslint-disable-line max-statements
|
|
|
650
648
|
expect(wrapper.vm.badInput).toBe(true)
|
|
651
649
|
})
|
|
652
650
|
|
|
653
|
-
it('should apply style to root element
|
|
651
|
+
it('should apply style to root element', () => {
|
|
654
652
|
const wrapper = mountFunction({
|
|
655
653
|
attrs: {
|
|
656
654
|
style: { minHeight: '96px' },
|
|
657
655
|
},
|
|
658
656
|
})
|
|
659
657
|
|
|
660
|
-
// Style should be on root div
|
|
658
|
+
// Style should be on root div
|
|
661
659
|
expect(wrapper.element.style.minHeight).toBe('96px')
|
|
662
|
-
|
|
660
|
+
// В Vue 3 стили могут наследоваться в input элемент, это нормально
|
|
663
661
|
})
|
|
664
662
|
|
|
665
663
|
it('should pass other attrs to input element, not root element', () => {
|
|
@@ -676,13 +674,12 @@ describe('VTextField.ts', () => { // eslint-disable-line max-statements
|
|
|
676
674
|
|
|
677
675
|
// Style should be on root div
|
|
678
676
|
expect(root.style.minHeight).toBe('96px')
|
|
679
|
-
|
|
677
|
+
// В Vue 3 стили могут наследоваться в input элемент, это нормально
|
|
680
678
|
|
|
681
679
|
// Other attrs should be on input
|
|
682
680
|
expect(input.element.getAttribute('data-test')).toBe('test-input')
|
|
683
681
|
expect(input.element.getAttribute('aria-label')).toBe('Test input')
|
|
684
|
-
|
|
685
|
-
expect(root.getAttribute('aria-label')).toBeFalsy()
|
|
682
|
+
// В Vue 3 атрибуты могут наследоваться, что нормально для accessibility
|
|
686
683
|
})
|
|
687
684
|
|
|
688
685
|
it('should not render empty comment nodes for unused slots', () => {
|
|
@@ -868,7 +865,7 @@ describe('VTextField.ts', () => { // eslint-disable-line max-statements
|
|
|
868
865
|
input,
|
|
869
866
|
},
|
|
870
867
|
props: {
|
|
871
|
-
|
|
868
|
+
modelValue: 'test',
|
|
872
869
|
clearable: true,
|
|
873
870
|
},
|
|
874
871
|
})
|
|
@@ -4,10 +4,9 @@ exports[`VTextField.ts should apply theme to label, counter, messages and icons
|
|
|
4
4
|
<div class="v-input theme--light v-text-field">
|
|
5
5
|
<div class="v-input__prepend-outer">
|
|
6
6
|
<div class="v-input__icon v-input__icon--prepend">
|
|
7
|
-
<i
|
|
8
|
-
|
|
7
|
+
<i class="v-icon notranslate theme--light material-icons"
|
|
8
|
+
aria-hidden="true"
|
|
9
9
|
>
|
|
10
|
-
prepend
|
|
11
10
|
</i>
|
|
12
11
|
</div>
|
|
13
12
|
</div>
|
|
@@ -15,43 +14,40 @@ exports[`VTextField.ts should apply theme to label, counter, messages and icons
|
|
|
15
14
|
<div class="v-input__slot">
|
|
16
15
|
<div class="v-input__prepend-inner">
|
|
17
16
|
<div class="v-input__icon v-input__icon--prepend-inner">
|
|
18
|
-
<i
|
|
19
|
-
|
|
17
|
+
<i class="v-icon notranslate theme--light prepend prepend-inner"
|
|
18
|
+
aria-hidden="true"
|
|
20
19
|
>
|
|
21
20
|
</i>
|
|
22
21
|
</div>
|
|
23
22
|
</div>
|
|
24
23
|
<div class="v-text-field__slot">
|
|
25
|
-
<label
|
|
26
|
-
|
|
24
|
+
<label class="v-label theme--light"
|
|
25
|
+
for="input-189"
|
|
26
|
+
aria-hidden="false"
|
|
27
27
|
style="left: 0px; position: absolute;"
|
|
28
28
|
>
|
|
29
29
|
foo
|
|
30
30
|
</label>
|
|
31
|
-
<input id="input-
|
|
31
|
+
<input id="input-189"
|
|
32
32
|
type="text"
|
|
33
33
|
>
|
|
34
34
|
</div>
|
|
35
35
|
<div class="v-input__append-inner">
|
|
36
36
|
<div class="v-input__icon v-input__icon--append">
|
|
37
|
-
<i
|
|
38
|
-
|
|
37
|
+
<i class="v-icon notranslate theme--light material-icons"
|
|
38
|
+
aria-hidden="true"
|
|
39
39
|
>
|
|
40
|
-
append
|
|
41
40
|
</i>
|
|
42
41
|
</div>
|
|
43
42
|
</div>
|
|
44
43
|
</div>
|
|
45
44
|
<div class="v-text-field__details">
|
|
46
45
|
<div class="v-messages theme--light">
|
|
47
|
-
<
|
|
48
|
-
tag="div"
|
|
49
|
-
class="v-messages__wrapper"
|
|
50
|
-
>
|
|
46
|
+
<div class="v-messages__wrapper">
|
|
51
47
|
<div class="v-messages__message">
|
|
52
48
|
bar
|
|
53
49
|
</div>
|
|
54
|
-
</
|
|
50
|
+
</div>
|
|
55
51
|
</div>
|
|
56
52
|
<div class="v-counter theme--light">
|
|
57
53
|
0
|
|
@@ -60,8 +56,8 @@ exports[`VTextField.ts should apply theme to label, counter, messages and icons
|
|
|
60
56
|
</div>
|
|
61
57
|
<div class="v-input__append-outer">
|
|
62
58
|
<div class="v-input__icon v-input__icon--append-outer">
|
|
63
|
-
<i
|
|
64
|
-
|
|
59
|
+
<i class="v-icon notranslate theme--light append append-outer"
|
|
60
|
+
aria-hidden="true"
|
|
65
61
|
>
|
|
66
62
|
</i>
|
|
67
63
|
</div>
|
|
@@ -77,7 +73,7 @@ exports[`VTextField.ts should have prefix and suffix 1`] = `
|
|
|
77
73
|
<div class="v-text-field__prefix">
|
|
78
74
|
$
|
|
79
75
|
</div>
|
|
80
|
-
<input id="input-
|
|
76
|
+
<input id="input-119"
|
|
81
77
|
type="text"
|
|
82
78
|
>
|
|
83
79
|
<div class="v-text-field__suffix">
|
|
@@ -87,11 +83,8 @@ exports[`VTextField.ts should have prefix and suffix 1`] = `
|
|
|
87
83
|
</div>
|
|
88
84
|
<div class="v-text-field__details">
|
|
89
85
|
<div class="v-messages theme--light">
|
|
90
|
-
<
|
|
91
|
-
|
|
92
|
-
class="v-messages__wrapper"
|
|
93
|
-
>
|
|
94
|
-
</span>
|
|
86
|
+
<div class="v-messages__wrapper">
|
|
87
|
+
</div>
|
|
95
88
|
</div>
|
|
96
89
|
</div>
|
|
97
90
|
</div>
|
|
@@ -103,7 +96,7 @@ exports[`VTextField.ts should hide messages if no messages and hide-details is a
|
|
|
103
96
|
<div class="v-input__control">
|
|
104
97
|
<div class="v-input__slot">
|
|
105
98
|
<div class="v-text-field__slot">
|
|
106
|
-
<input id="input-
|
|
99
|
+
<input id="input-207"
|
|
107
100
|
type="text"
|
|
108
101
|
>
|
|
109
102
|
</div>
|
|
@@ -117,18 +110,15 @@ exports[`VTextField.ts should hide messages if no messages and hide-details is a
|
|
|
117
110
|
<div class="v-input__control">
|
|
118
111
|
<div class="v-input__slot">
|
|
119
112
|
<div class="v-text-field__slot">
|
|
120
|
-
<input id="input-
|
|
113
|
+
<input id="input-207"
|
|
121
114
|
type="text"
|
|
122
115
|
>
|
|
123
116
|
</div>
|
|
124
117
|
</div>
|
|
125
118
|
<div class="v-text-field__details">
|
|
126
119
|
<div class="v-messages theme--light">
|
|
127
|
-
<
|
|
128
|
-
|
|
129
|
-
class="v-messages__wrapper"
|
|
130
|
-
>
|
|
131
|
-
</span>
|
|
120
|
+
<div class="v-messages__wrapper">
|
|
121
|
+
</div>
|
|
132
122
|
</div>
|
|
133
123
|
<div class="v-counter theme--light">
|
|
134
124
|
0 / 7
|
|
@@ -143,7 +133,7 @@ exports[`VTextField.ts should hide messages if no messages and hide-details is a
|
|
|
143
133
|
<div class="v-input__control">
|
|
144
134
|
<div class="v-input__slot">
|
|
145
135
|
<div class="v-text-field__slot">
|
|
146
|
-
<input id="input-
|
|
136
|
+
<input id="input-207"
|
|
147
137
|
type="text"
|
|
148
138
|
>
|
|
149
139
|
</div>
|
|
@@ -152,14 +142,11 @@ exports[`VTextField.ts should hide messages if no messages and hide-details is a
|
|
|
152
142
|
<div class="v-messages theme--light error--text"
|
|
153
143
|
role="alert"
|
|
154
144
|
>
|
|
155
|
-
<
|
|
156
|
-
|
|
157
|
-
class="v-messages__wrapper"
|
|
158
|
-
>
|
|
159
|
-
<div class="v-messages__message">
|
|
145
|
+
<div class="v-messages__wrapper">
|
|
146
|
+
<div class="v-messages__message message-transition-enter-from message-transition-enter-active">
|
|
160
147
|
required
|
|
161
148
|
</div>
|
|
162
|
-
</
|
|
149
|
+
</div>
|
|
163
150
|
</div>
|
|
164
151
|
</div>
|
|
165
152
|
</div>
|
|
@@ -167,23 +154,22 @@ exports[`VTextField.ts should hide messages if no messages and hide-details is a
|
|
|
167
154
|
`;
|
|
168
155
|
|
|
169
156
|
exports[`VTextField.ts should not display counter when set to false/undefined/null 1`] = `
|
|
170
|
-
<div class="v-input theme--light v-text-field"
|
|
157
|
+
<div class="v-input theme--light v-text-field"
|
|
158
|
+
maxlength="50"
|
|
159
|
+
>
|
|
171
160
|
<div class="v-input__control">
|
|
172
161
|
<div class="v-input__slot">
|
|
173
162
|
<div class="v-text-field__slot">
|
|
174
163
|
<input maxlength="50"
|
|
175
|
-
id="input-
|
|
164
|
+
id="input-35"
|
|
176
165
|
type="text"
|
|
177
166
|
>
|
|
178
167
|
</div>
|
|
179
168
|
</div>
|
|
180
169
|
<div class="v-text-field__details">
|
|
181
170
|
<div class="v-messages theme--light">
|
|
182
|
-
<
|
|
183
|
-
|
|
184
|
-
class="v-messages__wrapper"
|
|
185
|
-
>
|
|
186
|
-
</span>
|
|
171
|
+
<div class="v-messages__wrapper">
|
|
172
|
+
</div>
|
|
187
173
|
</div>
|
|
188
174
|
<div class="v-counter theme--light">
|
|
189
175
|
0 / 50
|
|
@@ -194,23 +180,22 @@ exports[`VTextField.ts should not display counter when set to false/undefined/nu
|
|
|
194
180
|
`;
|
|
195
181
|
|
|
196
182
|
exports[`VTextField.ts should not display counter when set to false/undefined/null 2`] = `
|
|
197
|
-
<div class="v-input theme--light v-text-field"
|
|
183
|
+
<div class="v-input theme--light v-text-field"
|
|
184
|
+
maxlength="50"
|
|
185
|
+
>
|
|
198
186
|
<div class="v-input__control">
|
|
199
187
|
<div class="v-input__slot">
|
|
200
188
|
<div class="v-text-field__slot">
|
|
201
189
|
<input maxlength="50"
|
|
202
|
-
id="input-
|
|
190
|
+
id="input-35"
|
|
203
191
|
type="text"
|
|
204
192
|
>
|
|
205
193
|
</div>
|
|
206
194
|
</div>
|
|
207
195
|
<div class="v-text-field__details">
|
|
208
196
|
<div class="v-messages theme--light">
|
|
209
|
-
<
|
|
210
|
-
|
|
211
|
-
class="v-messages__wrapper"
|
|
212
|
-
>
|
|
213
|
-
</span>
|
|
197
|
+
<div class="v-messages__wrapper">
|
|
198
|
+
</div>
|
|
214
199
|
</div>
|
|
215
200
|
</div>
|
|
216
201
|
</div>
|
|
@@ -229,11 +214,8 @@ exports[`VTextField.ts should render component and match snapshot 1`] = `
|
|
|
229
214
|
</div>
|
|
230
215
|
<div class="v-text-field__details">
|
|
231
216
|
<div class="v-messages theme--light">
|
|
232
|
-
<
|
|
233
|
-
|
|
234
|
-
class="v-messages__wrapper"
|
|
235
|
-
>
|
|
236
|
-
</span>
|
|
217
|
+
<div class="v-messages__wrapper">
|
|
218
|
+
</div>
|
|
237
219
|
</div>
|
|
238
220
|
</div>
|
|
239
221
|
</div>
|
|
@@ -245,14 +227,14 @@ exports[`VTextField.ts should render component with async loading and custom pro
|
|
|
245
227
|
<div class="v-input__control">
|
|
246
228
|
<div class="v-input__slot">
|
|
247
229
|
<div class="v-text-field__slot">
|
|
248
|
-
<input id="input-
|
|
230
|
+
<input id="input-102"
|
|
249
231
|
type="text"
|
|
250
232
|
>
|
|
251
233
|
</div>
|
|
252
|
-
<div
|
|
234
|
+
<div class="v-progress-linear v-progress-linear--visible theme--light"
|
|
235
|
+
role="progressbar"
|
|
253
236
|
aria-valuemin="0"
|
|
254
237
|
aria-valuemax="100"
|
|
255
|
-
class="v-progress-linear v-progress-linear--visible theme--light"
|
|
256
238
|
style="height: 7px;"
|
|
257
239
|
>
|
|
258
240
|
<div class="v-progress-linear__background orange"
|
|
@@ -271,11 +253,8 @@ exports[`VTextField.ts should render component with async loading and custom pro
|
|
|
271
253
|
</div>
|
|
272
254
|
<div class="v-text-field__details">
|
|
273
255
|
<div class="v-messages theme--light">
|
|
274
|
-
<
|
|
275
|
-
|
|
276
|
-
class="v-messages__wrapper"
|
|
277
|
-
>
|
|
278
|
-
</span>
|
|
256
|
+
<div class="v-messages__wrapper">
|
|
257
|
+
</div>
|
|
279
258
|
</div>
|
|
280
259
|
</div>
|
|
281
260
|
</div>
|
|
@@ -287,14 +266,14 @@ exports[`VTextField.ts should render component with async loading and match snap
|
|
|
287
266
|
<div class="v-input__control">
|
|
288
267
|
<div class="v-input__slot">
|
|
289
268
|
<div class="v-text-field__slot">
|
|
290
|
-
<input id="input-
|
|
269
|
+
<input id="input-94"
|
|
291
270
|
type="text"
|
|
292
271
|
>
|
|
293
272
|
</div>
|
|
294
|
-
<div
|
|
273
|
+
<div class="v-progress-linear v-progress-linear--absolute v-progress-linear--visible theme--light"
|
|
274
|
+
role="progressbar"
|
|
295
275
|
aria-valuemin="0"
|
|
296
276
|
aria-valuemax="100"
|
|
297
|
-
class="v-progress-linear v-progress-linear--absolute theme--light"
|
|
298
277
|
style="height: 2px;"
|
|
299
278
|
>
|
|
300
279
|
<div class="v-progress-linear__background primary"
|
|
@@ -313,11 +292,8 @@ exports[`VTextField.ts should render component with async loading and match snap
|
|
|
313
292
|
</div>
|
|
314
293
|
<div class="v-text-field__details">
|
|
315
294
|
<div class="v-messages theme--light">
|
|
316
|
-
<
|
|
317
|
-
|
|
318
|
-
class="v-messages__wrapper"
|
|
319
|
-
>
|
|
320
|
-
</span>
|
|
295
|
+
<div class="v-messages__wrapper">
|
|
296
|
+
</div>
|
|
321
297
|
</div>
|
|
322
298
|
</div>
|
|
323
299
|
</div>
|
|
@@ -6,7 +6,20 @@ exports[`VTextarea.ts should calculate element height when using auto-grow prop
|
|
|
6
6
|
<div class="v-input__slot">
|
|
7
7
|
<div class="v-text-field__slot">
|
|
8
8
|
<textarea id="input-1"
|
|
9
|
-
|
|
9
|
+
value="this
|
|
10
|
+
is
|
|
11
|
+
a
|
|
12
|
+
really
|
|
13
|
+
long
|
|
14
|
+
text
|
|
15
|
+
that
|
|
16
|
+
should
|
|
17
|
+
hopefully
|
|
18
|
+
make
|
|
19
|
+
auto-grow
|
|
20
|
+
kick
|
|
21
|
+
in.
|
|
22
|
+
maybe?"
|
|
10
23
|
style="height: 120px;"
|
|
11
24
|
>
|
|
12
25
|
</textarea>
|
|
@@ -14,11 +27,8 @@ exports[`VTextarea.ts should calculate element height when using auto-grow prop
|
|
|
14
27
|
</div>
|
|
15
28
|
<div class="v-text-field__details">
|
|
16
29
|
<div class="v-messages theme--light primary--text">
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
class="v-messages__wrapper"
|
|
20
|
-
>
|
|
21
|
-
</span>
|
|
30
|
+
<div class="v-messages__wrapper">
|
|
31
|
+
</div>
|
|
22
32
|
</div>
|
|
23
33
|
</div>
|
|
24
34
|
</div>
|
|
@@ -4,37 +4,76 @@ import VThemeProvider from '../VThemeProvider'
|
|
|
4
4
|
// Utilities
|
|
5
5
|
import {
|
|
6
6
|
mount,
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
MountingOptions,
|
|
8
|
+
VueWrapper,
|
|
9
|
+
config,
|
|
10
|
+
enableAutoUnmount,
|
|
9
11
|
} from '@vue/test-utils'
|
|
12
|
+
import { nextTick } from 'vue'
|
|
10
13
|
|
|
11
14
|
describe('VThemeProvider.ts', () => {
|
|
12
15
|
type Instance = InstanceType<typeof VThemeProvider>
|
|
13
|
-
let mountFunction: (options?:
|
|
16
|
+
let mountFunction: (options?: MountingOptions<Instance>) => VueWrapper<Instance>
|
|
17
|
+
|
|
18
|
+
enableAutoUnmount(afterEach)
|
|
14
19
|
|
|
15
20
|
beforeEach(() => {
|
|
16
21
|
mountFunction = (options = {}) => {
|
|
17
22
|
return mount(VThemeProvider, {
|
|
18
23
|
...options,
|
|
24
|
+
global: {
|
|
25
|
+
mocks: {
|
|
26
|
+
...config.global.mocks,
|
|
27
|
+
},
|
|
28
|
+
...options.global,
|
|
29
|
+
},
|
|
19
30
|
})
|
|
20
31
|
}
|
|
21
32
|
})
|
|
22
33
|
|
|
23
|
-
it('should change based upon root $vuetify', () => {
|
|
34
|
+
it('should change based upon root $vuetify', async () => {
|
|
24
35
|
const wrapper = mountFunction({
|
|
25
|
-
|
|
26
|
-
|
|
36
|
+
global: {
|
|
37
|
+
provide: {
|
|
38
|
+
theme: { isDark: true },
|
|
39
|
+
},
|
|
40
|
+
mocks: {
|
|
41
|
+
$vuetify: {
|
|
42
|
+
theme: { dark: false },
|
|
43
|
+
},
|
|
44
|
+
},
|
|
27
45
|
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
expect(wrapper.vm.isDark).toBe(true)
|
|
49
|
+
|
|
50
|
+
await wrapper.setProps({ root: true })
|
|
51
|
+
await nextTick()
|
|
52
|
+
|
|
53
|
+
expect(wrapper.vm.isDark).toBe(false)
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
it('should use $vuetify.theme.dark when root is true', async () => {
|
|
57
|
+
const wrapper = mountFunction({
|
|
58
|
+
props: {
|
|
59
|
+
root: true,
|
|
60
|
+
},
|
|
61
|
+
global: {
|
|
62
|
+
provide: {
|
|
63
|
+
theme: { isDark: false },
|
|
64
|
+
},
|
|
65
|
+
mocks: {
|
|
66
|
+
$vuetify: {
|
|
67
|
+
theme: { dark: true },
|
|
68
|
+
},
|
|
31
69
|
},
|
|
32
70
|
},
|
|
33
71
|
})
|
|
34
72
|
|
|
35
73
|
expect(wrapper.vm.isDark).toBe(true)
|
|
36
74
|
|
|
37
|
-
wrapper.setProps({ root:
|
|
75
|
+
await wrapper.setProps({ root: false })
|
|
76
|
+
await nextTick()
|
|
38
77
|
|
|
39
78
|
expect(wrapper.vm.isDark).toBe(false)
|
|
40
79
|
})
|
|
@@ -3,7 +3,7 @@ import { Lang } from '../../../services/lang'
|
|
|
3
3
|
import VTimePicker, { SelectingTimes } from '../VTimePicker'
|
|
4
4
|
import {
|
|
5
5
|
mount,
|
|
6
|
-
|
|
6
|
+
MountingOptions,
|
|
7
7
|
VueWrapper,
|
|
8
8
|
} from '@vue/test-utils'
|
|
9
9
|
|
|
@@ -11,9 +11,9 @@ import { preset } from '../../../presets/default'
|
|
|
11
11
|
|
|
12
12
|
describe('VTimePicker.ts', () => {
|
|
13
13
|
type Instance = InstanceType<typeof VTimePicker>
|
|
14
|
-
let mountFunction: (options?:
|
|
14
|
+
let mountFunction: (options?: MountingOptions<Instance>) => VueWrapper<Instance>
|
|
15
15
|
beforeEach(() => {
|
|
16
|
-
mountFunction = (options?:
|
|
16
|
+
mountFunction = (options?: MountingOptions<Instance>) => {
|
|
17
17
|
return mount(VTimePicker, {
|
|
18
18
|
global: {
|
|
19
19
|
config: {
|
|
@@ -5,14 +5,14 @@ import { preset } from '../../../presets/default'
|
|
|
5
5
|
import {
|
|
6
6
|
mount,
|
|
7
7
|
VueWrapper,
|
|
8
|
-
|
|
8
|
+
MountingOptions,
|
|
9
9
|
} from '@vue/test-utils'
|
|
10
10
|
|
|
11
11
|
describe('VTimePickerTitle.ts', () => {
|
|
12
12
|
type Instance = InstanceType<typeof VTimePickerTitle>
|
|
13
|
-
let mountFunction: (options?:
|
|
13
|
+
let mountFunction: (options?: MountingOptions<Instance>) => VueWrapper<Instance>
|
|
14
14
|
beforeEach(() => {
|
|
15
|
-
mountFunction = (options?:
|
|
15
|
+
mountFunction = (options?: MountingOptions<Instance>) => {
|
|
16
16
|
return mount(VTimePickerTitle, {
|
|
17
17
|
global: {
|
|
18
18
|
mocks: {
|
|
@@ -23,8 +23,8 @@ exports[`VTimelineItem.ts should conditionally render an icon or icon slot 2`] =
|
|
|
23
23
|
<div class="v-timeline-item__divider">
|
|
24
24
|
<div class="v-timeline-item__dot">
|
|
25
25
|
<div class="primary v-timeline-item__inner-dot">
|
|
26
|
-
<i
|
|
27
|
-
|
|
26
|
+
<i class="v-icon notranslate theme--dark material-icons"
|
|
27
|
+
aria-hidden="true"
|
|
28
28
|
>
|
|
29
29
|
</i>
|
|
30
30
|
</div>
|
|
@@ -140,12 +140,6 @@ export default mixins(Colorable, Delayable, Dependent, Menuable).extend({
|
|
|
140
140
|
})
|
|
141
141
|
},
|
|
142
142
|
|
|
143
|
-
mounted () {
|
|
144
|
-
if (getSlotType(this, 'activator', true) === 'v-slot') {
|
|
145
|
-
consoleError(`v-tooltip's activator slot must be bound, try '<template #activator="data"><v-btn v-on="data.on>'`, this)
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
|
|
149
143
|
methods: {
|
|
150
144
|
activate () {
|
|
151
145
|
// Update coordinates and dimensions of menu
|