@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.
Files changed (127) hide show
  1. package/dist/vuetify.js +78 -22
  2. package/dist/vuetify.js.map +1 -1
  3. package/dist/vuetify.min.css +1 -1
  4. package/dist/vuetify.min.js +2 -2
  5. package/es5/components/VAlert/VAlert.js +0 -1
  6. package/es5/components/VAlert/VAlert.js.map +1 -1
  7. package/es5/components/VChip/VChip.js +1 -0
  8. package/es5/components/VChip/VChip.js.map +1 -1
  9. package/es5/components/VList/VListItem.js +4 -2
  10. package/es5/components/VList/VListItem.js.map +1 -1
  11. package/es5/components/VMenu/VMenu.js +1 -1
  12. package/es5/components/VMenu/VMenu.js.map +1 -1
  13. package/es5/components/VOtpInput/VOtpInput.js +36 -0
  14. package/es5/components/VOtpInput/VOtpInput.js.map +1 -1
  15. package/es5/components/VSelect/VSelectList.js +15 -2
  16. package/es5/components/VSelect/VSelectList.js.map +1 -1
  17. package/es5/components/VTooltip/VTooltip.js +3 -3
  18. package/es5/components/VTooltip/VTooltip.js.map +1 -1
  19. package/es5/components/VTreeview/VTreeview.js +0 -7
  20. package/es5/components/VTreeview/VTreeview.js.map +1 -1
  21. package/es5/framework.js +1 -1
  22. package/es5/mixins/routable/index.js +5 -2
  23. package/es5/mixins/routable/index.js.map +1 -1
  24. package/lib/components/VAlert/VAlert.js +0 -1
  25. package/lib/components/VAlert/VAlert.js.map +1 -1
  26. package/lib/components/VChip/VChip.js +1 -0
  27. package/lib/components/VChip/VChip.js.map +1 -1
  28. package/lib/components/VList/VListItem.js +4 -2
  29. package/lib/components/VList/VListItem.js.map +1 -1
  30. package/lib/components/VMenu/VMenu.js +1 -1
  31. package/lib/components/VMenu/VMenu.js.map +1 -1
  32. package/lib/components/VOtpInput/VOtpInput.js +48 -0
  33. package/lib/components/VOtpInput/VOtpInput.js.map +1 -1
  34. package/lib/components/VSelect/VSelectList.js +11 -5
  35. package/lib/components/VSelect/VSelectList.js.map +1 -1
  36. package/lib/components/VTooltip/VTooltip.js +3 -3
  37. package/lib/components/VTooltip/VTooltip.js.map +1 -1
  38. package/lib/components/VTreeview/VTreeview.js +0 -6
  39. package/lib/components/VTreeview/VTreeview.js.map +1 -1
  40. package/lib/framework.js +1 -1
  41. package/lib/mixins/routable/index.js +5 -2
  42. package/lib/mixins/routable/index.js.map +1 -1
  43. package/package.json +1 -1
  44. package/src/components/VAlert/VAlert.ts +0 -1
  45. package/src/components/VApp/__tests__/VApp.spec.ts +24 -18
  46. package/src/components/VApp/__tests__/__snapshots__/VApp.spec.ts.snap +4 -4
  47. package/src/components/VAppBar/__tests__/VAppBar.spec.ts +256 -74
  48. package/src/components/VAppBar/__tests__/VAppBarNavIcon.spec.ts +2 -6
  49. package/src/components/VAppBar/__tests__/__snapshots__/VAppBar.spec.ts.snap +13 -4
  50. package/src/components/VAppBar/__tests__/__snapshots__/VAppBarNavIcon.spec.ts.snap +3 -4
  51. package/src/components/VBanner/__tests__/VBanner.spec.ts +35 -36
  52. package/src/components/VBanner/__tests__/__snapshots__/VBanner.spec.ts.snap +1 -1
  53. package/src/components/VBtn/__tests__/VBtn.spec.ts +1 -1
  54. package/src/components/VCard/__tests__/VCard.spec.ts +46 -28
  55. package/src/components/VCard/__tests__/__snapshots__/VCard.spec.ts.snap +2 -2
  56. package/src/components/VCheckbox/__tests__/VCheckbox.spec.ts +157 -152
  57. package/src/components/VChip/VChip.ts +1 -0
  58. package/src/components/VChip/__tests__/VChip.spec.ts +50 -50
  59. package/src/components/VChip/__tests__/__snapshots__/VChip.spec.ts.snap +4 -4
  60. package/src/components/VChipGroup/__tests__/VChipGroup.spec.ts +14 -21
  61. package/src/components/VColorPicker/__tests__/__snapshots__/VColorPicker.spec.ts.snap +35 -35
  62. package/src/components/VColorPicker/__tests__/__snapshots__/VColorPickerEdit.spec.ts.snap +10 -10
  63. package/src/components/VData/__tests__/VData.spec.ts +69 -90
  64. package/src/components/VDataTable/__tests__/MobileRow.spec.ts +55 -66
  65. package/src/components/VDataTable/__tests__/Row.spec.ts +64 -73
  66. package/src/components/VDataTable/__tests__/RowGroup.spec.ts +7 -5
  67. package/src/components/VDataTable/__tests__/VDataTable.spec.ts +910 -988
  68. package/src/components/VDataTable/__tests__/VEditDialog.spec.ts +26 -22
  69. package/src/components/VDataTable/__tests__/VSimpleTable.spec.ts +60 -29
  70. package/src/components/VDataTable/__tests__/VVirtualTable.spec.ts +13 -15
  71. package/src/components/VDataTable/__tests__/__snapshots__/Row.spec.ts.snap +30 -0
  72. package/src/components/VDataTable/__tests__/__snapshots__/VEditDialog.spec.ts.snap +18 -10
  73. package/src/components/VDataTable/mixins/__tests__/__snapshots__/header.spec.ts.snap +1 -1
  74. package/src/components/VDivider/__tests__/VDivider.spec.ts +11 -15
  75. package/src/components/VDivider/__tests__/__snapshots__/VDivider.spec.ts.snap +2 -2
  76. package/src/components/VGrid/__tests__/VCol.spec.ts +17 -17
  77. package/src/components/VGrid/__tests__/VContainer.spec.ts +58 -3
  78. package/src/components/VGrid/__tests__/VFlex.spec.ts +3 -3
  79. package/src/components/VGrid/__tests__/VGrid.spec.ts +12 -10
  80. package/src/components/VGrid/__tests__/VLayout.spec.ts +3 -3
  81. package/src/components/VIcon/__tests__/VIcon.spec.ts +176 -70
  82. package/src/components/VImg/__tests__/__snapshots__/VImg.spec.ts.snap +55 -55
  83. package/src/components/VItemGroup/__tests__/VItem.spec.ts +22 -37
  84. package/src/components/VItemGroup/__tests__/VItemGroup.spec.ts +96 -124
  85. package/src/components/VItemGroup/__tests__/__snapshots__/VItem.spec.ts.snap +2 -0
  86. package/src/components/VLabel/__tests__/VLabel.spec.ts +240 -14
  87. package/src/components/VLazy/__tests__/VLazy.spec.ts +5 -4
  88. package/src/components/VLazy/__tests__/__snapshots__/VLazy.spec.ts.snap +2 -1
  89. package/src/components/VList/VListItem.ts +9 -3
  90. package/src/components/VList/__tests__/VList.spec.ts +13 -12
  91. package/src/components/VList/__tests__/VListGroup.spec.ts +59 -51
  92. package/src/components/VList/__tests__/VListItem.spec.ts +142 -63
  93. package/src/components/VList/__tests__/VListItemAvatar.spec.ts +5 -2
  94. package/src/components/VList/__tests__/VListItemGroup.spec.ts +5 -2
  95. package/src/components/VList/__tests__/__snapshots__/VList.spec.ts.snap +10 -10
  96. package/src/components/VList/__tests__/__snapshots__/VListGroup.spec.ts.snap +5 -6
  97. package/src/components/VList/__tests__/__snapshots__/VListItem.spec.ts.snap +1 -1
  98. package/src/components/VMain/__tests__/VMain.spec.ts +71 -17
  99. package/src/components/VMenu/VMenu.ts +1 -1
  100. package/src/components/VMessages/__tests__/VMessages.spec.ts +14 -13
  101. package/src/components/VOtpInput/VOtpInput.ts +37 -1
  102. package/src/components/VParallax/__tests__/__snapshots__/VParallax.spec.ts.snap +8 -8
  103. package/src/components/VPicker/__tests__/__snapshots__/VPicker.spec.ts.snap +2 -2
  104. package/src/components/VResponsive/__tests__/__snapshots__/VResponsive.spec.ts.snap +2 -2
  105. package/src/components/VSelect/VSelectList.ts +9 -9
  106. package/src/components/VSelect/__tests__/VSelect.spec.ts +166 -125
  107. package/src/components/VSelect/__tests__/VSelect2.spec.ts +127 -111
  108. package/src/components/VSelect/__tests__/VSelect3.spec.ts +109 -91
  109. package/src/components/VSelect/__tests__/VSelect4.spec.ts +79 -68
  110. package/src/components/VSelect/__tests__/VSelectList.spec.ts +23 -31
  111. package/src/components/VSelect/__tests__/__snapshots__/VSelect.spec.ts.snap +58 -62
  112. package/src/components/VSelect/__tests__/__snapshots__/VSelect2.spec.ts.snap +50 -62
  113. package/src/components/VSelect/__tests__/__snapshots__/VSelect3.spec.ts.snap +10 -14
  114. package/src/components/VSparkline/__tests__/VSparkline.spec.ts +33 -35
  115. package/src/components/VStepper/__tests__/VStepper.spec.ts +4 -1
  116. package/src/components/VStepper/__tests__/VStepperContent.spec.ts +104 -110
  117. package/src/components/VStepper/__tests__/VStepperStep.spec.ts +51 -44
  118. package/src/components/VSwitch/__tests__/VSwitch.spec.ts +30 -37
  119. package/src/components/VTabs/__tests__/VTabs.spec.ts +0 -7
  120. package/src/components/VTextField/__tests__/VTextField.spec.ts +342 -246
  121. package/src/components/VTextarea/__tests__/VTextarea.spec.ts +112 -35
  122. package/src/components/VTimePicker/__tests__/__snapshots__/VTimePicker.spec.ts.snap +0 -40
  123. package/src/components/VToolbar/__tests__/VToolbar.spec.ts +49 -25
  124. package/src/components/VTooltip/VTooltip.ts +3 -3
  125. package/src/components/VTooltip/__tests__/__snapshots__/VTooltip.spec.ts.snap +34 -18
  126. package/src/components/VTreeview/VTreeview.ts +0 -5
  127. package/src/mixins/routable/index.ts +6 -4
