fix: display canonical API failure labels in the grading page
This commit is contained in:
@@ -140,12 +140,14 @@ test('failed scoring shows the network error and retry guidance on the page', as
|
||||
await page.route('**/api/projects/11/scores?*', route => route.fulfill({ json: {
|
||||
student_no: '9000000001', name: '学生甲', topic: '项目', totals: { overall: null }, facts: {},
|
||||
rows: [{ criterion: { criterion_id: 'stage1.problem', category: 'stage1', name: '需求分析', max_score: 25 },
|
||||
status: 'failed', error: 'ConnectError:无法连接模型端点,请检查 Docker 网络、DNS 或代理',
|
||||
status: 'failed', status_label: '模型连接失败',
|
||||
error: '模型请求或JSON校验失败(ConnectError:无法连接模型端点,请检查 Docker 网络、DNS 或代理),已重试2次',
|
||||
evidence: [], missing_evidence: [], evidence_gaps: [] }],
|
||||
} }));
|
||||
await page.goto('/?page=scores&batch_id=71&project_id=11');
|
||||
await expect(page.getByText('当前项目有 1 项评分失败', { exact: true })).toBeVisible();
|
||||
await expect(page.getByText(/ConnectError:无法连接模型端点/)).toBeVisible();
|
||||
await expect(page.getByText('模型连接失败', { exact: true })).toBeVisible();
|
||||
await expect(page.getByText(/已经成功的评分和教师复核会保留/)).toBeVisible();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user