Sfoglia il codice sorgente

稳定思考动画验收的首段输出等待窗口

Samien 1 mese fa
parent
commit
8c7ac37cea
2 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 1 0
      tests/e2e/workspace.spec.ts
  2. 1 1
      tests/fixtures/fake-hermes.mjs

+ 1 - 0
tests/e2e/workspace.spec.ts

@@ -837,6 +837,7 @@ test('opens a local message file link as a floating preview card', async ({ page
 
 test('shows a thinking animation after submit until output starts', async ({ page }) => {
   await page.goto('/chat/session-demo?profile=yaoyao')
+  await expect(page.getByText('已整理完成。下面是', { exact: false })).toBeVisible()
   const replies = page.getByText('这是来自假 Gateway 的流式回复。', { exact: true })
   const count = await replies.count()
   await page.locator('.composer-textarea').fill('请开始思考')

+ 1 - 1
tests/fixtures/fake-hermes.mjs

@@ -521,7 +521,7 @@ server.on('upgrade', (request, socket, head) => {
           client.send(JSON.stringify({ jsonrpc: '2.0', method: 'event', params: { type: 'message.start', session_id: requestFrame.params.session_id, profile: 'yaoyao' } }))
           client.send(JSON.stringify({ jsonrpc: '2.0', method: 'event', params: { type: 'message.delta', session_id: requestFrame.params.session_id, profile: 'yaoyao', payload: { text: '这是来自假 Gateway 的流式回复。' } } }))
           client.send(JSON.stringify({ jsonrpc: '2.0', method: 'event', params: { type: 'message.complete', session_id: requestFrame.params.session_id, profile: 'yaoyao', payload: { text: '这是来自假 Gateway 的流式回复。', status: 'complete' } } }))
-        }, 1200)
+        }, requestFrame.params.text === '请开始思考' ? 3500 : 1200)
         return
       }
       respond({ ok: true })