新增 E2E 测试配置与用例并更新测试补充文档
This commit is contained in:
@@ -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$/);
|
||||
});
|
||||
Reference in New Issue
Block a user