test(10-13): regression tests for all 6 UAT gaps

- keyboard.test.js: Gap 4 test — matched.find(r => r.instances?.default) resolves to FileManagerView
- TreeItem.test.js: Gap 1 tests — animate-pulse present, 'Loading' text absent during shimmer state
- StorageBrowser.showSearch.test.js: Gap 2 tests — showSearch true for local+cloud at root
- All 219 tests pass (8 new, 211 existing)
This commit is contained in:
curo1305
2026-06-16 19:19:02 +02:00
parent bac5dcfe3d
commit 339f5a0c82
3 changed files with 142 additions and 0 deletions
+21
View File
@@ -136,3 +136,24 @@ describe('UX-08: "N" starts new folder input', () => {
expect(() => w.vm.startNewFolder()).not.toThrow()
})
})
describe('Gap 4: getFileManagerInstance resolves to actual component, not RouterView proxy', () => {
it('matched.find(r => r.instances?.default) returns an object with focusSearch defined when mounted via router-view', async () => {
setActivePinia(createPinia())
const router = makeRouter()
await router.push('/')
await router.isReady()
// Mount via a router-view wrapper so Vue Router populates r.instances.default
const { defineComponent, h } = await import('vue')
const { RouterView } = await import('vue-router')
const App = defineComponent({ render: () => h(RouterView) })
mount(App, {
global: { plugins: [router], stubs: { QuotaBar: true, AppSpinner: true } },
})
await flushPromises()
const instance = router.currentRoute.value.matched.find(r => r.instances?.default)?.instances?.default
expect(instance).not.toBeNull()
expect(instance).toBeDefined()
expect(typeof instance.focusSearch).toBe('function')
})
})