fixed frontent test errors
Some checks failed
Chore App Build and Push Docker Images / build-and-push (push) Failing after 1m47s

This commit is contained in:
2026-02-19 13:31:19 -05:00
parent 53236ab019
commit a7ac179e1a
6 changed files with 46 additions and 8 deletions

View File

@@ -10,14 +10,12 @@ describe('ItemList.vue', () => {
it('does not show delete button for system items', async () => {
const wrapper = mount(ItemList, {
props: {
fetchUrl: '',
itemKey: 'items',
itemFields: ['name'],
deletable: true,
testItems: [systemItem],
},
global: {
stubs: ['svg'],
},
})
await flushPromises()
expect(wrapper.find('.delete-btn').exists()).toBe(false)
@@ -26,14 +24,12 @@ describe('ItemList.vue', () => {
it('shows delete button for user items', async () => {
const wrapper = mount(ItemList, {
props: {
fetchUrl: '',
itemKey: 'items',
itemFields: ['name'],
deletable: true,
testItems: [userItem],
},
global: {
stubs: ['svg'],
},
})
await flushPromises()
expect(wrapper.find('.delete-btn').exists()).toBe(true)

View File

@@ -11,8 +11,8 @@ global.fetch = vi.fn()
const mockRouter = createRouter({
history: createMemoryHistory(),
routes: [
{ path: '/auth/login', name: 'Login' },
{ path: '/profile', name: 'UserProfile' },
{ path: '/auth/login', name: 'Login', component: { template: '<div />' } },
{ path: '/profile', name: 'UserProfile', component: { template: '<div />' } },
],
})