This commit is contained in:
2026-10-24 16:34:02 +08:00
parent 99e5687ce0
commit 7119e04a65
24 changed files with 553 additions and 39 deletions
+11
View File
@@ -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')