@morscherlab/mint-sdk 1.0.0-alpha.8 → 1.0.0-beta.1
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/README.md +15 -15
- package/dist/{auth-BYmxZdJl.js → auth-DsI0rQ7_.js} +6 -6
- package/dist/auth-DsI0rQ7_.js.map +1 -0
- package/dist/components/index.js +2 -2
- package/dist/{components-CKf-UpGi.js → components-CzbQQPCb.js} +1429 -1429
- package/dist/components-CzbQQPCb.js.map +1 -0
- package/dist/composables/index.js +2 -2
- package/dist/composables/usePlatformContext.d.ts +3 -3
- package/dist/{composables-D0QfFzq1.js → composables-BXklV5ii.js} +3 -3
- package/dist/{composables-D0QfFzq1.js.map → composables-BXklV5ii.js.map} +1 -1
- package/dist/index.js +4 -4
- package/dist/install.d.ts +3 -3
- package/dist/install.js +5 -5
- package/dist/install.js.map +1 -1
- package/dist/stores/auth.d.ts +1 -1
- package/dist/stores/index.js +1 -1
- package/dist/stores/settings.d.ts +1 -1
- package/dist/styles.css +5388 -5388
- package/dist/types/platform.d.ts +1 -1
- package/dist/{useScheduleDrag-DAJueTbK.js → useScheduleDrag-CxBeqYcu.js} +331 -331
- package/dist/useScheduleDrag-CxBeqYcu.js.map +1 -0
- package/package.json +2 -2
- package/src/__tests__/components/AppLayout.test.ts +23 -23
- package/src/__tests__/components/AppSidebar.test.ts +29 -29
- package/src/__tests__/components/AppTopBar.test.ts +45 -45
- package/src/__tests__/components/BaseInput.test.ts +2 -2
- package/src/__tests__/components/BasePill.test.ts +37 -37
- package/src/__tests__/components/Calendar.test.ts +52 -52
- package/src/__tests__/components/CollapsibleCard.test.ts +81 -81
- package/src/__tests__/components/DataFrame.test.ts +80 -80
- package/src/__tests__/components/DropdownButton.test.ts +80 -80
- package/src/__tests__/composables/usePlatformContext.test.ts +1 -1
- package/src/components/AlertBox.story.vue +1 -1
- package/src/components/AlertBox.vue +14 -14
- package/src/components/AppAvatarMenu.vue +26 -26
- package/src/components/AppContainer.vue +3 -3
- package/src/components/AppLayout.vue +7 -7
- package/src/components/AppPageSelector.vue +30 -30
- package/src/components/AppPillNav.vue +10 -10
- package/src/components/AppPluginSwitcher.vue +31 -31
- package/src/components/AppSidebar.vue +8 -8
- package/src/components/AppTopBar.story.vue +7 -7
- package/src/components/AppTopBar.vue +102 -102
- package/src/components/AuditTrail.vue +19 -19
- package/src/components/AutoGroupModal.vue +76 -76
- package/src/components/Avatar.vue +6 -6
- package/src/components/BaseButton.vue +6 -6
- package/src/components/BaseCheckbox.vue +9 -9
- package/src/components/BaseInput.vue +4 -4
- package/src/components/BaseModal.story.vue +1 -1
- package/src/components/BaseModal.vue +14 -14
- package/src/components/BasePill.vue +9 -9
- package/src/components/BaseRadioGroup.vue +21 -21
- package/src/components/BaseSelect.vue +6 -6
- package/src/components/BaseSlider.vue +8 -8
- package/src/components/BaseTabs.vue +7 -7
- package/src/components/BaseTextarea.vue +5 -5
- package/src/components/BaseToggle.vue +10 -10
- package/src/components/BatchProgressList.vue +25 -25
- package/src/components/Breadcrumb.vue +8 -8
- package/src/components/Calendar.vue +19 -19
- package/src/components/ChartContainer.vue +9 -9
- package/src/components/ChemicalFormula.vue +7 -7
- package/src/components/CollapsibleCard.vue +20 -20
- package/src/components/ColorSlider.vue +6 -6
- package/src/components/ConcentrationInput.vue +12 -12
- package/src/components/ConfirmDialog.story.vue +1 -1
- package/src/components/ConfirmDialog.vue +7 -7
- package/src/components/DataFrame.vue +40 -40
- package/src/components/DatePicker.vue +29 -29
- package/src/components/DateTimePicker.vue +41 -41
- package/src/components/Divider.vue +9 -9
- package/src/components/DoseCalculator.vue +66 -66
- package/src/components/DropdownButton.vue +19 -19
- package/src/components/EmptyState.vue +9 -9
- package/src/components/ExperimentCodeBadge.vue +3 -3
- package/src/components/ExperimentDataViewer.vue +25 -25
- package/src/components/ExperimentPopover.vue +35 -35
- package/src/components/ExperimentSelectorModal.vue +40 -40
- package/src/components/ExperimentTimeline.vue +48 -48
- package/src/components/FileUploader.vue +31 -31
- package/src/components/FitPanel.vue +9 -9
- package/src/components/FormActions.vue +1 -1
- package/src/components/FormBuilder.vue +2 -2
- package/src/components/FormField.vue +7 -7
- package/src/components/FormSection.vue +7 -7
- package/src/components/FormulaInput.vue +10 -10
- package/src/components/GroupAssigner.vue +40 -40
- package/src/components/GroupingModal.vue +45 -45
- package/src/components/IconButton.vue +6 -6
- package/src/components/LoadingSpinner.vue +5 -5
- package/src/components/MoleculeInput.vue +21 -21
- package/src/components/MultiSelect.vue +13 -13
- package/src/components/NumberInput.vue +13 -13
- package/src/components/PlateMapEditor.vue +63 -63
- package/src/components/ProgressBar.vue +18 -18
- package/src/components/ProtocolStepEditor.vue +57 -57
- package/src/components/RackEditor.vue +28 -28
- package/src/components/ReagentEditor.vue +61 -61
- package/src/components/ReagentList.vue +49 -49
- package/src/components/ResourceCard.vue +28 -28
- package/src/components/SampleHierarchyTree.vue +13 -13
- package/src/components/SampleLegend.vue +12 -12
- package/src/components/SampleSelector.vue +104 -104
- package/src/components/ScheduleCalendar.vue +42 -42
- package/src/components/ScientificNumber.vue +11 -11
- package/src/components/SegmentedControl.vue +12 -12
- package/src/components/SequenceInput.vue +32 -32
- package/src/components/SettingsButton.vue +5 -5
- package/src/components/SettingsModal.vue +17 -17
- package/src/components/StatusIndicator.vue +5 -5
- package/src/components/StepWizard.vue +16 -16
- package/src/components/TagsInput.vue +20 -20
- package/src/components/ThemeToggle.vue +3 -3
- package/src/components/TimePicker.vue +21 -21
- package/src/components/TimeRangeInput.vue +5 -5
- package/src/components/ToastNotification.vue +8 -8
- package/src/components/Tooltip.vue +7 -7
- package/src/components/UnitInput.vue +12 -12
- package/src/components/WellEditPopup.vue +28 -28
- package/src/components/WellPlate.vue +37 -37
- package/src/composables/useAppExperiment.ts +1 -1
- package/src/composables/usePlatformContext.ts +16 -16
- package/src/composables/useProtocolTemplates.ts +1 -1
- package/src/install.ts +3 -3
- package/src/stores/auth.ts +3 -3
- package/src/stores/settings.ts +2 -2
- package/src/styles/components/alert-box.css +30 -30
- package/src/styles/components/app-avatar-menu.css +23 -23
- package/src/styles/components/app-container.css +6 -6
- package/src/styles/components/app-layout.css +15 -15
- package/src/styles/components/app-page-selector.css +26 -26
- package/src/styles/components/app-pill-nav.css +7 -7
- package/src/styles/components/app-plugin-switcher.css +27 -27
- package/src/styles/components/app-sidebar.css +24 -24
- package/src/styles/components/app-top-bar.css +65 -65
- package/src/styles/components/audit-trail.css +29 -29
- package/src/styles/components/auto-group-modal.css +91 -91
- package/src/styles/components/avatar.css +15 -15
- package/src/styles/components/batch-progress-list.css +40 -40
- package/src/styles/components/breadcrumb.css +8 -8
- package/src/styles/components/button.css +31 -31
- package/src/styles/components/calendar.css +27 -27
- package/src/styles/components/chart-container.css +9 -9
- package/src/styles/components/checkbox.css +20 -20
- package/src/styles/components/chemical-formula.css +8 -8
- package/src/styles/components/collapsible-card.css +35 -35
- package/src/styles/components/color-slider.css +8 -8
- package/src/styles/components/concentration-input.css +27 -27
- package/src/styles/components/confirm-dialog.css +32 -32
- package/src/styles/components/dataframe.css +66 -66
- package/src/styles/components/date-picker.css +40 -40
- package/src/styles/components/datetime-picker.css +37 -37
- package/src/styles/components/divider.css +13 -13
- package/src/styles/components/dose-calculator.css +43 -43
- package/src/styles/components/dropdown-button.css +46 -46
- package/src/styles/components/empty-state.css +44 -44
- package/src/styles/components/experiment-code-badge.css +8 -8
- package/src/styles/components/experiment-data-viewer.css +23 -23
- package/src/styles/components/experiment-popover.css +97 -97
- package/src/styles/components/experiment-selector-modal.css +39 -39
- package/src/styles/components/experiment-timeline.css +98 -98
- package/src/styles/components/file-uploader.css +44 -44
- package/src/styles/components/fit-panel.css +12 -12
- package/src/styles/components/form-builder.css +11 -11
- package/src/styles/components/form-field.css +7 -7
- package/src/styles/components/formula-input.css +17 -17
- package/src/styles/components/group-assigner.css +26 -26
- package/src/styles/components/grouping-modal.css +51 -51
- package/src/styles/components/icon-button.css +41 -41
- package/src/styles/components/input.css +13 -13
- package/src/styles/components/loading-spinner.css +12 -12
- package/src/styles/components/modal.css +69 -69
- package/src/styles/components/molecule-input.css +27 -27
- package/src/styles/components/multi-select.css +23 -23
- package/src/styles/components/number-input.css +32 -32
- package/src/styles/components/pill.css +37 -37
- package/src/styles/components/plate-map-editor.css +67 -67
- package/src/styles/components/progress-bar.css +41 -41
- package/src/styles/components/protocol-step-editor.css +63 -63
- package/src/styles/components/rack-editor.css +34 -34
- package/src/styles/components/radio-group.css +41 -41
- package/src/styles/components/reagent-editor.css +70 -70
- package/src/styles/components/reagent-list.css +65 -65
- package/src/styles/components/resource-card.css +52 -52
- package/src/styles/components/sample-hierarchy-tree.css +56 -56
- package/src/styles/components/sample-legend.css +37 -37
- package/src/styles/components/sample-selector.css +121 -121
- package/src/styles/components/schedule-calendar.css +67 -67
- package/src/styles/components/scientific-number.css +11 -11
- package/src/styles/components/segmented-control.css +33 -33
- package/src/styles/components/select.css +11 -11
- package/src/styles/components/sequence-input.css +29 -29
- package/src/styles/components/settings-button.css +16 -16
- package/src/styles/components/settings-modal.css +14 -14
- package/src/styles/components/skeleton.css +2 -2
- package/src/styles/components/slider.css +10 -10
- package/src/styles/components/status-indicator.css +12 -12
- package/src/styles/components/step-wizard.css +32 -32
- package/src/styles/components/tabs.css +16 -16
- package/src/styles/components/tags-input.css +46 -46
- package/src/styles/components/textarea.css +17 -17
- package/src/styles/components/theme-toggle.css +13 -13
- package/src/styles/components/time-picker.css +28 -28
- package/src/styles/components/time-range-input.css +8 -8
- package/src/styles/components/toast.css +18 -18
- package/src/styles/components/toggle.css +27 -27
- package/src/styles/components/tooltip.css +18 -18
- package/src/styles/components/unit-input.css +25 -25
- package/src/styles/components/well-edit-popup.css +32 -32
- package/src/styles/components/well-plate.css +49 -49
- package/src/styles/index.css +1 -1
- package/src/styles/variables.css +3 -3
- package/src/types/platform.ts +6 -6
- package/dist/auth-BYmxZdJl.js.map +0 -1
- package/dist/components-CKf-UpGi.js.map +0 -1
- package/dist/useScheduleDrag-DAJueTbK.js.map +0 -1
|
@@ -8,30 +8,30 @@ describe('BasePill', () => {
|
|
|
8
8
|
const wrapper = mount(BasePill, {
|
|
9
9
|
slots: { default: 'Label' },
|
|
10
10
|
})
|
|
11
|
-
expect(wrapper.find('.
|
|
12
|
-
expect(wrapper.find('.
|
|
13
|
-
expect(wrapper.find('.
|
|
11
|
+
expect(wrapper.find('.mint-pill').exists()).toBe(true)
|
|
12
|
+
expect(wrapper.find('.mint-pill--default').exists()).toBe(true)
|
|
13
|
+
expect(wrapper.find('.mint-pill--md').exists()).toBe(true)
|
|
14
14
|
})
|
|
15
15
|
|
|
16
16
|
it('should render label content', () => {
|
|
17
17
|
const wrapper = mount(BasePill, {
|
|
18
18
|
slots: { default: 'Test Label' },
|
|
19
19
|
})
|
|
20
|
-
expect(wrapper.find('.
|
|
20
|
+
expect(wrapper.find('.mint-pill__label').text()).toBe('Test Label')
|
|
21
21
|
})
|
|
22
22
|
|
|
23
23
|
it('should not show remove button by default', () => {
|
|
24
24
|
const wrapper = mount(BasePill, {
|
|
25
25
|
slots: { default: 'Label' },
|
|
26
26
|
})
|
|
27
|
-
expect(wrapper.find('.
|
|
27
|
+
expect(wrapper.find('.mint-pill__remove').exists()).toBe(false)
|
|
28
28
|
})
|
|
29
29
|
|
|
30
30
|
it('should not show icon slot by default', () => {
|
|
31
31
|
const wrapper = mount(BasePill, {
|
|
32
32
|
slots: { default: 'Label' },
|
|
33
33
|
})
|
|
34
|
-
expect(wrapper.find('.
|
|
34
|
+
expect(wrapper.find('.mint-pill__icon').exists()).toBe(false)
|
|
35
35
|
})
|
|
36
36
|
})
|
|
37
37
|
|
|
@@ -41,7 +41,7 @@ describe('BasePill', () => {
|
|
|
41
41
|
props: { variant: 'primary' },
|
|
42
42
|
slots: { default: 'Primary' },
|
|
43
43
|
})
|
|
44
|
-
expect(wrapper.find('.
|
|
44
|
+
expect(wrapper.find('.mint-pill--primary').exists()).toBe(true)
|
|
45
45
|
})
|
|
46
46
|
|
|
47
47
|
it('should apply success variant class', () => {
|
|
@@ -49,7 +49,7 @@ describe('BasePill', () => {
|
|
|
49
49
|
props: { variant: 'success' },
|
|
50
50
|
slots: { default: 'Success' },
|
|
51
51
|
})
|
|
52
|
-
expect(wrapper.find('.
|
|
52
|
+
expect(wrapper.find('.mint-pill--success').exists()).toBe(true)
|
|
53
53
|
})
|
|
54
54
|
|
|
55
55
|
it('should apply warning variant class', () => {
|
|
@@ -57,7 +57,7 @@ describe('BasePill', () => {
|
|
|
57
57
|
props: { variant: 'warning' },
|
|
58
58
|
slots: { default: 'Warning' },
|
|
59
59
|
})
|
|
60
|
-
expect(wrapper.find('.
|
|
60
|
+
expect(wrapper.find('.mint-pill--warning').exists()).toBe(true)
|
|
61
61
|
})
|
|
62
62
|
|
|
63
63
|
it('should apply error variant class', () => {
|
|
@@ -65,7 +65,7 @@ describe('BasePill', () => {
|
|
|
65
65
|
props: { variant: 'error' },
|
|
66
66
|
slots: { default: 'Error' },
|
|
67
67
|
})
|
|
68
|
-
expect(wrapper.find('.
|
|
68
|
+
expect(wrapper.find('.mint-pill--error').exists()).toBe(true)
|
|
69
69
|
})
|
|
70
70
|
|
|
71
71
|
it('should apply info variant class', () => {
|
|
@@ -73,7 +73,7 @@ describe('BasePill', () => {
|
|
|
73
73
|
props: { variant: 'info' },
|
|
74
74
|
slots: { default: 'Info' },
|
|
75
75
|
})
|
|
76
|
-
expect(wrapper.find('.
|
|
76
|
+
expect(wrapper.find('.mint-pill--info').exists()).toBe(true)
|
|
77
77
|
})
|
|
78
78
|
|
|
79
79
|
it('should apply outline variant class', () => {
|
|
@@ -81,7 +81,7 @@ describe('BasePill', () => {
|
|
|
81
81
|
props: { variant: 'outline' },
|
|
82
82
|
slots: { default: 'Outline' },
|
|
83
83
|
})
|
|
84
|
-
expect(wrapper.find('.
|
|
84
|
+
expect(wrapper.find('.mint-pill--outline').exists()).toBe(true)
|
|
85
85
|
})
|
|
86
86
|
})
|
|
87
87
|
|
|
@@ -91,7 +91,7 @@ describe('BasePill', () => {
|
|
|
91
91
|
props: { size: 'sm' },
|
|
92
92
|
slots: { default: 'Small' },
|
|
93
93
|
})
|
|
94
|
-
expect(wrapper.find('.
|
|
94
|
+
expect(wrapper.find('.mint-pill--sm').exists()).toBe(true)
|
|
95
95
|
})
|
|
96
96
|
|
|
97
97
|
it('should apply medium size class', () => {
|
|
@@ -99,7 +99,7 @@ describe('BasePill', () => {
|
|
|
99
99
|
props: { size: 'md' },
|
|
100
100
|
slots: { default: 'Medium' },
|
|
101
101
|
})
|
|
102
|
-
expect(wrapper.find('.
|
|
102
|
+
expect(wrapper.find('.mint-pill--md').exists()).toBe(true)
|
|
103
103
|
})
|
|
104
104
|
|
|
105
105
|
it('should apply large size class', () => {
|
|
@@ -107,7 +107,7 @@ describe('BasePill', () => {
|
|
|
107
107
|
props: { size: 'lg' },
|
|
108
108
|
slots: { default: 'Large' },
|
|
109
109
|
})
|
|
110
|
-
expect(wrapper.find('.
|
|
110
|
+
expect(wrapper.find('.mint-pill--lg').exists()).toBe(true)
|
|
111
111
|
})
|
|
112
112
|
})
|
|
113
113
|
|
|
@@ -117,7 +117,7 @@ describe('BasePill', () => {
|
|
|
117
117
|
props: { removable: true },
|
|
118
118
|
slots: { default: 'Removable' },
|
|
119
119
|
})
|
|
120
|
-
expect(wrapper.find('.
|
|
120
|
+
expect(wrapper.find('.mint-pill__remove').exists()).toBe(true)
|
|
121
121
|
})
|
|
122
122
|
|
|
123
123
|
it('should emit remove event when remove button is clicked', async () => {
|
|
@@ -125,7 +125,7 @@ describe('BasePill', () => {
|
|
|
125
125
|
props: { removable: true },
|
|
126
126
|
slots: { default: 'Removable' },
|
|
127
127
|
})
|
|
128
|
-
await wrapper.find('.
|
|
128
|
+
await wrapper.find('.mint-pill__remove').trigger('click')
|
|
129
129
|
expect(wrapper.emitted('remove')).toHaveLength(1)
|
|
130
130
|
})
|
|
131
131
|
|
|
@@ -134,7 +134,7 @@ describe('BasePill', () => {
|
|
|
134
134
|
props: { removable: true, disabled: true },
|
|
135
135
|
slots: { default: 'Disabled' },
|
|
136
136
|
})
|
|
137
|
-
expect(wrapper.find('.
|
|
137
|
+
expect(wrapper.find('.mint-pill__remove').exists()).toBe(false)
|
|
138
138
|
})
|
|
139
139
|
|
|
140
140
|
it('should stop event propagation on remove click', async () => {
|
|
@@ -142,7 +142,7 @@ describe('BasePill', () => {
|
|
|
142
142
|
props: { removable: true },
|
|
143
143
|
slots: { default: 'Removable' },
|
|
144
144
|
})
|
|
145
|
-
const button = wrapper.find('.
|
|
145
|
+
const button = wrapper.find('.mint-pill__remove')
|
|
146
146
|
const clickEvent = new MouseEvent('click', { bubbles: true })
|
|
147
147
|
const stopPropagationSpy = vi.spyOn(clickEvent, 'stopPropagation')
|
|
148
148
|
|
|
@@ -157,7 +157,7 @@ describe('BasePill', () => {
|
|
|
157
157
|
props: { disabled: true },
|
|
158
158
|
slots: { default: 'Disabled' },
|
|
159
159
|
})
|
|
160
|
-
expect(wrapper.find('.
|
|
160
|
+
expect(wrapper.find('.mint-pill--disabled').exists()).toBe(true)
|
|
161
161
|
})
|
|
162
162
|
|
|
163
163
|
it('should not emit remove event when disabled', async () => {
|
|
@@ -166,7 +166,7 @@ describe('BasePill', () => {
|
|
|
166
166
|
slots: { default: 'Disabled' },
|
|
167
167
|
})
|
|
168
168
|
// Remove button shouldn't exist when disabled + removable
|
|
169
|
-
expect(wrapper.find('.
|
|
169
|
+
expect(wrapper.find('.mint-pill__remove').exists()).toBe(false)
|
|
170
170
|
})
|
|
171
171
|
})
|
|
172
172
|
|
|
@@ -179,7 +179,7 @@ describe('BasePill', () => {
|
|
|
179
179
|
icon: '<svg class="test-icon"></svg>',
|
|
180
180
|
},
|
|
181
181
|
})
|
|
182
|
-
expect(wrapper.find('.
|
|
182
|
+
expect(wrapper.find('.mint-pill__icon').exists()).toBe(true)
|
|
183
183
|
expect(wrapper.find('.test-icon').exists()).toBe(true)
|
|
184
184
|
})
|
|
185
185
|
|
|
@@ -191,7 +191,7 @@ describe('BasePill', () => {
|
|
|
191
191
|
icon: '<svg></svg>',
|
|
192
192
|
},
|
|
193
193
|
})
|
|
194
|
-
expect(wrapper.find('.
|
|
194
|
+
expect(wrapper.find('.mint-pill--with-icon').exists()).toBe(true)
|
|
195
195
|
})
|
|
196
196
|
|
|
197
197
|
it('should not show icon slot when icon is false', () => {
|
|
@@ -202,7 +202,7 @@ describe('BasePill', () => {
|
|
|
202
202
|
icon: '<svg class="test-icon"></svg>',
|
|
203
203
|
},
|
|
204
204
|
})
|
|
205
|
-
expect(wrapper.find('.
|
|
205
|
+
expect(wrapper.find('.mint-pill__icon').exists()).toBe(false)
|
|
206
206
|
})
|
|
207
207
|
})
|
|
208
208
|
|
|
@@ -220,11 +220,11 @@ describe('BasePill', () => {
|
|
|
220
220
|
icon: '<svg></svg>',
|
|
221
221
|
},
|
|
222
222
|
})
|
|
223
|
-
const pill = wrapper.find('.
|
|
224
|
-
expect(pill.classes()).toContain('
|
|
225
|
-
expect(pill.classes()).toContain('
|
|
226
|
-
expect(pill.classes()).toContain('
|
|
227
|
-
expect(pill.classes()).toContain('
|
|
223
|
+
const pill = wrapper.find('.mint-pill')
|
|
224
|
+
expect(pill.classes()).toContain('mint-pill--success')
|
|
225
|
+
expect(pill.classes()).toContain('mint-pill--sm')
|
|
226
|
+
expect(pill.classes()).toContain('mint-pill--disabled')
|
|
227
|
+
expect(pill.classes()).toContain('mint-pill--with-icon')
|
|
228
228
|
})
|
|
229
229
|
|
|
230
230
|
it('should render with icon and remove button', () => {
|
|
@@ -238,8 +238,8 @@ describe('BasePill', () => {
|
|
|
238
238
|
icon: '<svg class="icon"></svg>',
|
|
239
239
|
},
|
|
240
240
|
})
|
|
241
|
-
expect(wrapper.find('.
|
|
242
|
-
expect(wrapper.find('.
|
|
241
|
+
expect(wrapper.find('.mint-pill__icon').exists()).toBe(true)
|
|
242
|
+
expect(wrapper.find('.mint-pill__remove').exists()).toBe(true)
|
|
243
243
|
})
|
|
244
244
|
})
|
|
245
245
|
|
|
@@ -249,7 +249,7 @@ describe('BasePill', () => {
|
|
|
249
249
|
props: { removable: true },
|
|
250
250
|
slots: { default: 'Removable' },
|
|
251
251
|
})
|
|
252
|
-
const button = wrapper.find('.
|
|
252
|
+
const button = wrapper.find('.mint-pill__remove')
|
|
253
253
|
expect(button.attributes('aria-label')).toBe('Remove')
|
|
254
254
|
})
|
|
255
255
|
|
|
@@ -258,7 +258,7 @@ describe('BasePill', () => {
|
|
|
258
258
|
props: { removable: true },
|
|
259
259
|
slots: { default: 'Removable' },
|
|
260
260
|
})
|
|
261
|
-
const button = wrapper.find('.
|
|
261
|
+
const button = wrapper.find('.mint-pill__remove')
|
|
262
262
|
expect(button.attributes('type')).toBe('button')
|
|
263
263
|
})
|
|
264
264
|
})
|
|
@@ -266,8 +266,8 @@ describe('BasePill', () => {
|
|
|
266
266
|
describe('edge cases', () => {
|
|
267
267
|
it('should handle empty label', () => {
|
|
268
268
|
const wrapper = mount(BasePill)
|
|
269
|
-
expect(wrapper.find('.
|
|
270
|
-
expect(wrapper.find('.
|
|
269
|
+
expect(wrapper.find('.mint-pill__label').exists()).toBe(true)
|
|
270
|
+
expect(wrapper.find('.mint-pill__label').text()).toBe('')
|
|
271
271
|
})
|
|
272
272
|
|
|
273
273
|
it('should handle long text labels', () => {
|
|
@@ -275,7 +275,7 @@ describe('BasePill', () => {
|
|
|
275
275
|
const wrapper = mount(BasePill, {
|
|
276
276
|
slots: { default: longText },
|
|
277
277
|
})
|
|
278
|
-
expect(wrapper.find('.
|
|
278
|
+
expect(wrapper.find('.mint-pill__label').text()).toBe(longText)
|
|
279
279
|
})
|
|
280
280
|
|
|
281
281
|
it('should render SVG icon in remove button', () => {
|
|
@@ -283,7 +283,7 @@ describe('BasePill', () => {
|
|
|
283
283
|
props: { removable: true },
|
|
284
284
|
slots: { default: 'Test' },
|
|
285
285
|
})
|
|
286
|
-
const svg = wrapper.find('.
|
|
286
|
+
const svg = wrapper.find('.mint-pill__remove-icon')
|
|
287
287
|
expect(svg.exists()).toBe(true)
|
|
288
288
|
expect(svg.element.tagName).toBe('svg')
|
|
289
289
|
})
|
|
@@ -7,26 +7,26 @@ describe('Calendar', () => {
|
|
|
7
7
|
describe('rendering with default props', () => {
|
|
8
8
|
it('should render calendar container', () => {
|
|
9
9
|
const wrapper = mount(Calendar)
|
|
10
|
-
expect(wrapper.find('.
|
|
10
|
+
expect(wrapper.find('.mint-calendar').exists()).toBe(true)
|
|
11
11
|
})
|
|
12
12
|
|
|
13
13
|
it('should show navigation by default', () => {
|
|
14
14
|
const wrapper = mount(Calendar)
|
|
15
|
-
expect(wrapper.find('.
|
|
16
|
-
expect(wrapper.findAll('.
|
|
15
|
+
expect(wrapper.find('.mint-calendar__header').exists()).toBe(true)
|
|
16
|
+
expect(wrapper.findAll('.mint-calendar__nav-btn')).toHaveLength(2)
|
|
17
17
|
})
|
|
18
18
|
|
|
19
19
|
it('should display current month and year', () => {
|
|
20
20
|
const wrapper = mount(Calendar, {
|
|
21
21
|
props: { month: 0, year: 2024 },
|
|
22
22
|
})
|
|
23
|
-
expect(wrapper.find('.
|
|
24
|
-
expect(wrapper.find('.
|
|
23
|
+
expect(wrapper.find('.mint-calendar__title').text()).toContain('January')
|
|
24
|
+
expect(wrapper.find('.mint-calendar__title').text()).toContain('2024')
|
|
25
25
|
})
|
|
26
26
|
|
|
27
27
|
it('should render weekday labels', () => {
|
|
28
28
|
const wrapper = mount(Calendar)
|
|
29
|
-
const weekdays = wrapper.findAll('.
|
|
29
|
+
const weekdays = wrapper.findAll('.mint-calendar__weekday')
|
|
30
30
|
expect(weekdays).toHaveLength(7)
|
|
31
31
|
})
|
|
32
32
|
|
|
@@ -34,13 +34,13 @@ describe('Calendar', () => {
|
|
|
34
34
|
const wrapper = mount(Calendar, {
|
|
35
35
|
props: { fixedWeeks: true },
|
|
36
36
|
})
|
|
37
|
-
const days = wrapper.findAll('.
|
|
37
|
+
const days = wrapper.findAll('.mint-calendar__day')
|
|
38
38
|
expect(days).toHaveLength(42)
|
|
39
39
|
})
|
|
40
40
|
|
|
41
41
|
it('should render day grid', () => {
|
|
42
42
|
const wrapper = mount(Calendar)
|
|
43
|
-
expect(wrapper.find('.
|
|
43
|
+
expect(wrapper.find('.mint-calendar__grid').exists()).toBe(true)
|
|
44
44
|
})
|
|
45
45
|
})
|
|
46
46
|
|
|
@@ -49,7 +49,7 @@ describe('Calendar', () => {
|
|
|
49
49
|
const wrapper = mount(Calendar, {
|
|
50
50
|
props: { month: 1, year: 2024 },
|
|
51
51
|
})
|
|
52
|
-
const prevBtn = wrapper.findAll('.
|
|
52
|
+
const prevBtn = wrapper.findAll('.mint-calendar__nav-btn')[0]
|
|
53
53
|
await prevBtn.trigger('click')
|
|
54
54
|
|
|
55
55
|
expect(wrapper.emitted('update:month')).toHaveLength(1)
|
|
@@ -60,7 +60,7 @@ describe('Calendar', () => {
|
|
|
60
60
|
const wrapper = mount(Calendar, {
|
|
61
61
|
props: { month: 0, year: 2024 },
|
|
62
62
|
})
|
|
63
|
-
const nextBtn = wrapper.findAll('.
|
|
63
|
+
const nextBtn = wrapper.findAll('.mint-calendar__nav-btn')[1]
|
|
64
64
|
await nextBtn.trigger('click')
|
|
65
65
|
|
|
66
66
|
expect(wrapper.emitted('update:month')).toHaveLength(1)
|
|
@@ -71,7 +71,7 @@ describe('Calendar', () => {
|
|
|
71
71
|
const wrapper = mount(Calendar, {
|
|
72
72
|
props: { month: 0, year: 2024 },
|
|
73
73
|
})
|
|
74
|
-
const prevBtn = wrapper.findAll('.
|
|
74
|
+
const prevBtn = wrapper.findAll('.mint-calendar__nav-btn')[0]
|
|
75
75
|
await prevBtn.trigger('click')
|
|
76
76
|
|
|
77
77
|
expect(wrapper.emitted('update:month')?.[0]).toEqual([11])
|
|
@@ -82,7 +82,7 @@ describe('Calendar', () => {
|
|
|
82
82
|
const wrapper = mount(Calendar, {
|
|
83
83
|
props: { month: 11, year: 2024 },
|
|
84
84
|
})
|
|
85
|
-
const nextBtn = wrapper.findAll('.
|
|
85
|
+
const nextBtn = wrapper.findAll('.mint-calendar__nav-btn')[1]
|
|
86
86
|
await nextBtn.trigger('click')
|
|
87
87
|
|
|
88
88
|
expect(wrapper.emitted('update:month')?.[0]).toEqual([0])
|
|
@@ -93,7 +93,7 @@ describe('Calendar', () => {
|
|
|
93
93
|
const wrapper = mount(Calendar, {
|
|
94
94
|
props: { month: 5, year: 2024 },
|
|
95
95
|
})
|
|
96
|
-
const prevBtn = wrapper.findAll('.
|
|
96
|
+
const prevBtn = wrapper.findAll('.mint-calendar__nav-btn')[0]
|
|
97
97
|
await prevBtn.trigger('click')
|
|
98
98
|
|
|
99
99
|
expect(wrapper.emitted('navigate')).toHaveLength(1)
|
|
@@ -104,7 +104,7 @@ describe('Calendar', () => {
|
|
|
104
104
|
const wrapper = mount(Calendar, {
|
|
105
105
|
props: { showNavigation: false },
|
|
106
106
|
})
|
|
107
|
-
expect(wrapper.find('.
|
|
107
|
+
expect(wrapper.find('.mint-calendar__header').exists()).toBe(false)
|
|
108
108
|
})
|
|
109
109
|
})
|
|
110
110
|
|
|
@@ -113,7 +113,7 @@ describe('Calendar', () => {
|
|
|
113
113
|
const wrapper = mount(Calendar, {
|
|
114
114
|
props: { selectionMode: 'single', month: 0, year: 2024 },
|
|
115
115
|
})
|
|
116
|
-
const days = wrapper.findAll('.
|
|
116
|
+
const days = wrapper.findAll('.mint-calendar__day')
|
|
117
117
|
await days[15].trigger('click') // Click a day
|
|
118
118
|
|
|
119
119
|
expect(wrapper.emitted('update:modelValue')).toHaveLength(1)
|
|
@@ -131,7 +131,7 @@ describe('Calendar', () => {
|
|
|
131
131
|
year: 2024,
|
|
132
132
|
},
|
|
133
133
|
})
|
|
134
|
-
const selectedDays = wrapper.findAll('.
|
|
134
|
+
const selectedDays = wrapper.findAll('.mint-calendar__day--selected')
|
|
135
135
|
expect(selectedDays.length).toBeGreaterThan(0)
|
|
136
136
|
})
|
|
137
137
|
|
|
@@ -139,7 +139,7 @@ describe('Calendar', () => {
|
|
|
139
139
|
const wrapper = mount(Calendar, {
|
|
140
140
|
props: { selectionMode: 'single', month: 0, year: 2024 },
|
|
141
141
|
})
|
|
142
|
-
const days = wrapper.findAll('.
|
|
142
|
+
const days = wrapper.findAll('.mint-calendar__day')
|
|
143
143
|
await days[10].trigger('click')
|
|
144
144
|
|
|
145
145
|
expect(wrapper.emitted('day-click')).toHaveLength(1)
|
|
@@ -155,7 +155,7 @@ describe('Calendar', () => {
|
|
|
155
155
|
const wrapper = mount(Calendar, {
|
|
156
156
|
props: { selectionMode: 'range', month: 0, year: 2024 },
|
|
157
157
|
})
|
|
158
|
-
const days = wrapper.findAll('.
|
|
158
|
+
const days = wrapper.findAll('.mint-calendar__day')
|
|
159
159
|
await days[10].trigger('click')
|
|
160
160
|
|
|
161
161
|
// First click doesn't emit yet (waiting for end date)
|
|
@@ -166,7 +166,7 @@ describe('Calendar', () => {
|
|
|
166
166
|
const wrapper = mount(Calendar, {
|
|
167
167
|
props: { selectionMode: 'range', month: 0, year: 2024 },
|
|
168
168
|
})
|
|
169
|
-
const days = wrapper.findAll('.
|
|
169
|
+
const days = wrapper.findAll('.mint-calendar__day')
|
|
170
170
|
await days[10].trigger('click')
|
|
171
171
|
await days[15].trigger('click')
|
|
172
172
|
|
|
@@ -182,7 +182,7 @@ describe('Calendar', () => {
|
|
|
182
182
|
const wrapper = mount(Calendar, {
|
|
183
183
|
props: { selectionMode: 'range', month: 0, year: 2024 },
|
|
184
184
|
})
|
|
185
|
-
const days = wrapper.findAll('.
|
|
185
|
+
const days = wrapper.findAll('.mint-calendar__day')
|
|
186
186
|
await days[15].trigger('click')
|
|
187
187
|
await days[10].trigger('click')
|
|
188
188
|
|
|
@@ -201,7 +201,7 @@ describe('Calendar', () => {
|
|
|
201
201
|
year: 2024,
|
|
202
202
|
},
|
|
203
203
|
})
|
|
204
|
-
const inRangeDays = wrapper.findAll('.
|
|
204
|
+
const inRangeDays = wrapper.findAll('.mint-calendar__day--in-range')
|
|
205
205
|
expect(inRangeDays.length).toBeGreaterThan(0)
|
|
206
206
|
})
|
|
207
207
|
})
|
|
@@ -211,7 +211,7 @@ describe('Calendar', () => {
|
|
|
211
211
|
const wrapper = mount(Calendar, {
|
|
212
212
|
props: { selectionMode: 'multiple', modelValue: [], month: 0, year: 2024 },
|
|
213
213
|
})
|
|
214
|
-
const days = wrapper.findAll('.
|
|
214
|
+
const days = wrapper.findAll('.mint-calendar__day')
|
|
215
215
|
await days[10].trigger('click')
|
|
216
216
|
|
|
217
217
|
expect(wrapper.emitted('update:modelValue')).toHaveLength(1)
|
|
@@ -233,8 +233,8 @@ describe('Calendar', () => {
|
|
|
233
233
|
})
|
|
234
234
|
|
|
235
235
|
// Find and click the first selected date
|
|
236
|
-
const days = wrapper.findAll('.
|
|
237
|
-
const dayToClick = days.find(d => d.classes().includes('
|
|
236
|
+
const days = wrapper.findAll('.mint-calendar__day')
|
|
237
|
+
const dayToClick = days.find(d => d.classes().includes('mint-calendar__day--selected'))
|
|
238
238
|
if (dayToClick) {
|
|
239
239
|
await dayToClick.trigger('click')
|
|
240
240
|
const newSelection = wrapper.emitted('update:modelValue')?.[0]?.[0] as Date[]
|
|
@@ -251,7 +251,7 @@ describe('Calendar', () => {
|
|
|
251
251
|
const wrapper = mount(Calendar, {
|
|
252
252
|
props: { markers, month: 0, year: 2024 },
|
|
253
253
|
})
|
|
254
|
-
expect(wrapper.find('.
|
|
254
|
+
expect(wrapper.find('.mint-calendar__marker').exists()).toBe(true)
|
|
255
255
|
})
|
|
256
256
|
|
|
257
257
|
it('should apply marker color', () => {
|
|
@@ -261,7 +261,7 @@ describe('Calendar', () => {
|
|
|
261
261
|
const wrapper = mount(Calendar, {
|
|
262
262
|
props: { markers, month: 0, year: 2024 },
|
|
263
263
|
})
|
|
264
|
-
const marker = wrapper.find('.
|
|
264
|
+
const marker = wrapper.find('.mint-calendar__marker')
|
|
265
265
|
expect(marker.attributes('style')).toContain('--marker-color')
|
|
266
266
|
})
|
|
267
267
|
|
|
@@ -272,7 +272,7 @@ describe('Calendar', () => {
|
|
|
272
272
|
const wrapper = mount(Calendar, {
|
|
273
273
|
props: { markers, month: 0, year: 2024 },
|
|
274
274
|
})
|
|
275
|
-
const marker = wrapper.find('.
|
|
275
|
+
const marker = wrapper.find('.mint-calendar__marker')
|
|
276
276
|
expect(marker.attributes('title')).toBe('Important Event')
|
|
277
277
|
})
|
|
278
278
|
|
|
@@ -287,8 +287,8 @@ describe('Calendar', () => {
|
|
|
287
287
|
props: { markers, month: 0, year: 2024 },
|
|
288
288
|
})
|
|
289
289
|
// Find the day with markers
|
|
290
|
-
const markersContainer = wrapper.find('.
|
|
291
|
-
const renderedMarkers = markersContainer.findAll('.
|
|
290
|
+
const markersContainer = wrapper.find('.mint-calendar__markers')
|
|
291
|
+
const renderedMarkers = markersContainer.findAll('.mint-calendar__marker')
|
|
292
292
|
expect(renderedMarkers).toHaveLength(3)
|
|
293
293
|
})
|
|
294
294
|
|
|
@@ -300,8 +300,8 @@ describe('Calendar', () => {
|
|
|
300
300
|
const wrapper = mount(Calendar, {
|
|
301
301
|
props: { markers, month: 0, year: 2024 },
|
|
302
302
|
})
|
|
303
|
-
expect(wrapper.find('.
|
|
304
|
-
expect(wrapper.find('.
|
|
303
|
+
expect(wrapper.find('.mint-calendar__marker--dot').exists()).toBe(true)
|
|
304
|
+
expect(wrapper.find('.mint-calendar__marker--bar').exists()).toBe(true)
|
|
305
305
|
})
|
|
306
306
|
})
|
|
307
307
|
|
|
@@ -311,7 +311,7 @@ describe('Calendar', () => {
|
|
|
311
311
|
const wrapper = mount(Calendar, {
|
|
312
312
|
props: { minDate, month: 0, year: 2024 },
|
|
313
313
|
})
|
|
314
|
-
const days = wrapper.findAll('.
|
|
314
|
+
const days = wrapper.findAll('.mint-calendar__day')
|
|
315
315
|
// Days before 15th should be disabled
|
|
316
316
|
const firstDay = days[0]
|
|
317
317
|
expect(firstDay.attributes('disabled')).toBeDefined()
|
|
@@ -322,7 +322,7 @@ describe('Calendar', () => {
|
|
|
322
322
|
const wrapper = mount(Calendar, {
|
|
323
323
|
props: { maxDate, month: 0, year: 2024 },
|
|
324
324
|
})
|
|
325
|
-
const days = wrapper.findAll('.
|
|
325
|
+
const days = wrapper.findAll('.mint-calendar__day')
|
|
326
326
|
// Days after 15th should be disabled (later in the array)
|
|
327
327
|
const lastDays = days.slice(-5)
|
|
328
328
|
const hasDisabled = lastDays.some(d => d.attributes('disabled') !== undefined)
|
|
@@ -334,7 +334,7 @@ describe('Calendar', () => {
|
|
|
334
334
|
const wrapper = mount(Calendar, {
|
|
335
335
|
props: { disabledDates, month: 0, year: 2024 },
|
|
336
336
|
})
|
|
337
|
-
const disabledDays = wrapper.findAll('.
|
|
337
|
+
const disabledDays = wrapper.findAll('.mint-calendar__day--disabled')
|
|
338
338
|
expect(disabledDays.length).toBeGreaterThan(0)
|
|
339
339
|
})
|
|
340
340
|
|
|
@@ -346,7 +346,7 @@ describe('Calendar', () => {
|
|
|
346
346
|
const wrapper = mount(Calendar, {
|
|
347
347
|
props: { isDateDisabled: isWeekend, month: 0, year: 2024 },
|
|
348
348
|
})
|
|
349
|
-
const disabledDays = wrapper.findAll('.
|
|
349
|
+
const disabledDays = wrapper.findAll('.mint-calendar__day--disabled')
|
|
350
350
|
// Should have disabled weekend days
|
|
351
351
|
expect(disabledDays.length).toBeGreaterThan(0)
|
|
352
352
|
})
|
|
@@ -356,7 +356,7 @@ describe('Calendar', () => {
|
|
|
356
356
|
const wrapper = mount(Calendar, {
|
|
357
357
|
props: { selectionMode: 'single', minDate, month: 0, year: 2024 },
|
|
358
358
|
})
|
|
359
|
-
const days = wrapper.findAll('.
|
|
359
|
+
const days = wrapper.findAll('.mint-calendar__day')
|
|
360
360
|
const disabledDay = days.find(d => d.attributes('disabled') !== undefined)
|
|
361
361
|
|
|
362
362
|
if (disabledDay) {
|
|
@@ -371,7 +371,7 @@ describe('Calendar', () => {
|
|
|
371
371
|
const wrapper = mount(Calendar, {
|
|
372
372
|
props: { weekStartsOn: 1 },
|
|
373
373
|
})
|
|
374
|
-
const weekdays = wrapper.findAll('.
|
|
374
|
+
const weekdays = wrapper.findAll('.mint-calendar__weekday')
|
|
375
375
|
// First weekday should be Mon (depends on locale)
|
|
376
376
|
expect(weekdays[0].text()).toBeTruthy()
|
|
377
377
|
})
|
|
@@ -380,7 +380,7 @@ describe('Calendar', () => {
|
|
|
380
380
|
const wrapper = mount(Calendar, {
|
|
381
381
|
props: { weekStartsOn: 0 },
|
|
382
382
|
})
|
|
383
|
-
const weekdays = wrapper.findAll('.
|
|
383
|
+
const weekdays = wrapper.findAll('.mint-calendar__weekday')
|
|
384
384
|
expect(weekdays).toHaveLength(7)
|
|
385
385
|
})
|
|
386
386
|
})
|
|
@@ -390,7 +390,7 @@ describe('Calendar', () => {
|
|
|
390
390
|
const wrapper = mount(Calendar, {
|
|
391
391
|
props: { month: 0, year: 2024, showOutsideDays: true },
|
|
392
392
|
})
|
|
393
|
-
const outsideDays = wrapper.findAll('.
|
|
393
|
+
const outsideDays = wrapper.findAll('.mint-calendar__day--outside')
|
|
394
394
|
expect(outsideDays.length).toBeGreaterThan(0)
|
|
395
395
|
})
|
|
396
396
|
|
|
@@ -403,7 +403,7 @@ describe('Calendar', () => {
|
|
|
403
403
|
showOutsideDays: false,
|
|
404
404
|
},
|
|
405
405
|
})
|
|
406
|
-
const outsideDay = wrapper.find('.
|
|
406
|
+
const outsideDay = wrapper.find('.mint-calendar__day--outside')
|
|
407
407
|
if (outsideDay.exists()) {
|
|
408
408
|
await outsideDay.trigger('click')
|
|
409
409
|
expect(wrapper.emitted('update:modelValue')).toBeUndefined()
|
|
@@ -417,7 +417,7 @@ describe('Calendar', () => {
|
|
|
417
417
|
const wrapper = mount(Calendar, {
|
|
418
418
|
props: { month: today.getMonth(), year: today.getFullYear() },
|
|
419
419
|
})
|
|
420
|
-
const todayDay = wrapper.find('.
|
|
420
|
+
const todayDay = wrapper.find('.mint-calendar__day--today')
|
|
421
421
|
expect(todayDay.exists()).toBe(true)
|
|
422
422
|
})
|
|
423
423
|
})
|
|
@@ -427,14 +427,14 @@ describe('Calendar', () => {
|
|
|
427
427
|
const wrapper = mount(Calendar, {
|
|
428
428
|
props: { month: 0, year: 2024 },
|
|
429
429
|
})
|
|
430
|
-
expect(wrapper.find('.
|
|
430
|
+
expect(wrapper.find('.mint-calendar__title').text()).toContain('January')
|
|
431
431
|
})
|
|
432
432
|
|
|
433
433
|
it('should accept custom locale', () => {
|
|
434
434
|
const wrapper = mount(Calendar, {
|
|
435
435
|
props: { month: 0, year: 2024, locale: 'de-DE' },
|
|
436
436
|
})
|
|
437
|
-
const title = wrapper.find('.
|
|
437
|
+
const title = wrapper.find('.mint-calendar__title').text()
|
|
438
438
|
expect(title).toBeTruthy()
|
|
439
439
|
})
|
|
440
440
|
})
|
|
@@ -442,7 +442,7 @@ describe('Calendar', () => {
|
|
|
442
442
|
describe('accessibility', () => {
|
|
443
443
|
it('should have button type on day cells', () => {
|
|
444
444
|
const wrapper = mount(Calendar)
|
|
445
|
-
const days = wrapper.findAll('.
|
|
445
|
+
const days = wrapper.findAll('.mint-calendar__day')
|
|
446
446
|
days.forEach(day => {
|
|
447
447
|
expect(day.attributes('type')).toBe('button')
|
|
448
448
|
})
|
|
@@ -450,7 +450,7 @@ describe('Calendar', () => {
|
|
|
450
450
|
|
|
451
451
|
it('should have aria-label on navigation buttons', () => {
|
|
452
452
|
const wrapper = mount(Calendar)
|
|
453
|
-
const navButtons = wrapper.findAll('.
|
|
453
|
+
const navButtons = wrapper.findAll('.mint-calendar__nav-btn')
|
|
454
454
|
expect(navButtons[0].attributes('aria-label')).toBe('Previous month')
|
|
455
455
|
expect(navButtons[1].attributes('aria-label')).toBe('Next month')
|
|
456
456
|
})
|
|
@@ -460,7 +460,7 @@ describe('Calendar', () => {
|
|
|
460
460
|
const wrapper = mount(Calendar, {
|
|
461
461
|
props: { minDate, month: 0, year: 2024 },
|
|
462
462
|
})
|
|
463
|
-
const disabledDay = wrapper.find('.
|
|
463
|
+
const disabledDay = wrapper.find('.mint-calendar__day--disabled')
|
|
464
464
|
expect(disabledDay.attributes('disabled')).toBeDefined()
|
|
465
465
|
})
|
|
466
466
|
})
|
|
@@ -470,7 +470,7 @@ describe('Calendar', () => {
|
|
|
470
470
|
const wrapper = mount(Calendar, {
|
|
471
471
|
props: { selectionMode: 'none', month: 0, year: 2024 },
|
|
472
472
|
})
|
|
473
|
-
const days = wrapper.findAll('.
|
|
473
|
+
const days = wrapper.findAll('.mint-calendar__day')
|
|
474
474
|
await days[10].trigger('click')
|
|
475
475
|
|
|
476
476
|
expect(wrapper.emitted('update:modelValue')).toBeUndefined()
|
|
@@ -480,7 +480,7 @@ describe('Calendar', () => {
|
|
|
480
480
|
const wrapper = mount(Calendar, {
|
|
481
481
|
props: { selectionMode: 'none', month: 0, year: 2024 },
|
|
482
482
|
})
|
|
483
|
-
const days = wrapper.findAll('.
|
|
483
|
+
const days = wrapper.findAll('.mint-calendar__day')
|
|
484
484
|
await days[10].trigger('click')
|
|
485
485
|
|
|
486
486
|
expect(wrapper.emitted('day-click')).toHaveLength(1)
|
|
@@ -522,7 +522,7 @@ describe('Calendar', () => {
|
|
|
522
522
|
const wrapper = mount(Calendar, {
|
|
523
523
|
props: { month: 11, year: 2023 },
|
|
524
524
|
})
|
|
525
|
-
const nextBtn = wrapper.findAll('.
|
|
525
|
+
const nextBtn = wrapper.findAll('.mint-calendar__nav-btn')[1]
|
|
526
526
|
await nextBtn.trigger('click')
|
|
527
527
|
|
|
528
528
|
expect(wrapper.emitted('update:year')?.[0]).toEqual([2024])
|
|
@@ -536,7 +536,7 @@ describe('Calendar', () => {
|
|
|
536
536
|
const wrapper = mount(Calendar, {
|
|
537
537
|
props: { markers, month: 0, year: 2024 },
|
|
538
538
|
})
|
|
539
|
-
expect(wrapper.find('.
|
|
539
|
+
expect(wrapper.find('.mint-calendar__marker').exists()).toBe(true)
|
|
540
540
|
})
|
|
541
541
|
|
|
542
542
|
it('should handle string date inputs for disabled dates', () => {
|
|
@@ -547,7 +547,7 @@ describe('Calendar', () => {
|
|
|
547
547
|
year: 2024,
|
|
548
548
|
},
|
|
549
549
|
})
|
|
550
|
-
const disabledDays = wrapper.findAll('.
|
|
550
|
+
const disabledDays = wrapper.findAll('.mint-calendar__day--disabled')
|
|
551
551
|
expect(disabledDays.length).toBeGreaterThan(0)
|
|
552
552
|
})
|
|
553
553
|
|
|
@@ -559,7 +559,7 @@ describe('Calendar', () => {
|
|
|
559
559
|
year: 2024,
|
|
560
560
|
},
|
|
561
561
|
})
|
|
562
|
-
const disabledDays = wrapper.findAll('.
|
|
562
|
+
const disabledDays = wrapper.findAll('.mint-calendar__day--disabled')
|
|
563
563
|
expect(disabledDays.length).toBeGreaterThan(0)
|
|
564
564
|
})
|
|
565
565
|
})
|