Files
no-whatever/e2e/home-navigation.spec.ts
T

16 lines
554 B
TypeScript

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$/);
});