Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions packages/web-app-search/tests/unit/portals/SearchBar.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import SearchBar from '../../../src/portals/SearchBar.vue'
import flushPromises from 'flush-promises'
import { mock } from 'vitest-mock-extended'
import { nextTick, ref } from 'vue'
import { markRaw, nextTick, ref } from 'vue'
import { defineComponent } from 'vue'
import {
defaultPlugins,
Expand Down Expand Up @@ -31,7 +31,7 @@ const providerFiles = {
previewSearch: {
available: true,
search: vi.fn(),
component
component: markRaw(component)
},
listSearch: {}
}
Expand All @@ -43,7 +43,7 @@ const providerContacts = {
previewSearch: {
available: true,
search: vi.fn(),
component
component: markRaw(component)
}
}

Expand Down Expand Up @@ -233,7 +233,7 @@ describe('Search Bar portal component', () => {
wrapper.find(selectors.searchInput).trigger('keyup.enter')
expect(spyRouterPushStub).not.toHaveBeenCalled()
})
test('executes search if term is empty but route is common search', async () => {
test('executes search if term is empty but route is common search', () => {
wrapper = getMountedWrapper({
route: 'files-common-search',
store: { resourcesStore: { currentFolder: { fileId: 'root-dir' } } }
Expand All @@ -255,7 +255,7 @@ describe('Search Bar portal component', () => {
})
})
})
test('does not execute search if term is empty and route is not common search', async () => {
test('does not execute search if term is empty and route is not common search', () => {
const { wrapper } = getMountedWrapper()
wrapper
.findComponent<typeof SearchBarFilter>(selectors.searchFilters)
Expand Down Expand Up @@ -299,7 +299,7 @@ function getMountedWrapper({
})
],
mocks: localMocks,
provide: localMocks,
provide: { ...localMocks, isMobileWidth: ref(false) },
stubs: {
'router-link': true
}
Expand Down