refactor: remove legacy session recovery UI
This commit is contained in:
@@ -11,9 +11,7 @@ async function mockApi(page: Page) {
|
||||
tool_calls: [{ id: 'call-one', name: 'search_project_material', status: 'completed', arguments: { project_id: 1 },
|
||||
summary: '找到 1 条引用', result: { found: true, citations: [{ page: 48, quote: '第48页原文片段' }] } },
|
||||
{ id: 'call-two', name: 'get_scores', status: 'completed', arguments: { batch_id: 3, criterion_offset: 0 },
|
||||
summary: '返回 1 项评分', result: { next_criterion_offset: 6, results: [{ rows: [{ criterion_id: 'C1', final_score: 8 }] }] } },
|
||||
{ id: 'call-legacy', name: 'search_project_material', status: 'completed', arguments: { project_id: 1 },
|
||||
summary: '找到 6 条引用', result: { found: true, citations: { count: 6 } } }] }],
|
||||
summary: '返回 1 项评分', result: { next_criterion_offset: 6, results: [{ rows: [{ criterion_id: 'C1', final_score: 8 }] }] } }] }],
|
||||
actions: [], runs: [{ id: 1, status: 'completed', tool_calls: [] }] },
|
||||
};
|
||||
let nextId = 8;
|
||||
@@ -105,12 +103,10 @@ test('markdown, citations, tool folding and narrow layout are safe', async ({ pa
|
||||
await expect(page.locator('.tool-detail').first()).toContainText('第48页原文片段');
|
||||
await page.locator('.chat-tool').nth(1).locator('summary').click();
|
||||
await expect(page.locator('.chat-tool').nth(1).locator('.tool-detail')).toContainText('C1');
|
||||
await page.locator('.chat-tool').nth(2).locator('summary').click();
|
||||
await expect(page.locator('.chat-tool').nth(2).locator('.legacy-evidence')).toContainText('第48页原文片段');
|
||||
await page.getByRole('button', { name: '查看本轮已核验原文' }).click();
|
||||
await page.locator('.chat-citation-group > summary').click();
|
||||
await expect(page.locator('.chat-citation-group')).toHaveAttribute('open', '');
|
||||
await expect(page.getByText('资料.pdf')).toBeVisible();
|
||||
await expect(page.getByText('第 48 页').last()).toBeVisible();
|
||||
await expect(page.getByText('第 48 页')).toBeVisible();
|
||||
const positions = await page.evaluate(() => {
|
||||
const card = document.querySelector('.chat-assistant .ant-card-body');
|
||||
return ['.chat-tools', '.chat-markdown', '.chat-citations'].map(selector =>
|
||||
|
||||
Reference in New Issue
Block a user