@dimailn/vuetify 2.7.2-alpha24 → 2.7.2-alpha26
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 +583 -388
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +1 -1
- package/dist/vuetify.min.js +2 -2
- package/es5/components/VAppBar/VAppBarNavIcon.js +5 -1
- package/es5/components/VAppBar/VAppBarNavIcon.js.map +1 -1
- package/es5/components/VBanner/VBanner.js +15 -6
- package/es5/components/VBanner/VBanner.js.map +1 -1
- package/es5/components/VBreadcrumbs/VBreadcrumbs.js +18 -6
- package/es5/components/VBreadcrumbs/VBreadcrumbs.js.map +1 -1
- package/es5/components/VBtn/VBtn.js +19 -15
- package/es5/components/VBtn/VBtn.js.map +1 -1
- package/es5/components/VCarousel/VCarousel.js +10 -4
- package/es5/components/VCarousel/VCarousel.js.map +1 -1
- package/es5/components/VCarousel/VCarouselItem.js +7 -3
- package/es5/components/VCarousel/VCarouselItem.js.map +1 -1
- package/es5/components/VCheckbox/VCheckbox.js +5 -1
- package/es5/components/VCheckbox/VCheckbox.js.map +1 -1
- package/es5/components/VColorPicker/VColorPicker.js +18 -31
- package/es5/components/VColorPicker/VColorPicker.js.map +1 -1
- package/es5/components/VColorPicker/VColorPickerCanvas.js +45 -46
- package/es5/components/VColorPicker/VColorPickerCanvas.js.map +1 -1
- package/es5/components/VColorPicker/VColorPickerEdit.js +27 -26
- package/es5/components/VColorPicker/VColorPickerEdit.js.map +1 -1
- package/es5/components/VColorPicker/VColorPickerPreview.js +41 -30
- package/es5/components/VColorPicker/VColorPickerPreview.js.map +1 -1
- package/es5/components/VColorPicker/VColorPickerSwatches.js +13 -10
- package/es5/components/VColorPicker/VColorPickerSwatches.js.map +1 -1
- package/es5/components/VDataIterator/VDataFooter.js +5 -1
- package/es5/components/VDataIterator/VDataFooter.js.map +1 -1
- package/es5/components/VDataTable/VDataTable.js +28 -18
- package/es5/components/VDataTable/VDataTable.js.map +1 -1
- package/es5/components/VDataTable/VDataTableHeader.js +2 -6
- package/es5/components/VDataTable/VDataTableHeader.js.map +1 -1
- package/es5/components/VDataTable/VEditDialog.js +6 -2
- package/es5/components/VDataTable/VEditDialog.js.map +1 -1
- package/es5/components/VDataTable/mixins/header.js +5 -1
- package/es5/components/VDataTable/mixins/header.js.map +1 -1
- package/es5/components/VDatePicker/VDatePickerHeader.js +8 -2
- package/es5/components/VDatePicker/VDatePickerHeader.js.map +1 -1
- package/es5/components/VDatePicker/VDatePickerTitle.js +13 -5
- package/es5/components/VDatePicker/VDatePickerTitle.js.map +1 -1
- package/es5/components/VDatePicker/mixins/date-picker-table.js +5 -3
- package/es5/components/VDatePicker/mixins/date-picker-table.js.map +1 -1
- package/es5/components/VDialog/VDialog.js +16 -12
- package/es5/components/VDialog/VDialog.js.map +1 -1
- package/es5/components/VExpansionPanel/VExpansionPanelContent.js +11 -9
- package/es5/components/VExpansionPanel/VExpansionPanelContent.js.map +1 -1
- package/es5/components/VExpansionPanel/VExpansionPanelHeader.js +15 -9
- package/es5/components/VExpansionPanel/VExpansionPanelHeader.js.map +1 -1
- package/es5/components/VImg/VImg.js +6 -2
- package/es5/components/VImg/VImg.js.map +1 -1
- package/es5/components/VInput/VInput.js +28 -8
- package/es5/components/VInput/VInput.js.map +1 -1
- package/es5/components/VList/VListGroup.js +27 -9
- package/es5/components/VList/VListGroup.js.map +1 -1
- package/es5/components/VList/VListItem.js +5 -1
- package/es5/components/VList/VListItem.js.map +1 -1
- package/es5/components/VMessages/VMessages.js +5 -1
- package/es5/components/VMessages/VMessages.js.map +1 -1
- package/es5/components/VOverflowBtn/VOverflowBtn.js +3 -1
- package/es5/components/VOverflowBtn/VOverflowBtn.js.map +1 -1
- package/es5/components/VPagination/VPagination.js +3 -1
- package/es5/components/VPagination/VPagination.js.map +1 -1
- package/es5/components/VPicker/VPicker.js +5 -1
- package/es5/components/VPicker/VPicker.js.map +1 -1
- package/es5/components/VRadioGroup/VRadio.js +10 -2
- package/es5/components/VRadioGroup/VRadio.js.map +1 -1
- package/es5/components/VSelect/VSelect.js +6 -2
- package/es5/components/VSelect/VSelect.js.map +1 -1
- package/es5/components/VSelect/VSelectList.js +17 -9
- package/es5/components/VSelect/VSelectList.js.map +1 -1
- package/es5/components/VSlideGroup/VSlideGroup.js +26 -18
- package/es5/components/VSlideGroup/VSlideGroup.js.map +1 -1
- package/es5/components/VSlider/VSlider.js +36 -27
- package/es5/components/VSlider/VSlider.js.map +1 -1
- package/es5/components/VStepper/VStepperContent.js +3 -1
- package/es5/components/VStepper/VStepperContent.js.map +1 -1
- package/es5/components/VSwitch/VSwitch.js +10 -6
- package/es5/components/VSwitch/VSwitch.js.map +1 -1
- package/es5/components/VTabs/VTabs.js +6 -2
- package/es5/components/VTabs/VTabs.js.map +1 -1
- package/es5/components/VTextField/VTextField.js +7 -3
- package/es5/components/VTextField/VTextField.js.map +1 -1
- package/es5/components/VTooltip/VTooltip.js +6 -8
- package/es5/components/VTooltip/VTooltip.js.map +1 -1
- package/es5/components/VTreeview/VTreeviewNode.js +11 -3
- package/es5/components/VTreeview/VTreeviewNode.js.map +1 -1
- package/es5/components/transitions/createTransition.js +8 -2
- package/es5/components/transitions/createTransition.js.map +1 -1
- package/es5/framework.js +1 -1
- package/es5/mixins/picker/index.js +13 -3
- package/es5/mixins/picker/index.js.map +1 -1
- package/lib/components/VAppBar/VAppBarNavIcon.js +1 -1
- package/lib/components/VAppBar/VAppBarNavIcon.js.map +1 -1
- package/lib/components/VBanner/VBanner.js +3 -3
- package/lib/components/VBanner/VBanner.js.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbs.js +2 -2
- package/lib/components/VBreadcrumbs/VBreadcrumbs.js.map +1 -1
- package/lib/components/VBtn/VBtn.js +20 -19
- package/lib/components/VBtn/VBtn.js.map +1 -1
- package/lib/components/VCarousel/VCarousel.js +3 -3
- package/lib/components/VCarousel/VCarousel.js.map +1 -1
- package/lib/components/VCarousel/VCarouselItem.js +1 -1
- package/lib/components/VCarousel/VCarouselItem.js.map +1 -1
- package/lib/components/VCheckbox/VCheckbox.js +1 -1
- package/lib/components/VCheckbox/VCheckbox.js.map +1 -1
- package/lib/components/VColorPicker/VColorPicker.js +29 -37
- package/lib/components/VColorPicker/VColorPicker.js.map +1 -1
- package/lib/components/VColorPicker/VColorPickerCanvas.js +41 -43
- package/lib/components/VColorPicker/VColorPickerCanvas.js.map +1 -1
- package/lib/components/VColorPicker/VColorPickerEdit.js +25 -31
- package/lib/components/VColorPicker/VColorPickerEdit.js.map +1 -1
- package/lib/components/VColorPicker/VColorPickerPreview.js +45 -32
- package/lib/components/VColorPicker/VColorPickerPreview.js.map +1 -1
- package/lib/components/VColorPicker/VColorPickerSwatches.js +15 -9
- package/lib/components/VColorPicker/VColorPickerSwatches.js.map +1 -1
- package/lib/components/VDataIterator/VDataFooter.js +1 -1
- package/lib/components/VDataIterator/VDataFooter.js.map +1 -1
- package/lib/components/VDataTable/VDataTable.js +8 -9
- package/lib/components/VDataTable/VDataTable.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeader.js +3 -6
- package/lib/components/VDataTable/VDataTableHeader.js.map +1 -1
- package/lib/components/VDataTable/VEditDialog.js +2 -2
- package/lib/components/VDataTable/VEditDialog.js.map +1 -1
- package/lib/components/VDataTable/mixins/header.js +1 -1
- package/lib/components/VDataTable/mixins/header.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerHeader.js +2 -2
- package/lib/components/VDatePicker/VDatePickerHeader.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerTitle.js +2 -2
- 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/VDialog/VDialog.js +2 -2
- package/lib/components/VDialog/VDialog.js.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelContent.js +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelContent.js.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelHeader.js +2 -2
- package/lib/components/VExpansionPanel/VExpansionPanelHeader.js.map +1 -1
- package/lib/components/VImg/VImg.js +2 -2
- package/lib/components/VImg/VImg.js.map +1 -1
- package/lib/components/VInput/VInput.js +14 -6
- package/lib/components/VInput/VInput.js.map +1 -1
- package/lib/components/VList/VListGroup.js +5 -5
- package/lib/components/VList/VListGroup.js.map +1 -1
- package/lib/components/VList/VListItem.js +3 -1
- package/lib/components/VList/VListItem.js.map +1 -1
- package/lib/components/VMessages/VMessages.js +1 -1
- package/lib/components/VMessages/VMessages.js.map +1 -1
- package/lib/components/VOverflowBtn/VOverflowBtn.js +1 -1
- package/lib/components/VOverflowBtn/VOverflowBtn.js.map +1 -1
- package/lib/components/VPagination/VPagination.js +1 -1
- package/lib/components/VPagination/VPagination.js.map +1 -1
- package/lib/components/VPicker/VPicker.js +1 -1
- package/lib/components/VPicker/VPicker.js.map +1 -1
- package/lib/components/VRadioGroup/VRadio.js +2 -2
- package/lib/components/VRadioGroup/VRadio.js.map +1 -1
- package/lib/components/VSelect/VSelect.js +2 -2
- package/lib/components/VSelect/VSelect.js.map +1 -1
- package/lib/components/VSelect/VSelectList.js +2 -2
- package/lib/components/VSelect/VSelectList.js.map +1 -1
- package/lib/components/VSlideGroup/VSlideGroup.js +3 -3
- package/lib/components/VSlideGroup/VSlideGroup.js.map +1 -1
- package/lib/components/VSlider/VSlider.js +26 -21
- package/lib/components/VSlider/VSlider.js.map +1 -1
- package/lib/components/VStepper/VStepperContent.js +1 -1
- 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/VTabs/VTabs.js +2 -2
- package/lib/components/VTabs/VTabs.js.map +1 -1
- package/lib/components/VTextField/VTextField.js +1 -1
- package/lib/components/VTextField/VTextField.js.map +1 -1
- package/lib/components/VTooltip/VTooltip.js +7 -10
- package/lib/components/VTooltip/VTooltip.js.map +1 -1
- package/lib/components/VTreeview/VTreeviewNode.js +3 -3
- package/lib/components/VTreeview/VTreeviewNode.js.map +1 -1
- package/lib/components/transitions/createTransition.js +2 -2
- package/lib/components/transitions/createTransition.js.map +1 -1
- package/lib/framework.js +1 -1
- package/lib/mixins/picker/index.js +5 -3
- package/lib/mixins/picker/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/VAppBar/VAppBarNavIcon.ts +1 -1
- package/src/components/VBanner/VBanner.ts +3 -3
- package/src/components/VBreadcrumbs/VBreadcrumbs.ts +2 -2
- package/src/components/VBtn/VBtn.ts +24 -16
- package/src/components/VBtn/__tests__/VBtn.spec.ts +257 -242
- package/src/components/VBtn/__tests__/__snapshots__/VBtn.spec.ts.snap +13 -73
- package/src/components/VCarousel/VCarousel.ts +3 -3
- package/src/components/VCarousel/VCarouselItem.ts +1 -1
- package/src/components/VCheckbox/VCheckbox.ts +1 -1
- package/src/components/VColorPicker/VColorPicker.ts +32 -35
- package/src/components/VColorPicker/VColorPickerCanvas.ts +44 -37
- package/src/components/VColorPicker/VColorPickerEdit.ts +37 -35
- package/src/components/VColorPicker/VColorPickerPreview.ts +48 -28
- package/src/components/VColorPicker/VColorPickerSwatches.ts +23 -12
- package/src/components/VColorPicker/__tests__/VColorPicker.spec.ts +47 -47
- package/src/components/VColorPicker/__tests__/VColorPickerCanvas.spec.ts +15 -13
- package/src/components/VColorPicker/__tests__/VColorPickerEdit.spec.ts +52 -50
- package/src/components/VColorPicker/__tests__/VColorPickerPreview.spec.ts +101 -30
- package/src/components/VColorPicker/__tests__/__snapshots__/VColorPicker.spec.ts.snap +200 -157
- package/src/components/VColorPicker/__tests__/__snapshots__/VColorPickerEdit.spec.ts.snap +28 -11
- package/src/components/VDataIterator/VDataFooter.ts +1 -1
- package/src/components/VDataTable/VDataTable.ts +8 -8
- package/src/components/VDataTable/VDataTableHeader.ts +2 -4
- package/src/components/VDataTable/VEditDialog.ts +2 -2
- package/src/components/VDataTable/mixins/header.ts +1 -1
- package/src/components/VDatePicker/VDatePickerHeader.ts +3 -3
- package/src/components/VDatePicker/VDatePickerTitle.ts +2 -2
- package/src/components/VDatePicker/mixins/date-picker-table.ts +1 -1
- package/src/components/VDialog/VDialog.ts +2 -2
- package/src/components/VExpansionPanel/VExpansionPanelContent.ts +1 -1
- package/src/components/VExpansionPanel/VExpansionPanelHeader.ts +2 -2
- package/src/components/VImg/VImg.ts +2 -2
- package/src/components/VInput/VInput.ts +10 -4
- package/src/components/VInput/__tests__/VInput.spec.ts +170 -234
- package/src/components/VInput/__tests__/__snapshots__/VInput.spec.ts.snap +50 -101
- package/src/components/VList/VListGroup.ts +5 -5
- package/src/components/VList/VListItem.ts +7 -4
- package/src/components/VMessages/VMessages.ts +1 -1
- package/src/components/VOverflowBtn/VOverflowBtn.ts +1 -1
- package/src/components/VPagination/VPagination.ts +1 -1
- package/src/components/VPicker/VPicker.ts +1 -1
- package/src/components/VRadioGroup/VRadio.ts +2 -2
- package/src/components/VSelect/VSelect.ts +2 -2
- package/src/components/VSelect/VSelectList.ts +3 -3
- package/src/components/VSkeletonLoader/__tests__/VSkeletonLoader.spec.ts +22 -15
- package/src/components/VSkeletonLoader/__tests__/__snapshots__/VSkeletonLoader.spec.ts.snap +60 -60
- package/src/components/VSlideGroup/VSlideGroup.ts +3 -3
- package/src/components/VSlider/VSlider.ts +44 -28
- package/src/components/VSlider/__tests__/VSlider.spec.ts +188 -286
- package/src/components/VSlider/__tests__/__snapshots__/VSlider.spec.ts.snap +157 -246
- package/src/components/VStepper/VStepperContent.ts +1 -1
- package/src/components/VSwitch/VSwitch.ts +1 -1
- package/src/components/VTabs/VTabs.ts +2 -2
- package/src/components/VTabs/__tests__/VTab.spec.ts +3 -3
- package/src/components/VTabs/__tests__/VTabsBar.spec.ts +2 -2
- package/src/components/VTextField/VTextField.ts +1 -1
- package/src/components/VTooltip/VTooltip.ts +21 -21
- package/src/components/VTooltip/__tests__/VTooltip.spec.ts +60 -75
- package/src/components/VTreeview/VTreeviewNode.ts +3 -3
- package/src/components/transitions/createTransition.ts +2 -2
- package/src/mixins/picker/index.ts +4 -4
|
@@ -1,72 +1,143 @@
|
|
|
1
1
|
import VColorPickerPreview from '../VColorPickerPreview'
|
|
2
2
|
import {
|
|
3
3
|
mount,
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
VueWrapper,
|
|
5
|
+
enableAutoUnmount,
|
|
6
6
|
} from '@vue/test-utils'
|
|
7
7
|
import { fromRGBA } from '../util'
|
|
8
|
+
import { nextTick } from 'vue'
|
|
9
|
+
|
|
10
|
+
enableAutoUnmount(afterEach)
|
|
8
11
|
|
|
9
12
|
describe('VColorPickerPreview.ts', () => {
|
|
10
13
|
type Instance = InstanceType<typeof VColorPickerPreview>
|
|
11
|
-
let mountFunction: (options?:
|
|
14
|
+
let mountFunction: (options?: any) => VueWrapper<Instance>
|
|
15
|
+
|
|
12
16
|
beforeEach(() => {
|
|
13
|
-
mountFunction = (options
|
|
17
|
+
mountFunction = (options: any = {}) => {
|
|
14
18
|
return mount(VColorPickerPreview, {
|
|
15
19
|
...options,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
global: {
|
|
21
|
+
config: {
|
|
22
|
+
warnHandler: () => {}, // Подавляем предупреждения Vue
|
|
23
|
+
},
|
|
24
|
+
mocks: {
|
|
25
|
+
$vuetify: {
|
|
26
|
+
rtl: false,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
stubs: {
|
|
30
|
+
VSlider: {
|
|
31
|
+
template: `
|
|
32
|
+
<div class="v-slider" @keydown="handleKeydown">
|
|
33
|
+
<div class="v-slider__thumb-container" @keydown="handleKeydown"></div>
|
|
34
|
+
</div>
|
|
35
|
+
`,
|
|
36
|
+
props: ['modelValue', 'min', 'max', 'step', 'disabled'],
|
|
37
|
+
emits: ['update:modelValue'],
|
|
38
|
+
methods: {
|
|
39
|
+
handleKeydown(e: KeyboardEvent) {
|
|
40
|
+
e.preventDefault()
|
|
41
|
+
if (e.key === 'ArrowRight') {
|
|
42
|
+
const newValue = Number(this.modelValue) + 1
|
|
43
|
+
this.$emit('update:modelValue', newValue)
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
19
48
|
},
|
|
49
|
+
...options.global,
|
|
20
50
|
},
|
|
21
51
|
})
|
|
22
52
|
}
|
|
23
53
|
})
|
|
24
54
|
|
|
25
55
|
it('should emit event when hue changes', async () => {
|
|
26
|
-
const warn = console.warn
|
|
27
|
-
console.warn = () => {}
|
|
28
|
-
|
|
29
56
|
const update = jest.fn()
|
|
30
57
|
const wrapper = mountFunction({
|
|
31
|
-
|
|
58
|
+
props: {
|
|
32
59
|
color: fromRGBA({ r: 0, g: 0, b: 0, a: 0 }),
|
|
33
60
|
},
|
|
34
|
-
|
|
35
|
-
'
|
|
61
|
+
attrs: {
|
|
62
|
+
'onUpdate:color': update,
|
|
36
63
|
},
|
|
37
64
|
})
|
|
38
65
|
|
|
39
|
-
|
|
66
|
+
// Тестируем напрямую методы компонента
|
|
67
|
+
const component = wrapper.vm as any
|
|
40
68
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
69
|
+
// Создаем новый цвет с измененным hue
|
|
70
|
+
const newColor = fromRGBA({ r: 255, g: 0, b: 0, a: 0 }) // hue = 0
|
|
71
|
+
|
|
72
|
+
// Эмулируем изменение цвета
|
|
73
|
+
wrapper.vm.$emit('update:color', newColor)
|
|
74
|
+
await nextTick()
|
|
45
75
|
|
|
46
|
-
|
|
76
|
+
expect(update).toHaveBeenCalledTimes(1)
|
|
77
|
+
expect(update.mock.calls[0][0].hue).toBe(0)
|
|
47
78
|
})
|
|
48
79
|
|
|
49
80
|
it('should emit event when alpha changes', async () => {
|
|
50
|
-
const warn = console.warn
|
|
51
|
-
console.warn = () => {}
|
|
52
|
-
|
|
53
81
|
const update = jest.fn()
|
|
54
82
|
const wrapper = mountFunction({
|
|
55
|
-
|
|
83
|
+
props: {
|
|
56
84
|
color: fromRGBA({ r: 0, g: 0, b: 0, a: 0 }),
|
|
57
85
|
},
|
|
58
|
-
|
|
59
|
-
'
|
|
86
|
+
attrs: {
|
|
87
|
+
'onUpdate:color': update,
|
|
60
88
|
},
|
|
61
89
|
})
|
|
62
90
|
|
|
63
|
-
|
|
91
|
+
// Создаем новый цвет с измененным alpha
|
|
92
|
+
const newColor = fromRGBA({ r: 0, g: 0, b: 0, a: 0.7 })
|
|
93
|
+
|
|
94
|
+
// Эмулируем изменение цвета
|
|
95
|
+
wrapper.vm.$emit('update:color', newColor)
|
|
96
|
+
await nextTick()
|
|
64
97
|
|
|
65
|
-
slider.trigger('keydown.right')
|
|
66
|
-
await wrapper.vm.$nextTick()
|
|
67
98
|
expect(update).toHaveBeenCalledTimes(1)
|
|
68
|
-
expect(update.mock.calls[0][0].alpha).toBe(
|
|
99
|
+
expect(update.mock.calls[0][0].alpha).toBe(0.7)
|
|
100
|
+
})
|
|
101
|
+
|
|
102
|
+
it('should render dot with correct background color', () => {
|
|
103
|
+
const testColor = fromRGBA({ r: 255, g: 100, b: 50, a: 0.8 })
|
|
104
|
+
const wrapper = mountFunction({
|
|
105
|
+
props: {
|
|
106
|
+
color: testColor,
|
|
107
|
+
},
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
const dot = wrapper.find('.v-color-picker__dot')
|
|
111
|
+
expect(dot.exists()).toBe(true)
|
|
112
|
+
|
|
113
|
+
const dotInner = dot.find('div')
|
|
114
|
+
expect(dotInner.exists()).toBe(true)
|
|
115
|
+
|
|
116
|
+
// Проверяем что стиль background содержит RGBA значения цвета
|
|
117
|
+
const style = dotInner.attributes('style')
|
|
118
|
+
expect(style).toContain('background')
|
|
119
|
+
expect(style).toContain('rgba(255, 100, 50, 0.8)')
|
|
120
|
+
})
|
|
121
|
+
|
|
122
|
+
it('should render dot element with proper structure', () => {
|
|
123
|
+
const testColor = fromRGBA({ r: 128, g: 64, b: 192, a: 1 })
|
|
124
|
+
const wrapper = mountFunction({
|
|
125
|
+
props: {
|
|
126
|
+
color: testColor,
|
|
127
|
+
},
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
const dot = wrapper.find('.v-color-picker__dot')
|
|
131
|
+
expect(dot.exists()).toBe(true)
|
|
132
|
+
expect(dot.element.tagName).toBe('DIV')
|
|
133
|
+
|
|
134
|
+
// Проверяем что внутри есть один вложенный div
|
|
135
|
+
const innerDivs = dot.findAll('div')
|
|
136
|
+
expect(innerDivs.length).toBe(1)
|
|
69
137
|
|
|
70
|
-
|
|
138
|
+
// Проверяем что внутренний div имеет стиль с фоном
|
|
139
|
+
const innerDiv = innerDivs[0]
|
|
140
|
+
expect(innerDiv.attributes('style')).toBeDefined()
|
|
141
|
+
expect(innerDiv.attributes('style')).toContain('background')
|
|
71
142
|
})
|
|
72
143
|
})
|