接入后台架构标签与端到端验证

This commit is contained in:
czj
2026-07-16 13:14:27 +08:00
parent adbe9d129d
commit b2e06a2933
7 changed files with 411 additions and 29 deletions
+1 -16
View File
@@ -6,29 +6,14 @@ test("中文界面可以生成优化文章和导出链接", async ({ page }) =>
await page.goto("/");
await page.getByLabel("访问密钥").fill("local-dev-key");
await page.getByLabel("标题").fill("Example Technology Co., Ltd. GEO 指南");
await page
.getByLabel("文")
.getByLabel("文章内容")
.fill(
"Example Technology Co., Ltd. has 8 years of GEO optimization experience. Example GEO 帮助市场团队优化内容结构。",
);
await page.getByLabel("图片描述或图片链接").fill("产品仪表盘截图");
await page.getByLabel("用户要求").fill("保持事实准确,语气自然。");
await page.getByRole("button", { name: "分析文章" }).click();
await expect(page.getByText("候选事实卡已生成")).toBeVisible({
timeout: 70_000,
});
const confirmUncertainItemButtons = page.getByRole("button", {
name: "采纳为核心事实",
});
while ((await confirmUncertainItemButtons.count()) > 0) {
await confirmUncertainItemButtons.first().click();
}
await page.getByRole("button", { name: "确认事实卡" }).click();
await expect(page.getByText("事实卡已确认。")).toBeVisible();
await page.getByRole("button", { name: "开始优化" }).click();
await expect(page.getByRole("link", { name: "optimized.md" })).toBeVisible({
timeout: 120_000,