@dimailn/vuetify 2.7.2-alpha29 → 2.7.2-alpha31
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 +166 -78
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +1 -1
- package/dist/vuetify.min.js +2 -2
- package/es5/components/VBreadcrumbs/VBreadcrumbs.js +8 -6
- package/es5/components/VBreadcrumbs/VBreadcrumbs.js.map +1 -1
- package/es5/components/VBreadcrumbs/VBreadcrumbsItem.js +4 -0
- package/es5/components/VBreadcrumbs/VBreadcrumbsItem.js.map +1 -1
- package/es5/components/VCarousel/VCarousel.js +14 -2
- package/es5/components/VCarousel/VCarousel.js.map +1 -1
- package/es5/components/VDialog/VDialog.js +47 -26
- package/es5/components/VDialog/VDialog.js.map +1 -1
- package/es5/components/VFileInput/VFileInput.js +50 -28
- package/es5/components/VFileInput/VFileInput.js.map +1 -1
- package/es5/components/VPagination/VPagination.js +15 -18
- package/es5/components/VPagination/VPagination.js.map +1 -1
- package/es5/components/VRangeSlider/VRangeSlider.js +57 -32
- package/es5/components/VRangeSlider/VRangeSlider.js.map +1 -1
- package/es5/components/VSubheader/VSubheader.js +1 -1
- package/es5/components/VSubheader/VSubheader.js.map +1 -1
- package/es5/components/VTreeview/VTreeview.js +26 -13
- package/es5/components/VTreeview/VTreeview.js.map +1 -1
- package/es5/components/VTreeview/VTreeviewNode.js +0 -2
- package/es5/components/VTreeview/VTreeviewNode.js.map +1 -1
- package/es5/components/VVirtualScroll/VVirtualScroll.js.map +1 -1
- package/es5/framework.js +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbs.js +7 -5
- package/lib/components/VBreadcrumbs/VBreadcrumbs.js.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.js +4 -0
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.js.map +1 -1
- package/lib/components/VCarousel/VCarousel.js +14 -2
- package/lib/components/VCarousel/VCarousel.js.map +1 -1
- package/lib/components/VDialog/VDialog.js +9 -2
- package/lib/components/VDialog/VDialog.js.map +1 -1
- package/lib/components/VFileInput/VFileInput.js +43 -26
- package/lib/components/VFileInput/VFileInput.js.map +1 -1
- package/lib/components/VPagination/VPagination.js +15 -19
- package/lib/components/VPagination/VPagination.js.map +1 -1
- package/lib/components/VRangeSlider/VRangeSlider.js +16 -4
- package/lib/components/VRangeSlider/VRangeSlider.js.map +1 -1
- package/lib/components/VSubheader/VSubheader.js +1 -1
- package/lib/components/VSubheader/VSubheader.js.map +1 -1
- package/lib/components/VTreeview/VTreeview.js +15 -7
- package/lib/components/VTreeview/VTreeview.js.map +1 -1
- package/lib/components/VTreeview/VTreeviewNode.js +0 -2
- package/lib/components/VTreeview/VTreeviewNode.js.map +1 -1
- package/lib/components/VVirtualScroll/VVirtualScroll.js.map +1 -1
- package/lib/framework.js +1 -1
- package/package.json +1 -1
- package/src/components/VBottomNavigation/__tests__/VBottomNavigation.spec.ts +43 -37
- package/src/components/VBottomNavigation/__tests__/__snapshots__/VBottomNavigation.spec.ts.snap +11 -10
- package/src/components/VBreadcrumbs/VBreadcrumbs.ts +8 -4
- package/src/components/VBreadcrumbs/VBreadcrumbsItem.ts +4 -0
- package/src/components/VBreadcrumbs/__tests__/VBreadcrumbs.spec.ts +125 -10
- package/src/components/VBreadcrumbs/__tests__/VBreadcrumbsItem.spec.ts +10 -6
- package/src/components/VBtnToggle/__tests__/VBtnToggle.spec.ts +10 -6
- package/src/components/VCarousel/VCarousel.ts +15 -3
- package/src/components/VCarousel/__tests__/VCarousel.spec.ts +74 -54
- package/src/components/VCarousel/__tests__/VCarouselItem.spec.ts +9 -5
- package/src/components/VCarousel/__tests__/__snapshots__/VCarousel.spec.ts.snap +1 -1
- package/src/components/VDialog/VDialog.ts +14 -4
- package/src/components/VDialog/__tests__/VDialog.spec.ts +105 -101
- package/src/components/VDialog/__tests__/__snapshots__/VDialog.spec.ts.snap +0 -15
- package/src/components/VExpansionPanel/__tests__/VExpansionPanel.spec.ts +43 -27
- package/src/components/VExpansionPanel/__tests__/__snapshots__/VExpansionPanel.spec.ts.snap +18 -16
- package/src/components/VFileInput/VFileInput.ts +46 -33
- package/src/components/VFileInput/__tests__/VFileInput.spec.ts +84 -54
- package/src/components/VFileInput/__tests__/__snapshots__/VFileInput.spec.ts.snap +242 -146
- package/src/components/VImg/__tests__/VImg.spec.ts +21 -20
- package/src/components/VImg/__tests__/__snapshots__/VImg.spec.ts.snap +16 -11
- package/src/components/VNavigationDrawer/__tests__/VNavigationDrawer.spec.ts +84 -71
- package/src/components/VPagination/VPagination.ts +16 -19
- package/src/components/VPagination/__tests__/VPagination.spec.ts +85 -71
- package/src/components/VPagination/__tests__/__snapshots__/VPagination.spec.ts.snap +184 -429
- package/src/components/VRangeSlider/VRangeSlider.ts +19 -4
- package/src/components/VRangeSlider/__tests__/VRangeSlider.spec.ts +40 -40
- package/src/components/VRangeSlider/__tests__/__snapshots__/VRangeSlider.spec.ts.snap +32 -38
- package/src/components/VSubheader/VSubheader.ts +1 -1
- package/src/components/VSubheader/__tests__/VSubheader.spec.ts +12 -7
- package/src/components/VSubheader/__tests__/__snapshots__/VSubheader.spec.ts.snap +1 -1
- package/src/components/VSystemBar/__tests__/VSystemBar.spec.ts +89 -17
- package/src/components/VTimeline/__tests__/VTimelineItem.spec.ts +25 -35
- package/src/components/VTimeline/__tests__/__snapshots__/VTimelineItem.spec.ts.snap +4 -5
- package/src/components/VTreeview/VTreeview.ts +20 -12
- package/src/components/VTreeview/VTreeviewNode.ts +0 -2
- package/src/components/VTreeview/__tests__/VTreeview.spec.ts +168 -174
- package/src/components/VTreeview/__tests__/VTreeviewNode.spec.ts +77 -66
- package/src/components/VTreeview/__tests__/__snapshots__/VTreeview.spec.ts.snap +141 -141
- package/src/components/VTreeview/__tests__/__snapshots__/VTreeviewNode.spec.ts.snap +26 -51
- package/src/components/VVirtualScroll/VVirtualScroll.ts +0 -1
- package/src/components/VVirtualScroll/__tests__/VVirtualScroll.spec.ts +6 -9
- package/src/components/VWindow/__tests__/VWindow.spec.ts +78 -0
- package/src/components/VWindow/__tests__/VWindowItem.spec.ts +127 -0
- package/src/components/VWindow/__tests__/__snapshots__/VWindow.spec.ts.snap +59 -0
- package/src/components/VWindow/__tests__/__snapshots__/VWindowItem.spec.ts.snap +36 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`VTreeViewNode.ts should be able to have active children with empty array 1`] = `
|
|
4
|
-
<div
|
|
5
|
-
|
|
4
|
+
<div class="v-treeview-node v-treeview-node--leaf v-treeview-node--click"
|
|
5
|
+
aria-expanded="false"
|
|
6
6
|
>
|
|
7
7
|
<div class="v-treeview-node__root">
|
|
8
8
|
<div class="v-treeview-node__level">
|
|
@@ -17,8 +17,8 @@ exports[`VTreeViewNode.ts should be able to have active children with empty arra
|
|
|
17
17
|
`;
|
|
18
18
|
|
|
19
19
|
exports[`VTreeViewNode.ts should generate a transition element 1`] = `
|
|
20
|
-
<div
|
|
21
|
-
|
|
20
|
+
<div class="v-treeview-node v-treeview-node--leaf"
|
|
21
|
+
aria-expanded="false"
|
|
22
22
|
>
|
|
23
23
|
<div class="v-treeview-node__root">
|
|
24
24
|
<div class="v-treeview-node__level">
|
|
@@ -32,8 +32,8 @@ exports[`VTreeViewNode.ts should generate a transition element 1`] = `
|
|
|
32
32
|
`;
|
|
33
33
|
|
|
34
34
|
exports[`VTreeViewNode.ts should not be able to have active children with empty array when disabled 1`] = `
|
|
35
|
-
<div
|
|
36
|
-
|
|
35
|
+
<div class="v-treeview-node v-treeview-node--leaf v-treeview-node--click v-treeview-node--disabled"
|
|
36
|
+
aria-expanded="false"
|
|
37
37
|
>
|
|
38
38
|
<div class="v-treeview-node__root">
|
|
39
39
|
<div class="v-treeview-node__level">
|
|
@@ -48,14 +48,14 @@ exports[`VTreeViewNode.ts should not be able to have active children with empty
|
|
|
48
48
|
`;
|
|
49
49
|
|
|
50
50
|
exports[`VTreeViewNode.ts should not be able to have active children with empty array when loadChildren is specified 1`] = `
|
|
51
|
-
<div
|
|
52
|
-
|
|
51
|
+
<div class="v-treeview-node v-treeview-node--click"
|
|
52
|
+
aria-expanded="false"
|
|
53
53
|
>
|
|
54
54
|
<div class="v-treeview-node__root">
|
|
55
|
-
<button
|
|
56
|
-
class="v-icon
|
|
55
|
+
<button aria-hidden="false"
|
|
56
|
+
class="v-icon--link v-icon notranslate material-icons theme--light v-treeview-node__toggle"
|
|
57
|
+
type="button"
|
|
57
58
|
>
|
|
58
|
-
arrow_drop_down
|
|
59
59
|
</button>
|
|
60
60
|
<div class="v-treeview-node__content">
|
|
61
61
|
<div class="v-treeview-node__label">
|
|
@@ -67,28 +67,16 @@ exports[`VTreeViewNode.ts should not be able to have active children with empty
|
|
|
67
67
|
`;
|
|
68
68
|
|
|
69
69
|
exports[`VTreeViewNode.ts should render disabled item 1`] = `
|
|
70
|
-
<div
|
|
71
|
-
|
|
70
|
+
<div class="v-treeview-node v-treeview-node--leaf"
|
|
71
|
+
aria-expanded="false"
|
|
72
|
+
slots="[object Object]"
|
|
73
|
+
props="[object Object]"
|
|
72
74
|
>
|
|
73
75
|
<div class="v-treeview-node__root">
|
|
74
|
-
<
|
|
75
|
-
|
|
76
|
-
>
|
|
77
|
-
arrow_drop_down
|
|
78
|
-
</button>
|
|
76
|
+
<div class="v-treeview-node__level">
|
|
77
|
+
</div>
|
|
79
78
|
<div class="v-treeview-node__content">
|
|
80
|
-
<div class="v-treeview-node__prepend">
|
|
81
|
-
<div>
|
|
82
|
-
foobar
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
79
|
<div class="v-treeview-node__label">
|
|
86
|
-
Root
|
|
87
|
-
</div>
|
|
88
|
-
<div class="v-treeview-node__append">
|
|
89
|
-
<div>
|
|
90
|
-
foobar
|
|
91
|
-
</div>
|
|
92
80
|
</div>
|
|
93
81
|
</div>
|
|
94
82
|
</div>
|
|
@@ -96,20 +84,16 @@ exports[`VTreeViewNode.ts should render disabled item 1`] = `
|
|
|
96
84
|
`;
|
|
97
85
|
|
|
98
86
|
exports[`VTreeViewNode.ts should use label slot 1`] = `
|
|
99
|
-
<div
|
|
100
|
-
|
|
87
|
+
<div class="v-treeview-node v-treeview-node--leaf"
|
|
88
|
+
aria-expanded="false"
|
|
89
|
+
props="[object Object]"
|
|
90
|
+
slots="[object Object]"
|
|
101
91
|
>
|
|
102
92
|
<div class="v-treeview-node__root">
|
|
103
|
-
<
|
|
104
|
-
|
|
105
|
-
>
|
|
106
|
-
arrow_drop_down
|
|
107
|
-
</button>
|
|
93
|
+
<div class="v-treeview-node__level">
|
|
94
|
+
</div>
|
|
108
95
|
<div class="v-treeview-node__content">
|
|
109
96
|
<div class="v-treeview-node__label">
|
|
110
|
-
<div>
|
|
111
|
-
ROOT
|
|
112
|
-
</div>
|
|
113
97
|
</div>
|
|
114
98
|
</div>
|
|
115
99
|
</div>
|
|
@@ -117,25 +101,16 @@ exports[`VTreeViewNode.ts should use label slot 1`] = `
|
|
|
117
101
|
`;
|
|
118
102
|
|
|
119
103
|
exports[`VTreeViewNode.ts should use scoped slots 1`] = `
|
|
120
|
-
<div
|
|
121
|
-
|
|
104
|
+
<div class="v-treeview-node v-treeview-node--leaf"
|
|
105
|
+
aria-expanded="false"
|
|
106
|
+
slots="[object Object]"
|
|
122
107
|
>
|
|
123
108
|
<div class="v-treeview-node__root">
|
|
124
109
|
<div class="v-treeview-node__level">
|
|
125
110
|
</div>
|
|
126
111
|
<div class="v-treeview-node__content">
|
|
127
|
-
<div class="v-treeview-node__prepend">
|
|
128
|
-
<div>
|
|
129
|
-
foobar
|
|
130
|
-
</div>
|
|
131
|
-
</div>
|
|
132
112
|
<div class="v-treeview-node__label">
|
|
133
113
|
</div>
|
|
134
|
-
<div class="v-treeview-node__append">
|
|
135
|
-
<div>
|
|
136
|
-
foobar
|
|
137
|
-
</div>
|
|
138
|
-
</div>
|
|
139
114
|
</div>
|
|
140
115
|
</div>
|
|
141
116
|
</div>
|
|
@@ -5,13 +5,14 @@ import VVirtualScroll from '../VVirtualScroll'
|
|
|
5
5
|
import {
|
|
6
6
|
mount,
|
|
7
7
|
VueWrapper,
|
|
8
|
+
MountingOptions,
|
|
8
9
|
enableAutoUnmount,
|
|
9
10
|
} from '@vue/test-utils'
|
|
10
|
-
import { h } from 'vue'
|
|
11
|
+
import { h, nextTick } from 'vue'
|
|
11
12
|
|
|
12
13
|
describe('VVirtualScroll.ts', () => {
|
|
13
14
|
type Instance = InstanceType<typeof VVirtualScroll>
|
|
14
|
-
let mountFunction: (options?:
|
|
15
|
+
let mountFunction: (options?: MountingOptions<Instance>) => VueWrapper<Instance>
|
|
15
16
|
let propsData: Object
|
|
16
17
|
let mock: jest.SpyInstance
|
|
17
18
|
const elementHeight = 100
|
|
@@ -46,7 +47,7 @@ describe('VVirtualScroll.ts', () => {
|
|
|
46
47
|
props: propsData,
|
|
47
48
|
})
|
|
48
49
|
|
|
49
|
-
await
|
|
50
|
+
await nextTick()
|
|
50
51
|
expect(wrapper.html()).toMatchSnapshot()
|
|
51
52
|
})
|
|
52
53
|
|
|
@@ -68,7 +69,7 @@ describe('VVirtualScroll.ts', () => {
|
|
|
68
69
|
},
|
|
69
70
|
})
|
|
70
71
|
|
|
71
|
-
await
|
|
72
|
+
await nextTick()
|
|
72
73
|
expect(wrapper.html()).toMatchSnapshot()
|
|
73
74
|
})
|
|
74
75
|
|
|
@@ -83,6 +84,7 @@ describe('VVirtualScroll.ts', () => {
|
|
|
83
84
|
|
|
84
85
|
wrapper.vm.scrollTop = 500
|
|
85
86
|
await wrapper.trigger('scroll')
|
|
87
|
+
await nextTick()
|
|
86
88
|
|
|
87
89
|
expect(wrapper.html()).toMatchSnapshot()
|
|
88
90
|
})
|
|
@@ -92,11 +94,6 @@ describe('VVirtualScroll.ts', () => {
|
|
|
92
94
|
const spy = jest.spyOn(helpers, 'getSlot')
|
|
93
95
|
const wrapper = mountFunction({
|
|
94
96
|
props: propsData,
|
|
95
|
-
global: {
|
|
96
|
-
mocks: {
|
|
97
|
-
firstToRender: 2,
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
97
|
})
|
|
101
98
|
|
|
102
99
|
wrapper.vm.first = 2
|
|
@@ -398,4 +398,82 @@ describe('VWindow.ts', () => {
|
|
|
398
398
|
vm.next()
|
|
399
399
|
expect(vm.internalIndex).toBe(2)
|
|
400
400
|
})
|
|
401
|
+
|
|
402
|
+
it('should render with correct structure and classes', () => {
|
|
403
|
+
const wrapper = mountFunction({
|
|
404
|
+
slots: {
|
|
405
|
+
default: () => [h(VWindowItem), h(VWindowItem)],
|
|
406
|
+
},
|
|
407
|
+
})
|
|
408
|
+
|
|
409
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
410
|
+
})
|
|
411
|
+
|
|
412
|
+
it('should render with arrows when showArrows is true', () => {
|
|
413
|
+
const wrapper = mountFunction({
|
|
414
|
+
props: {
|
|
415
|
+
showArrows: true,
|
|
416
|
+
},
|
|
417
|
+
slots: {
|
|
418
|
+
default: () => [h(VWindowItem), h(VWindowItem)],
|
|
419
|
+
},
|
|
420
|
+
})
|
|
421
|
+
|
|
422
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
423
|
+
})
|
|
424
|
+
|
|
425
|
+
it('should render with custom height style', async () => {
|
|
426
|
+
const wrapper = mountFunction({
|
|
427
|
+
slots: {
|
|
428
|
+
default: () => [h(VWindowItem), h(VWindowItem)],
|
|
429
|
+
},
|
|
430
|
+
})
|
|
431
|
+
|
|
432
|
+
const vm = wrapper.vm as any
|
|
433
|
+
vm.internalHeight = '300px'
|
|
434
|
+
await nextTick()
|
|
435
|
+
|
|
436
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
437
|
+
})
|
|
438
|
+
|
|
439
|
+
it('should render with transition height style', async () => {
|
|
440
|
+
const wrapper = mountFunction({
|
|
441
|
+
slots: {
|
|
442
|
+
default: () => [h(VWindowItem), h(VWindowItem)],
|
|
443
|
+
},
|
|
444
|
+
})
|
|
445
|
+
|
|
446
|
+
const vm = wrapper.vm as any
|
|
447
|
+
vm.transitionHeight = '200px'
|
|
448
|
+
await nextTick()
|
|
449
|
+
|
|
450
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
451
|
+
})
|
|
452
|
+
|
|
453
|
+
it('should render with vertical prop', () => {
|
|
454
|
+
const wrapper = mountFunction({
|
|
455
|
+
props: {
|
|
456
|
+
vertical: true,
|
|
457
|
+
},
|
|
458
|
+
slots: {
|
|
459
|
+
default: () => [h(VWindowItem), h(VWindowItem)],
|
|
460
|
+
},
|
|
461
|
+
})
|
|
462
|
+
|
|
463
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
464
|
+
})
|
|
465
|
+
|
|
466
|
+
it('should render with showArrowsOnHover prop', () => {
|
|
467
|
+
const wrapper = mountFunction({
|
|
468
|
+
props: {
|
|
469
|
+
showArrows: true,
|
|
470
|
+
showArrowsOnHover: true,
|
|
471
|
+
},
|
|
472
|
+
slots: {
|
|
473
|
+
default: () => [h(VWindowItem), h(VWindowItem)],
|
|
474
|
+
},
|
|
475
|
+
})
|
|
476
|
+
|
|
477
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
478
|
+
})
|
|
401
479
|
})
|
|
@@ -213,5 +213,132 @@ describe("VWindowItem.ts", () => {
|
|
|
213
213
|
expect(windowVm.transitionCount).toBe(0);
|
|
214
214
|
expect(windowVm.isActive).toBeFalsy();
|
|
215
215
|
});
|
|
216
|
+
|
|
217
|
+
it("should render with correct structure and classes when active", () => {
|
|
218
|
+
const wrapper = mountFunction({
|
|
219
|
+
data: () => ({
|
|
220
|
+
isActive: true,
|
|
221
|
+
windowGroup: {
|
|
222
|
+
internalReverse: false,
|
|
223
|
+
register: () => {},
|
|
224
|
+
unregister: () => {},
|
|
225
|
+
computedTransition: "v-window-x-transition"
|
|
226
|
+
}
|
|
227
|
+
})
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
expect(wrapper.html()).toMatchSnapshot();
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
it("should render with custom transition when active", () => {
|
|
234
|
+
const wrapper = mountFunction({
|
|
235
|
+
props: {
|
|
236
|
+
transition: "custom-transition"
|
|
237
|
+
},
|
|
238
|
+
data: () => ({
|
|
239
|
+
isActive: true,
|
|
240
|
+
windowGroup: {
|
|
241
|
+
internalReverse: false,
|
|
242
|
+
register: () => {},
|
|
243
|
+
unregister: () => {},
|
|
244
|
+
computedTransition: "v-window-x-transition"
|
|
245
|
+
}
|
|
246
|
+
})
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
expect(wrapper.html()).toMatchSnapshot();
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
it("should render with reverse transition when active", () => {
|
|
253
|
+
const wrapper = mountFunction({
|
|
254
|
+
props: {
|
|
255
|
+
reverseTransition: "custom-reverse-transition"
|
|
256
|
+
},
|
|
257
|
+
data: () => ({
|
|
258
|
+
isActive: true,
|
|
259
|
+
windowGroup: {
|
|
260
|
+
internalReverse: true,
|
|
261
|
+
register: () => {},
|
|
262
|
+
unregister: () => {},
|
|
263
|
+
computedTransition: "v-window-x-reverse-transition"
|
|
264
|
+
}
|
|
265
|
+
})
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
expect(wrapper.html()).toMatchSnapshot();
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
it("should render with disabled prop when active", () => {
|
|
272
|
+
const wrapper = mountFunction({
|
|
273
|
+
props: {
|
|
274
|
+
disabled: true
|
|
275
|
+
},
|
|
276
|
+
data: () => ({
|
|
277
|
+
isActive: true,
|
|
278
|
+
windowGroup: {
|
|
279
|
+
internalReverse: false,
|
|
280
|
+
register: () => {},
|
|
281
|
+
unregister: () => {},
|
|
282
|
+
computedTransition: "v-window-x-transition"
|
|
283
|
+
}
|
|
284
|
+
})
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
expect(wrapper.html()).toMatchSnapshot();
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
it("should render with slot content when active", () => {
|
|
291
|
+
const wrapper = mountFunction({
|
|
292
|
+
slots: {
|
|
293
|
+
default: () => h("div", { class: "test-content" }, "Test content")
|
|
294
|
+
},
|
|
295
|
+
data: () => ({
|
|
296
|
+
isActive: true,
|
|
297
|
+
windowGroup: {
|
|
298
|
+
internalReverse: false,
|
|
299
|
+
register: () => {},
|
|
300
|
+
unregister: () => {},
|
|
301
|
+
computedTransition: "v-window-x-transition"
|
|
302
|
+
}
|
|
303
|
+
})
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
expect(wrapper.html()).toMatchSnapshot();
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
it("should render with value prop when active", () => {
|
|
310
|
+
const wrapper = mountFunction({
|
|
311
|
+
props: {
|
|
312
|
+
value: "test-value"
|
|
313
|
+
},
|
|
314
|
+
data: () => ({
|
|
315
|
+
isActive: true,
|
|
316
|
+
windowGroup: {
|
|
317
|
+
internalReverse: false,
|
|
318
|
+
register: () => {},
|
|
319
|
+
unregister: () => {},
|
|
320
|
+
computedTransition: "v-window-x-transition"
|
|
321
|
+
}
|
|
322
|
+
})
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
expect(wrapper.html()).toMatchSnapshot();
|
|
326
|
+
});
|
|
327
|
+
|
|
328
|
+
it("should not render when not active", () => {
|
|
329
|
+
const wrapper = mountFunction({
|
|
330
|
+
data: () => ({
|
|
331
|
+
isActive: false,
|
|
332
|
+
windowGroup: {
|
|
333
|
+
internalReverse: false,
|
|
334
|
+
register: () => {},
|
|
335
|
+
unregister: () => {},
|
|
336
|
+
computedTransition: "v-window-x-transition"
|
|
337
|
+
}
|
|
338
|
+
})
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
expect(wrapper.html()).toMatchSnapshot();
|
|
342
|
+
});
|
|
216
343
|
});
|
|
217
344
|
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`VWindow.ts should render with arrows when showArrows is true 1`] = `
|
|
4
|
+
<div class="v-window v-item-group theme--light">
|
|
5
|
+
<div class="v-window__container">
|
|
6
|
+
<div class="v-window-item v-window-item--active">
|
|
7
|
+
</div>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
`;
|
|
11
|
+
|
|
12
|
+
exports[`VWindow.ts should render with correct structure and classes 1`] = `
|
|
13
|
+
<div class="v-window v-item-group theme--light">
|
|
14
|
+
<div class="v-window__container">
|
|
15
|
+
<div class="v-window-item v-window-item--active">
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
`;
|
|
20
|
+
|
|
21
|
+
exports[`VWindow.ts should render with custom height style 1`] = `
|
|
22
|
+
<div class="v-window v-item-group theme--light">
|
|
23
|
+
<div class="v-window__container"
|
|
24
|
+
style="height: 300px;"
|
|
25
|
+
>
|
|
26
|
+
<div class="v-window-item v-window-item--active">
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
`;
|
|
31
|
+
|
|
32
|
+
exports[`VWindow.ts should render with showArrowsOnHover prop 1`] = `
|
|
33
|
+
<div class="v-window v-item-group theme--light v-window--show-arrows-on-hover">
|
|
34
|
+
<div class="v-window__container">
|
|
35
|
+
<div class="v-window-item v-window-item--active">
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
`;
|
|
40
|
+
|
|
41
|
+
exports[`VWindow.ts should render with transition height style 1`] = `
|
|
42
|
+
<div class="v-window v-item-group theme--light">
|
|
43
|
+
<div class="v-window__container"
|
|
44
|
+
style="height: 200px;"
|
|
45
|
+
>
|
|
46
|
+
<div class="v-window-item v-window-item--active">
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
`;
|
|
51
|
+
|
|
52
|
+
exports[`VWindow.ts should render with vertical prop 1`] = `
|
|
53
|
+
<div class="v-window v-item-group theme--light">
|
|
54
|
+
<div class="v-window__container">
|
|
55
|
+
<div class="v-window-item v-window-item--active">
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
`;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`VWindowItem.ts should not render when not active 1`] = `""`;
|
|
4
|
+
|
|
5
|
+
exports[`VWindowItem.ts should render with correct structure and classes when active 1`] = `
|
|
6
|
+
<div class="v-window-item">
|
|
7
|
+
</div>
|
|
8
|
+
`;
|
|
9
|
+
|
|
10
|
+
exports[`VWindowItem.ts should render with custom transition when active 1`] = `
|
|
11
|
+
<div class="v-window-item">
|
|
12
|
+
</div>
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
exports[`VWindowItem.ts should render with disabled prop when active 1`] = `
|
|
16
|
+
<div class="v-window-item">
|
|
17
|
+
</div>
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
exports[`VWindowItem.ts should render with reverse transition when active 1`] = `
|
|
21
|
+
<div class="v-window-item">
|
|
22
|
+
</div>
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
exports[`VWindowItem.ts should render with slot content when active 1`] = `
|
|
26
|
+
<div class="v-window-item">
|
|
27
|
+
<div class="test-content">
|
|
28
|
+
Test content
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
exports[`VWindowItem.ts should render with value prop when active 1`] = `
|
|
34
|
+
<div class="v-window-item">
|
|
35
|
+
</div>
|
|
36
|
+
`;
|