新增 E2E 测试配置与用例并更新测试补充文档

This commit is contained in:
2026-03-03 13:56:07 +08:00
parent 482307f2f4
commit fe3016d710
10 changed files with 149 additions and 2 deletions
+15
View File
@@ -0,0 +1,15 @@
import { test, expect } from "@playwright/test";
test("首页模式卡片可正确导航", async ({ page }) => {
await page.goto("/");
await expect(page.getByRole("heading", { name: "NoWhatever" })).toBeVisible();
await page.getByRole("button", { name: /极速救场/ }).click();
await expect(page).toHaveURL(/\/panic$/);
await page.getByRole("button", { name: "返回" }).click();
await expect(page).toHaveURL(/\/$/);
await page.getByRole("button", { name: /周末契约/ }).click();
await expect(page).toHaveURL(/\/blindbox$/);
});