F2-8: 表单写体验 e2e 三态验证 + 截图竞态修复
- 新增 e2e/form-write.spec.ts:成功态/校验失败态/403态三个 E2E- 前缀用例 成功态 psql 落库验证 + 清理;校验失败态断言 status≠0 且 msg 无 "Internal Server Error" - f2-16-column-render.spec.ts:删除未用变量 BACKEND_NODE(TS 告警)+ 截图前等 Page-body - schema-samples.spec.ts:截图前 waitForSelector cxd-Page-body/table,避免截到 loading Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -113,6 +113,12 @@ for (const sample of SAMPLES) {
|
||||
// 确认无错误边界卡片(schema 加载失败/amis 崩溃时会出现)
|
||||
await expect(page.locator('[data-testid="schema-error-card"]')).not.toBeVisible();
|
||||
|
||||
// F2-8 竞态修复:截图前等 amis 内容区可见(表格行/Page body),避免截到 loading 状态
|
||||
await page.waitForSelector(
|
||||
'[data-testid="amis-host"] .cxd-Page-body, [data-testid="amis-host"] table, [data-testid="amis-host"] .cxd-CRUD',
|
||||
{ timeout: 10_000 },
|
||||
).catch(() => {/* 无表格内容(空页/树/form),已确认 amis-host 可见,继续截图 */});
|
||||
|
||||
// 截图存 e2e/artifacts/
|
||||
const screenshotPath = `e2e/artifacts/${sample.type}-${sample.id}.png`;
|
||||
await page.screenshot({ path: screenshotPath, fullPage: false });
|
||||
|
||||
Reference in New Issue
Block a user