++
This commit is contained in:
@@ -94,6 +94,17 @@ describe('ChatView tab title', () => {
|
||||
vi.spyOn(chatStore, 'loadSessions').mockResolvedValue()
|
||||
})
|
||||
|
||||
it('loads sessions while profiles, settings and models are still pending', async () => {
|
||||
const pending = new Promise<void>(() => {})
|
||||
vi.mocked(useProfilesStore().fetchProfiles).mockReturnValue(pending)
|
||||
vi.mocked(useSettingsStore().fetchSettings).mockReturnValue(pending)
|
||||
vi.mocked(useAppStore().loadModels).mockReturnValue(pending)
|
||||
const wrapper = mount(ChatView)
|
||||
await nextTick()
|
||||
expect(useChatStore().loadSessions).toHaveBeenCalledOnce()
|
||||
wrapper.unmount()
|
||||
})
|
||||
|
||||
it('reflects the active session title in the browser tab', async () => {
|
||||
const chatStore = useChatStore()
|
||||
chatStore.activeSession = makeSession('Research Plan')
|
||||
|
||||
Reference in New Issue
Block a user