@dimailn/vuetify 2.7.2-alpha27 → 2.7.2-alpha28
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 +78 -22
- 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 +0 -1
- package/es5/components/VAlert/VAlert.js.map +1 -1
- package/es5/components/VChip/VChip.js +1 -0
- package/es5/components/VChip/VChip.js.map +1 -1
- package/es5/components/VList/VListItem.js +4 -2
- package/es5/components/VList/VListItem.js.map +1 -1
- package/es5/components/VMenu/VMenu.js +1 -1
- package/es5/components/VMenu/VMenu.js.map +1 -1
- package/es5/components/VOtpInput/VOtpInput.js +36 -0
- package/es5/components/VOtpInput/VOtpInput.js.map +1 -1
- package/es5/components/VSelect/VSelectList.js +15 -2
- package/es5/components/VSelect/VSelectList.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/lib/components/VAlert/VAlert.js +0 -1
- package/lib/components/VAlert/VAlert.js.map +1 -1
- package/lib/components/VChip/VChip.js +1 -0
- package/lib/components/VChip/VChip.js.map +1 -1
- package/lib/components/VList/VListItem.js +4 -2
- package/lib/components/VList/VListItem.js.map +1 -1
- package/lib/components/VMenu/VMenu.js +1 -1
- package/lib/components/VMenu/VMenu.js.map +1 -1
- package/lib/components/VOtpInput/VOtpInput.js +48 -0
- package/lib/components/VOtpInput/VOtpInput.js.map +1 -1
- package/lib/components/VSelect/VSelectList.js +11 -5
- package/lib/components/VSelect/VSelectList.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/package.json +1 -1
- package/src/components/VAlert/VAlert.ts +0 -1
- 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/VBanner/__tests__/VBanner.spec.ts +35 -36
- package/src/components/VBanner/__tests__/__snapshots__/VBanner.spec.ts.snap +1 -1
- 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/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/__tests__/__snapshots__/VColorPicker.spec.ts.snap +35 -35
- package/src/components/VColorPicker/__tests__/__snapshots__/VColorPickerEdit.spec.ts.snap +10 -10
- package/src/components/VData/__tests__/VData.spec.ts +69 -90
- 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 +910 -988
- package/src/components/VDataTable/__tests__/VEditDialog.spec.ts +26 -22
- package/src/components/VDataTable/__tests__/VSimpleTable.spec.ts +60 -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__/VEditDialog.spec.ts.snap +18 -10
- package/src/components/VDataTable/mixins/__tests__/__snapshots__/header.spec.ts.snap +1 -1
- 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/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/VListItem.ts +9 -3
- 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 +1 -1
- package/src/components/VMessages/__tests__/VMessages.spec.ts +14 -13
- package/src/components/VOtpInput/VOtpInput.ts +37 -1
- 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/VResponsive/__tests__/__snapshots__/VResponsive.spec.ts.snap +2 -2
- package/src/components/VSelect/VSelectList.ts +9 -9
- 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/VSparkline/__tests__/VSparkline.spec.ts +33 -35
- 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/__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
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
mount,
|
|
11
11
|
Wrapper,
|
|
12
12
|
} from '@vue/test-utils'
|
|
13
|
+
import { h } from 'vue'
|
|
13
14
|
|
|
14
15
|
// Types
|
|
15
16
|
import { ExtractVue } from '../../../util/mixins'
|
|
@@ -22,16 +23,21 @@ describe('VBanner.ts', () => {
|
|
|
22
23
|
mountFunction = (options = {}) => {
|
|
23
24
|
return mount(VBanner, {
|
|
24
25
|
...options,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
global: {
|
|
27
|
+
mocks: {
|
|
28
|
+
$vuetify: {
|
|
29
|
+
application: {
|
|
30
|
+
top: 0,
|
|
31
|
+
bar: 0,
|
|
32
|
+
},
|
|
33
|
+
breakpoint: {
|
|
34
|
+
mobile: true,
|
|
35
|
+
mobileBreakpoint: 1264,
|
|
36
|
+
width: 1000,
|
|
37
|
+
},
|
|
38
|
+
icons: {
|
|
39
|
+
component: null,
|
|
40
|
+
},
|
|
35
41
|
},
|
|
36
42
|
},
|
|
37
43
|
},
|
|
@@ -67,7 +73,7 @@ describe('VBanner.ts', () => {
|
|
|
67
73
|
slots: {
|
|
68
74
|
default: 'Hello, World!',
|
|
69
75
|
},
|
|
70
|
-
|
|
76
|
+
props: {
|
|
71
77
|
icon: 'mdi-plus',
|
|
72
78
|
},
|
|
73
79
|
})
|
|
@@ -79,7 +85,7 @@ describe('VBanner.ts', () => {
|
|
|
79
85
|
const wrapper = mountFunction({
|
|
80
86
|
slots: {
|
|
81
87
|
default: 'Hello, World!',
|
|
82
|
-
icon:
|
|
88
|
+
icon: () => h('span', ['icon']),
|
|
83
89
|
},
|
|
84
90
|
})
|
|
85
91
|
|
|
@@ -90,7 +96,7 @@ describe('VBanner.ts', () => {
|
|
|
90
96
|
const wrapper = mountFunction({
|
|
91
97
|
slots: {
|
|
92
98
|
default: 'Hello, World!',
|
|
93
|
-
actions:
|
|
99
|
+
actions: () => h('div', [h('button', ['OK']), h('button', ['Cancel'])]),
|
|
94
100
|
},
|
|
95
101
|
})
|
|
96
102
|
|
|
@@ -102,19 +108,16 @@ describe('VBanner.ts', () => {
|
|
|
102
108
|
slots: {
|
|
103
109
|
default: 'Hello, World!',
|
|
104
110
|
},
|
|
105
|
-
|
|
111
|
+
props: {
|
|
106
112
|
icon: 'mdi-plus',
|
|
107
113
|
},
|
|
108
114
|
})
|
|
109
115
|
|
|
110
|
-
const fn = jest.fn()
|
|
111
|
-
wrapper.vm.$on('click:icon', fn)
|
|
112
|
-
|
|
113
116
|
const icon = wrapper.find('.v-banner__icon')
|
|
114
117
|
|
|
115
|
-
expect(
|
|
118
|
+
expect(wrapper.emitted('click:icon')).toBeFalsy()
|
|
116
119
|
icon.trigger('click')
|
|
117
|
-
expect(
|
|
120
|
+
expect(wrapper.emitted('click:icon')).toBeTruthy()
|
|
118
121
|
})
|
|
119
122
|
|
|
120
123
|
it(`should not render icon container if icon property and slot aren't passed`, () => {
|
|
@@ -167,16 +170,10 @@ describe('VBanner.ts', () => {
|
|
|
167
170
|
const wrapper = mountFunction({
|
|
168
171
|
slots: {
|
|
169
172
|
default: 'Hello, World!',
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
on: {
|
|
175
|
-
click: props.dismiss,
|
|
176
|
-
},
|
|
177
|
-
class: 'test',
|
|
178
|
-
})
|
|
179
|
-
},
|
|
173
|
+
actions: ({ dismiss }) => h('div', {
|
|
174
|
+
onClick: dismiss,
|
|
175
|
+
class: 'test',
|
|
176
|
+
}),
|
|
180
177
|
},
|
|
181
178
|
})
|
|
182
179
|
|
|
@@ -191,9 +188,11 @@ describe('VBanner.ts', () => {
|
|
|
191
188
|
slots: {
|
|
192
189
|
default: 'Hello, World!',
|
|
193
190
|
},
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
191
|
+
global: {
|
|
192
|
+
mocks: {
|
|
193
|
+
$vuetify: {
|
|
194
|
+
breakpoint: new Breakpoint(preset),
|
|
195
|
+
},
|
|
197
196
|
},
|
|
198
197
|
},
|
|
199
198
|
})
|
|
@@ -201,16 +200,16 @@ describe('VBanner.ts', () => {
|
|
|
201
200
|
expect(wrapper.classes('v-banner--is-mobile')).toBeTruthy()
|
|
202
201
|
})
|
|
203
202
|
|
|
204
|
-
it('should apply sticky when using the app prop', () => {
|
|
203
|
+
it('should apply sticky when using the app prop', async () => {
|
|
205
204
|
const wrapper = mountFunction({
|
|
206
|
-
|
|
205
|
+
props: { app: true },
|
|
207
206
|
})
|
|
208
207
|
|
|
209
208
|
expect(wrapper.vm.isSticky).toBe(true)
|
|
210
209
|
|
|
211
210
|
expect(wrapper.html()).toMatchSnapshot()
|
|
212
211
|
|
|
213
|
-
wrapper.setProps({
|
|
212
|
+
await wrapper.setProps({
|
|
214
213
|
app: false,
|
|
215
214
|
sticky: true,
|
|
216
215
|
})
|
|
@@ -219,7 +218,7 @@ describe('VBanner.ts', () => {
|
|
|
219
218
|
|
|
220
219
|
expect(wrapper.html()).toMatchSnapshot()
|
|
221
220
|
|
|
222
|
-
wrapper.setProps({ sticky: false })
|
|
221
|
+
await wrapper.setProps({ app: false, sticky: false })
|
|
223
222
|
|
|
224
223
|
expect(wrapper.vm.isSticky).toBe(false)
|
|
225
224
|
|
|
@@ -114,7 +114,7 @@ exports[`VBanner.ts should render component with icon slot 1`] = `
|
|
|
114
114
|
`;
|
|
115
115
|
|
|
116
116
|
exports[`VBanner.ts should render sinle-line component with content 1`] = `
|
|
117
|
-
<div class="v-banner v-sheet theme--light v-banner--is-mobile">
|
|
117
|
+
<div class="v-banner v-sheet theme--light v-banner--is-mobile v-banner--single-line">
|
|
118
118
|
<div class="v-banner__wrapper">
|
|
119
119
|
<div class="v-banner__content">
|
|
120
120
|
<div class="v-banner__text">
|
|
@@ -1,21 +1,49 @@
|
|
|
1
1
|
import {
|
|
2
2
|
mount,
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
VueWrapper,
|
|
4
|
+
MountingOptions,
|
|
5
5
|
} from '@vue/test-utils'
|
|
6
6
|
import VCard from '../VCard'
|
|
7
|
-
import { ExtractVue } from '../../../util/mixins'
|
|
8
7
|
|
|
9
8
|
describe('VCard.vue', () => {
|
|
10
|
-
type Instance =
|
|
11
|
-
let mountFunction: (options?:
|
|
9
|
+
type Instance = InstanceType<typeof VCard>
|
|
10
|
+
let mountFunction: (options?: MountingOptions<Instance>) => VueWrapper<Instance>
|
|
11
|
+
|
|
12
12
|
beforeEach(() => {
|
|
13
|
-
mountFunction = (options?:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
mountFunction = (options?: MountingOptions<Instance>) => {
|
|
14
|
+
const defaultOptions = {
|
|
15
|
+
global: {
|
|
16
|
+
mocks: {
|
|
17
|
+
$vuetify: {
|
|
18
|
+
rtl: false,
|
|
19
|
+
lang: {
|
|
20
|
+
t: (val: string) => val,
|
|
21
|
+
},
|
|
22
|
+
icons: {
|
|
23
|
+
component: 'mdi',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
$activeClass: 'v-card--active',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
slots: {},
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Объединяем опции правильно
|
|
33
|
+
const mergedOptions = {
|
|
34
|
+
...defaultOptions,
|
|
17
35
|
...options,
|
|
18
|
-
|
|
36
|
+
slots: {
|
|
37
|
+
...defaultOptions.slots,
|
|
38
|
+
...options?.slots,
|
|
39
|
+
},
|
|
40
|
+
global: {
|
|
41
|
+
...defaultOptions.global,
|
|
42
|
+
...options?.global,
|
|
43
|
+
},
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return mount(VCard, mergedOptions)
|
|
19
47
|
}
|
|
20
48
|
})
|
|
21
49
|
|
|
@@ -27,14 +55,9 @@ describe('VCard.vue', () => {
|
|
|
27
55
|
|
|
28
56
|
it('should render loading card', () => {
|
|
29
57
|
const wrapper = mountFunction({
|
|
30
|
-
|
|
58
|
+
props: {
|
|
31
59
|
loading: true,
|
|
32
60
|
},
|
|
33
|
-
mocks: {
|
|
34
|
-
$vuetify: {
|
|
35
|
-
rtl: false,
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
61
|
})
|
|
39
62
|
|
|
40
63
|
expect(wrapper.html()).toMatchSnapshot()
|
|
@@ -42,10 +65,8 @@ describe('VCard.vue', () => {
|
|
|
42
65
|
|
|
43
66
|
it('should render card, which is link', () => {
|
|
44
67
|
const wrapper = mountFunction({
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
listeners: {
|
|
48
|
-
click: () => {},
|
|
68
|
+
attrs: {
|
|
69
|
+
onClick: () => {},
|
|
49
70
|
},
|
|
50
71
|
})
|
|
51
72
|
|
|
@@ -54,7 +75,7 @@ describe('VCard.vue', () => {
|
|
|
54
75
|
|
|
55
76
|
it('should render card with img', () => {
|
|
56
77
|
const wrapper = mountFunction({
|
|
57
|
-
|
|
78
|
+
props: {
|
|
58
79
|
img: 'image.jpg',
|
|
59
80
|
},
|
|
60
81
|
})
|
|
@@ -64,7 +85,7 @@ describe('VCard.vue', () => {
|
|
|
64
85
|
|
|
65
86
|
it('should render a flat card', () => {
|
|
66
87
|
const wrapper = mountFunction({
|
|
67
|
-
|
|
88
|
+
props: {
|
|
68
89
|
flat: true,
|
|
69
90
|
},
|
|
70
91
|
})
|
|
@@ -74,7 +95,7 @@ describe('VCard.vue', () => {
|
|
|
74
95
|
|
|
75
96
|
it('should render a raised card', () => {
|
|
76
97
|
const wrapper = mountFunction({
|
|
77
|
-
|
|
98
|
+
props: {
|
|
78
99
|
raised: true,
|
|
79
100
|
},
|
|
80
101
|
})
|
|
@@ -85,9 +106,7 @@ describe('VCard.vue', () => {
|
|
|
85
106
|
it('should render a card with custom height', async () => {
|
|
86
107
|
const heightpx = '400px'
|
|
87
108
|
const wrapper = mountFunction({
|
|
88
|
-
|
|
89
|
-
sync: false,
|
|
90
|
-
propsData: {
|
|
109
|
+
props: {
|
|
91
110
|
height: heightpx,
|
|
92
111
|
},
|
|
93
112
|
})
|
|
@@ -95,10 +114,9 @@ describe('VCard.vue', () => {
|
|
|
95
114
|
expect(wrapper.element.style.height).toBe(heightpx)
|
|
96
115
|
expect(wrapper.html()).toMatchSnapshot()
|
|
97
116
|
|
|
98
|
-
wrapper.setProps({
|
|
117
|
+
await wrapper.setProps({
|
|
99
118
|
height: 401,
|
|
100
119
|
})
|
|
101
|
-
await wrapper.vm.$nextTick()
|
|
102
120
|
expect(wrapper.element.style.height).toBe('401px')
|
|
103
121
|
})
|
|
104
122
|
})
|
|
@@ -37,10 +37,10 @@ exports[`VCard.vue should render component and match snapshot 1`] = `
|
|
|
37
37
|
exports[`VCard.vue should render loading card 1`] = `
|
|
38
38
|
<div class="v-card v-card--loading v-sheet theme--light">
|
|
39
39
|
<div class="v-card__progress">
|
|
40
|
-
<div
|
|
40
|
+
<div class="v-progress-linear v-progress-linear--absolute v-progress-linear--visible theme--light"
|
|
41
|
+
role="progressbar"
|
|
41
42
|
aria-valuemin="0"
|
|
42
43
|
aria-valuemax="100"
|
|
43
|
-
class="v-progress-linear v-progress-linear--absolute v-progress-linear--visible theme--light"
|
|
44
44
|
style="height: 4px;"
|
|
45
45
|
>
|
|
46
46
|
<div class="v-progress-linear__background primary"
|