|
@@ -43,13 +43,13 @@ async function mountView(path = '/conversations', stubTimeline = false) {
|
|
|
}
|
|
}
|
|
|
function successfulResponse(path: string) {
|
|
function successfulResponse(path: string) {
|
|
|
if (path === '/api/app/capabilities') return { features: [] }
|
|
if (path === '/api/app/capabilities') return { features: [] }
|
|
|
- if (path === '/api/app/workspace/snapshot') return { agents: [], conversations: [], details: [], cursor: 17 }
|
|
|
|
|
|
|
+ if (path.split('?')[0] === '/api/app/workspace/snapshot') return { agents: [], conversations: [], details: [], cursor: 17 }
|
|
|
throw new Error(`Unexpected request ${path}`)
|
|
throw new Error(`Unexpected request ${path}`)
|
|
|
}
|
|
}
|
|
|
it.each([undefined, null, { agents: [], conversations: [], details: [] }])('recovers incomplete Bot initialization data without requiring a virtual machine', async snapshot => {
|
|
it.each([undefined, null, { agents: [], conversations: [], details: [] }])('recovers incomplete Bot initialization data without requiring a virtual machine', async snapshot => {
|
|
|
let snapshots = 0
|
|
let snapshots = 0
|
|
|
vi.mocked(apiRequest).mockImplementation(async path => {
|
|
vi.mocked(apiRequest).mockImplementation(async path => {
|
|
|
- if (path === '/api/app/workspace/snapshot' && snapshots++ === 0) return snapshot as never
|
|
|
|
|
|
|
+ if (path.split('?')[0] === '/api/app/workspace/snapshot' && snapshots++ === 0) return snapshot as never
|
|
|
return successfulResponse(path) as never
|
|
return successfulResponse(path) as never
|
|
|
})
|
|
})
|
|
|
await mountView()
|
|
await mountView()
|