接入后台架构标签与端到端验证
This commit is contained in:
+1
-16
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user