perf(short-drama-agent-front): 优化记录加载与工作区体验
This commit is contained in:
1 parent
d0264c08ce
commit
db9aea1694
111 files changed
+1680
-1290
No files matched your search
@@ -102,6 +102,10 @@ describe('服务端任务发现', () => {
|
||||
TestEventSource.last.dispatchEvent(new MessageEvent('message', { data: JSON.stringify(task) }))
|
||||
await flushPromises()
|
||||
expect(tracker.active.value).toBe(true)
|
||||
TestEventSource.last.dispatchEvent(new Event('error'))
|
||||
await flushPromises()
|
||||
expect(tracker.discoveryError.value).toContain('断开')
|
||||
expect(getOperation(task.projectId).pending).toBe(true)
|
||||
task.status = 'completed'
|
||||
TestEventSource.last.dispatchEvent(new MessageEvent('message', { data: JSON.stringify(task) }))
|
||||
await flushPromises()
|
||||
@@ -111,6 +115,7 @@ describe('服务端任务发现', () => {
|
||||
await flushPromises()
|
||||
expect(tracker.active.value).toBe(false)
|
||||
expect(tracker.query.data.value?.status).toBe('completed')
|
||||
expect(tracker.discoveryError.value).toBe('')
|
||||
scope.stop()
|
||||
expect(TestEventSource.last.close).toHaveBeenCalledOnce()
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user