Skip to content

Commit 907b3d7

Browse files
committed
Fix tests
1 parent a5ff045 commit 907b3d7

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

tests-ui/renderer/extensions/vueNodes/widgets/components/WidgetSelect.test.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import { createTestingPinia } from '@pinia/testing'
22
import { mount } from '@vue/test-utils'
33
import PrimeVue from 'primevue/config'
4-
import Select from 'primevue/select'
54
import type { SelectProps } from 'primevue/select'
65
import { beforeEach, describe, expect, it, vi } from 'vitest'
76

7+
import SelectPlus from '@/components/primevueOverride/SelectPlus.vue'
88
import type { ComboInputSpec } from '@/schemas/nodeDef/nodeDefSchemaV2'
99
import type { SimplifiedWidget } from '@/types/simplifiedWidget'
10-
1110
import WidgetSelect from '@/renderer/extensions/vueNodes/widgets/components/WidgetSelect.vue'
1211
import WidgetSelectDefault from '@/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue'
1312
import WidgetSelectDropdown from '@/renderer/extensions/vueNodes/widgets/components/WidgetSelectDropdown.vue'
@@ -76,7 +75,7 @@ describe('WidgetSelect Value Binding', () => {
7675
},
7776
global: {
7877
plugins: [PrimeVue, createTestingPinia()],
79-
components: { Select }
78+
components: { SelectPlus }
8079
}
8180
})
8281
}
@@ -85,7 +84,7 @@ describe('WidgetSelect Value Binding', () => {
8584
wrapper: ReturnType<typeof mount>,
8685
value: string
8786
) => {
88-
const select = wrapper.findComponent({ name: 'Select' })
87+
const select = wrapper.findComponent({ name: 'SelectPlus' })
8988
await select.setValue(value)
9089
return wrapper.emitted('update:modelValue')
9190
}
@@ -150,7 +149,7 @@ describe('WidgetSelect Value Binding', () => {
150149
const widget = createMockWidget('', { values: [] })
151150
const wrapper = mountComponent(widget, '')
152151

153-
const select = wrapper.findComponent({ name: 'Select' })
152+
const select = wrapper.findComponent({ name: 'SelectPlus' })
154153
expect(select.props('options')).toEqual([])
155154
})
156155

@@ -160,7 +159,7 @@ describe('WidgetSelect Value Binding', () => {
160159
})
161160
const wrapper = mountComponent(widget, 'only_option')
162161

163-
const select = wrapper.findComponent({ name: 'Select' })
162+
const select = wrapper.findComponent({ name: 'SelectPlus' })
164163
const options = select.props('options')
165164
expect(options).toHaveLength(1)
166165
expect(options[0]).toEqual('only_option')
@@ -228,7 +227,7 @@ describe('WidgetSelect Value Binding', () => {
228227
},
229228
global: {
230229
plugins: [PrimeVue, createTestingPinia()],
231-
components: { Select }
230+
components: { SelectPlus }
232231
}
233232
})
234233

@@ -247,7 +246,7 @@ describe('WidgetSelect Value Binding', () => {
247246
},
248247
global: {
249248
plugins: [PrimeVue, createTestingPinia()],
250-
components: { Select }
249+
components: { SelectPlus }
251250
}
252251
})
253252

@@ -271,7 +270,7 @@ describe('WidgetSelect Value Binding', () => {
271270
},
272271
global: {
273272
plugins: [PrimeVue, createTestingPinia()],
274-
components: { Select }
273+
components: { SelectPlus }
275274
}
276275
})
277276

@@ -290,7 +289,7 @@ describe('WidgetSelect Value Binding', () => {
290289
},
291290
global: {
292291
plugins: [PrimeVue, createTestingPinia()],
293-
components: { Select }
292+
components: { SelectPlus }
294293
}
295294
})
296295

0 commit comments

Comments
 (0)