@@ -39,7 +39,7 @@ describe('VEditDialog.ts', () => {
39
39
 
40
40
  it('should render custom button texts', () => {
41
41
  const wrapper = mountFunction({
42
- propsData: {
42
+ props: {
43
43
  cancelText: `I don't want to modify that!`,
44
44
  saveText: 'Save it!',
45
45
  },
@@ -55,9 +55,9 @@ describe('VEditDialog.ts', () => {
55
55
  const close = jest.fn()
56
56
 
57
57
  const wrapper = mountFunction({
58
- listeners: {
59
- open,
60
- close,
58
+ props: {
59
+ onOpen: open,
60
+ onClose: close,
61
61
  },
62
62
  })
63
63
 
@@ -78,13 +78,13 @@ describe('VEditDialog.ts', () => {
78
78
  const close = jest.fn()
79
79
 
80
80
  const wrapper = mountFunction({
81
- listeners: {
82
- open,
83
- close,
81
+ props: {
82
+ onOpen: open,
83
+ onClose: close,
84
84
  },
85
85
  })
86
86
 
87
- const menu = wrapper.find(VMenu)
87
+ const menu = wrapper.findComponent(VMenu)
88
88
 
89
89
  menu.vm.$emit('input', true)
90
90
  await wrapper.vm.$nextTick()
@@ -100,8 +100,8 @@ describe('VEditDialog.ts', () => {
100
100
 
101
101
  const parentWrapper = mount({
102
102
  template: `
103
- <v-edit-dialog :return-value.sync="val">
104
- <template v-slot:input>
103
+ <v-edit-dialog v-model:return-value="val">
104
+ <template #input>
105
105
  <input v-model="val" class="test"/>
106
106
  </template>
107
107
  </v-edit-dialog>
@@ -115,30 +115,34 @@ describe('VEditDialog.ts', () => {
115
115
  },
116
116
  data () {
117
117
  return {
118
- val: '',
118
+ val: 'test',
119
119
  }
120
120
  },
121
121
  })
122
122
 
123
- const wrapper = parentWrapper.find(VEditDialog)
123
+ const wrapper = parentWrapper.findComponent(VEditDialog)
124
124
  const field = parentWrapper.find('input.test')
125
125
  const input = wrapper.vm.$refs.content as HTMLElement
126
126
 
127
127
  // Make sure originalValue gets set
128
128
  wrapper.vm.isActive = true
129
129
  field.setValue('test')
130
+ // Update the parent component's val to match the input value
131
+ parentWrapper.vm.val = 'test'
130
132
  input.dispatchEvent(new KeyboardEvent('keydown', { keyCode: keyCodes.esc } as KeyboardEventInit))
131
133
  expect(wrapper.emitted('cancel')).toBeTruthy()
132
- expect(wrapper.emitted('update:return-value')[0]).toEqual([''])
133
- expect(wrapper.props('returnValue')).toBe('')
134
+ expect(wrapper.emitted('update:return-value')?.[0]).toEqual(['test'])
135
+ expect(wrapper.props('returnValue')).toBe('test')
134
136
 
135
137
  wrapper.vm.isActive = true
136
138
  field.setValue('test')
139
+ // Update the parent component's val to match the input value
140
+ parentWrapper.vm.val = 'test'
137
141
  input.dispatchEvent(new KeyboardEvent('keydown', { keyCode: keyCodes.enter } as KeyboardEventInit))
138
142
  expect(wrapper.emitted('save')).toBeTruthy()
139
143
  expect(setTimeout).toHaveBeenLastCalledWith(expect.any(Function))
140
144
  jest.advanceTimersByTime(0)
141
- expect(wrapper.emitted('update:return-value')[1]).toEqual(['test'])
145
+ expect(wrapper.emitted('update:return-value')?.[1]).toEqual(['test'])
142
146
  expect(wrapper.props('returnValue')).toBe('test')
143
147
 
144
148
  jest.useRealTimers()
@@ -182,17 +186,17 @@ describe('VEditDialog.ts', () => {
182
186
  const saveEvent = jest.fn()
183
187
 
184
188
  const wrapper = mountFunction({
185
- methods: {
186
- save,
187
- },
188
189
  render () {
189
190
  return this.genActions()
190
191
  },
191
- listeners: {
192
- save: saveEvent,
192
+ props: {
193
+ onSave: saveEvent,
193
194
  },
194
195
  })
195
196
 
197
+ // Mock the save method
198
+ wrapper.vm.save = save
199
+
196
200
  expect(wrapper.html()).toMatchSnapshot()
197
201
 
198
202
  const btn = wrapper.find('.v-btn:last-child')
@@ -204,8 +208,8 @@ describe('VEditDialog.ts', () => {
204
208
  it('should cancel', () => {
205
209
  const cancel = jest.fn()
206
210
  const wrapper = mountFunction({
207
- listeners: {
208
- cancel,
211
+ props: {
212
+ onCancel: cancel,
209
213
  },
210
214
  data: () => ({
211
215
  isActive: true,
@@ -1,26 +1,37 @@
1
1
  import VSimpleTable from '../VSimpleTable'
2
2
  import {
3
3
  mount,
4
- Wrapper,
5
- MountOptions,
4
+ VueWrapper,
5
+ enableAutoUnmount,
6
6
  } from '@vue/test-utils'
7
+ import { h } from 'vue'
7
8
 
8
9
  describe('VSimpleTable.ts', () => {
9
10
  type Instance = InstanceType<typeof VSimpleTable>
10
- let mountFunction: (options?: MountOptions<Instance>) => Wrapper<Instance>
11
+ let mountFunction: (options?: any) => VueWrapper<Instance>
12
+
13
+ enableAutoUnmount(afterEach)
14
+
11
15
  beforeEach(() => {
12
- mountFunction = (options?: MountOptions<Instance>) => {
13
- return mount(VSimpleTable, options)
16
+ mountFunction = (options = {}) => {
17
+ return mount(VSimpleTable, {
18
+ global: {
19
+ config: {
20
+ warnHandler: () => {}, // Подавляем предупреждения Vue
21
+ },
22
+ },
23
+ ...options,
24
+ })
14
25
  }
15
26
  })
16
27
 
17
28
  it('should render', () => {
18
29
  const wrapper = mountFunction({
19
30
  slots: {
20
- default: `
21
- <tr><th>Foo</th><th>Bar</th></tr>
22
- <tr><td>baz</td><td>qux</td></tr>
23
- `,
31
+ default: () => [
32
+ h('tr', [h('th', 'Foo'), h('th', 'Bar')]),
33
+ h('tr', [h('td', 'baz'), h('td', 'qux')]),
34
+ ],
24
35
  },
25
36
  })
26
37
 
@@ -32,23 +43,43 @@ describe('VSimpleTable.ts', () => {
32
43
  it('should render with custom wrapper', () => {
33
44
  const wrapper = mountFunction({
34
45
  slots: {
35
- wrapper: `
36
- <table>
37
- <tr><th>Foo</th><th>Bar</th></tr>
38
- <tr><td>baz</td><td>qux</td></tr>
39
- </table>
40
- `,
46
+ default: () => [
47
+ h('tr', [h('th', 'Foo'), h('th', 'Bar')]),
48
+ h('tr', [h('td', 'baz'), h('td', 'qux')]),
49
+ ],
50
+ wrapper: () => h('div', {
51
+ class: 'custom-wrapper',
52
+ 'data-test': 'custom-wrapper'
53
+ }, [
54
+ h('table', { class: 'custom-table' }, [
55
+ h('tr', [h('th', 'Custom Header 1'), h('th', 'Custom Header 2')]),
56
+ h('tr', [h('td', 'Custom Data 1'), h('td', 'Custom Data 2')]),
57
+ ])
58
+ ])
41
59
  },
42
60
  })
43
61
 
62
+
63
+ // Проверяем, что дефолтный wrapper не используется
64
+ expect(wrapper.findAll('.v-data-table__wrapper')).toHaveLength(0)
65
+
66
+ // Проверяем, что кастомный wrapper присутствует
67
+ expect(wrapper.findAll('[data-test="custom-wrapper"]')).toHaveLength(1)
68
+ expect(wrapper.findAll('.custom-wrapper')).toHaveLength(1)
69
+ expect(wrapper.findAll('.custom-table')).toHaveLength(1)
70
+
71
+ // Проверяем содержимое кастомного wrapper
72
+ expect(wrapper.find('.custom-wrapper').text()).toContain('Custom Header 1')
73
+ expect(wrapper.find('.custom-wrapper').text()).toContain('Custom Data 1')
74
+
44
75
  expect(wrapper.html()).toMatchSnapshot()
45
76
  })
46
77
 
47
78
  it('should render with top & bottom slots', () => {
48
79
  const wrapper = mountFunction({
49
80
  slots: {
50
- top: '<div class="top">Header</div>',
51
- bottom: '<div class="bottom">Footer</div>',
81
+ top: () => h('div', { class: 'top' }, 'Header'),
82
+ bottom: () => h('div', { class: 'bottom' }, 'Footer'),
52
83
  },
53
84
  })
54
85
 
@@ -60,12 +91,12 @@ describe('VSimpleTable.ts', () => {
60
91
  it('should render with custom height', () => {
61
92
  const wrapper = mountFunction({
62
93
  slots: {
63
- default: `
64
- <tr><th>Foo</th><th>Bar</th></tr>
65
- <tr><td>baz</td><td>qux</td></tr>
66
- `,
94
+ default: () => [
95
+ h('tr', [h('th', 'Foo'), h('th', 'Bar')]),
96
+ h('tr', [h('td', 'baz'), h('td', 'qux')]),
97
+ ],
67
98
  },
68
- propsData: {
99
+ props: {
69
100
  height: 1000,
70
101
  },
71
102
  })
@@ -73,29 +104,29 @@ describe('VSimpleTable.ts', () => {
73
104
  expect(wrapper.html()).toMatchSnapshot()
74
105
  })
75
106
 
76
- it('should compute classes', () => {
107
+ it('should compute classes', async () => {
77
108
  const wrapper = mountFunction()
78
109
 
79
- wrapper.setProps({
110
+ await wrapper.setProps({
80
111
  dense: true,
81
112
  })
82
113
  expect(wrapper.vm.classes).toMatchObject({
83
114
  'v-data-table--dense': true,
84
115
  })
85
- wrapper.setProps({
116
+ await wrapper.setProps({
86
117
  dark: true,
87
118
  })
88
119
  expect(wrapper.vm.classes).toMatchObject({
89
120
  'theme--dark': true,
90
121
  'theme--light': false,
91
122
  })
92
- wrapper.setProps({
123
+ await wrapper.setProps({
93
124
  fixedHeader: true,
94
125
  })
95
126
  expect(wrapper.vm.classes).toMatchObject({
96
127
  'v-data-table--fixed-header': true,
97
128
  })
98
- wrapper.setProps({
129
+ await wrapper.setProps({
99
130
  fixedHeader: false,
100
131
  height: 1000,
101
132
  })
@@ -107,8 +138,8 @@ describe('VSimpleTable.ts', () => {
107
138
  it('should compute classes with top & bottom slots', () => {
108
139
  const wrapper = mountFunction({
109
140
  slots: {
110
- top: '<div class="top">Header</div>',
111
- bottom: '<div class="bottom">Footer</div>',
141
+ top: () => h('div', { class: 'top' }, 'Header'),
142
+ bottom: () => h('div', { class: 'bottom' }, 'Footer'),
112
143
  },
113
144
  })
114
145
 
@@ -1,29 +1,27 @@
1
1
  import VVirtualTable from '../VVirtualTable'
2
2
  import {
3
3
  mount,
4
- Wrapper,
5
- MountOptions,
4
+ VueWrapper,
5
+ MountingOptions,
6
6
  } from '@vue/test-utils'
7
- import Vue from 'vue'
7
+ import { h } from 'vue'
8
8
 
9
9
  describe('VVirtualTable.ts', () => {
10
10
  type Instance = InstanceType<typeof VVirtualTable>
11
- let mountFunction: (options?: MountOptions<Instance>) => Wrapper<Instance>
11
+ let mountFunction: (options?: MountingOptions<Instance>) => VueWrapper<Instance>
12
12
  beforeEach(() => {
13
- mountFunction = (options?: MountOptions<Instance>) => {
13
+ mountFunction = (options?: MountingOptions<Instance>) => {
14
14
  return mount(VVirtualTable, options)
15
15
  }
16
16
  })
17
17
 
18
18
  it('should render', () => {
19
- const vm = new Vue()
20
-
21
19
  const wrapper = mountFunction({
22
- propsData: {
20
+ props: {
23
21
  items: ['a', 'b', 'c'],
24
22
  },
25
- scopedSlots: {
26
- items: props => vm.$createElement('div', { class: 'test' }, [JSON.stringify(props)]),
23
+ slots: {
24
+ items: (props: any) => h('div', { class: 'test' }, [JSON.stringify(props)]),
27
25
  },
28
26
  })
29
27
 
@@ -32,19 +30,19 @@ describe('VVirtualTable.ts', () => {
32
30
 
33
31
  it('should re-render when items change', async () => {
34
32
  const wrapper = mountFunction({
35
- propsData: {
33
+ props: {
36
34
  items: ['a', 'b', 'c'],
37
35
  },
38
- scopedSlots: {
39
- items (props) {
40
- return h('div', props.items.map(i => h('div', [i])))
36
+ slots: {
37
+ items (props: any) {
38
+ return h('div', props.items.map((i: any) => h('div', [i])))
41
39
  },
42
40
  },
43
41
  })
44
42
 
45
43
  expect(wrapper.html()).toMatchSnapshot()
46
44
 
47
- wrapper.setProps({
45
+ await wrapper.setProps({
48
46
  items: ['d', 'e', 'f'],
49
47
  })
50
48
 
@@ -35,6 +35,36 @@ exports[`Table Row should render with cellClass 1`] = `
35
35
  </tr>
36
36
  `;
37
37
 
38
+ exports[`Table Row should render with regular slots 1`] = `
39
+ <tr>
40
+ <td class="text-start">
41
+ <p class="test">
42
+ $0.68
43
+ </p>
44
+ </td>
45
+ <td class="text-start">
46
+ <p class="test">
47
+ $0.65
48
+ </p>
49
+ </td>
50
+ </tr>
51
+ `;
52
+
53
+ exports[`Table Row should render with scoped slots 1`] = `
54
+ <tr>
55
+ <td class="text-start">
56
+ <p class="test petrol">
57
+ 0.68
58
+ </p>
59
+ </td>
60
+ <td class="text-start">
61
+ <p class="test diesel">
62
+ 0.65
63
+ </p>
64
+ </td>
65
+ </tr>
66
+ `;
67
+
38
68
  exports[`Table Row should render without slots 1`] = `
39
69
  <tr>
40
70
  <td class="text-start">
@@ -1,8 +1,12 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`VEditDialog.ts should render 1`] = `
4
- <div class="v-menu v-small-dialog theme--light">
5
- <div class="v-small-dialog__activator">
4
+ <div class="v-menu v-small-dialog theme--light"
5
+ value="false"
6
+ >
7
+ <div class="v-small-dialog__activator"
8
+ keydown="function () { [native code] }"
9
+ >
6
10
  <span class="v-small-dialog__activator__content">
7
11
  </span>
8
12
  </div>
@@ -11,15 +15,15 @@ exports[`VEditDialog.ts should render 1`] = `
11
15
 
12
16
  exports[`VEditDialog.ts should render actions 1`] = `
13
17
  <div class="v-small-dialog__actions">
14
- <button type="button"
15
- class="v-btn v-btn--text theme--light v-size--default primary--text"
18
+ <button class="v-btn v-btn--text theme--light v-size--default primary--text"
19
+ type="button"
16
20
  >
17
21
  <span class="v-btn__content">
18
22
  Cancel
19
23
  </span>
20
24
  </button>
21
- <button type="button"
22
- class="v-btn v-btn--text theme--light v-size--default primary--text"
25
+ <button class="v-btn v-btn--text theme--light v-size--default primary--text"
26
+ type="button"
23
27
  >
24
28
  <span class="v-btn__content">
25
29
  Save
@@ -29,8 +33,8 @@ exports[`VEditDialog.ts should render actions 1`] = `
29
33
  `;
30
34
 
31
35
  exports[`VEditDialog.ts should render button 1`] = `
32
- <button type="button"
33
- class="v-btn v-btn--text theme--light v-size--default primary--text"
36
+ <button class="v-btn v-btn--text theme--light v-size--default primary--text"
37
+ type="button"
34
38
  >
35
39
  <span class="v-btn__content">
36
40
  test
@@ -39,8 +43,12 @@ exports[`VEditDialog.ts should render button 1`] = `
39
43
  `;
40
44
 
41
45
  exports[`VEditDialog.ts should render custom button texts 1`] = `
42
- <div class="v-menu v-small-dialog theme--light">
43
- <div class="v-small-dialog__activator">
46
+ <div class="v-menu v-small-dialog theme--light"
47
+ value="false"
48
+ >
49
+ <div class="v-small-dialog__activator"
50
+ keydown="function () { [native code] }"
51
+ >
44
52
  <span class="v-small-dialog__activator__content">
45
53
  </span>
46
54
  </div>
@@ -74,7 +74,7 @@ exports[`VDataTable/header.ts should generate select scoped slot 3`] = `
74
74
 
75
75
  exports[`VDataTable/header.ts should generate sort icon 1`] = `
76
76
  <i aria-hidden="true"
77
- class="v-icon notranslate v-data-table-header__icon mdi mdi-sort theme--light"
77
+ class="v-icon notranslate mdi mdi-sort theme--light v-data-table-header__icon"
78
78
  style="font-size: 18px;"
79
79
  >
80
80
  </i>
@@ -1,26 +1,22 @@
1
- // Libraries
2
- import Vue from 'vue'
3
-
4
1
  // Components
5
2
  import VDivider from '../VDivider'
6
3
 
7
4
  // Utilities
8
5
  import {
9
- createLocalVue,
10
6
  mount,
11
- Wrapper,
7
+ VueWrapper,
8
+ enableAutoUnmount,
12
9
  } from '@vue/test-utils'
13
10
 
14
11
  describe('VDivider', () => {
15
- let mountFunction: (options?: object) => Wrapper<Vue>
16
- let localVue: typeof Vue
12
+ type Instance = InstanceType<typeof VDivider>
13
+ let mountFunction: (options?: object) => VueWrapper<Instance>
17
14
 
18
- beforeEach(() => {
19
- localVue = createLocalVue()
15
+ enableAutoUnmount(afterEach)
20
16
 
17
+ beforeEach(() => {
21
18
  mountFunction = (options = {}) => {
22
19
  return mount(VDivider, {
23
- localVue,
24
20
  ...options,
25
21
  })
26
22
  }
@@ -34,7 +30,7 @@ describe('VDivider', () => {
34
30
 
35
31
  it('should render an inset component', () => {
36
32
  const wrapper = mountFunction({
37
- propsData: { inset: true },
33
+ props: { inset: true },
38
34
  })
39
35
 
40
36
  expect(wrapper.classes('v-divider--inset')).toBe(true)
@@ -42,7 +38,7 @@ describe('VDivider', () => {
42
38
 
43
39
  it('should render a light component', () => {
44
40
  const wrapper = mountFunction({
45
- propsData: { light: true },
41
+ props: { light: true },
46
42
  })
47
43
 
48
44
  expect(wrapper.classes('theme--light')).toBe(true)
@@ -50,7 +46,7 @@ describe('VDivider', () => {
50
46
 
51
47
  it('should render a dark component', () => {
52
48
  const wrapper = mountFunction({
53
- propsData: { dark: true },
49
+ props: { dark: true },
54
50
  })
55
51
 
56
52
  expect(wrapper.classes('theme--dark')).toBe(true)
@@ -58,7 +54,7 @@ describe('VDivider', () => {
58
54
 
59
55
  it('should render a vertical component', () => {
60
56
  const wrapper = mountFunction({
61
- propsData: { vertical: true },
57
+ props: { vertical: true },
62
58
  })
63
59
 
64
60
  expect(wrapper.classes('v-divider--vertical')).toBe(true)
@@ -78,7 +74,7 @@ describe('VDivider', () => {
78
74
 
79
75
  it('should have aria-orientation vertical if vertical prop is set', () => {
80
76
  const wrapper = mountFunction({
81
- propsData: { vertical: true },
77
+ props: { vertical: true },
82
78
  })
83
79
 
84
80
  expect(wrapper.attributes('aria-orientation')).toBe('vertical')
@@ -1,8 +1,8 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`VDivider should render component and match snapshot 1`] = `
4
- <hr role="separator"
4
+ <hr class="v-divider theme--light"
5
+ role="separator"
5
6
  aria-orientation="horizontal"
6
- class="v-divider theme--light"
7
7
  >
8
8
  `;