mirror of
https://github.com/zuiidea/antd-admin
synced 2026-10-20 14:33:49 +00:00
- Drop orders routes, API, MSW, and e2e; users-only CRUD template - Port HTTP refresh, hooks, RouteError, and core e2e to basic - Lingui extract --clean in script; refresh catalogs - Update add-resource docs, cursor rule, and optimization spec Made-with: Cursor
20 lines
740 B
TypeScript
20 lines
740 B
TypeScript
import { test, expect } from "@playwright/test";
|
|
import { loginAsAdmin } from "./helpers";
|
|
|
|
test.describe("URL search state", () => {
|
|
test("persists keyword after reload", async ({ page }) => {
|
|
await loginAsAdmin(page);
|
|
await page.goto("/users");
|
|
await expect(page.getByPlaceholder(/Search User|搜索用户/)).toBeVisible({ timeout: 15_000 });
|
|
|
|
const searchInput = page.getByPlaceholder(/Search User|搜索用户/);
|
|
await searchInput.fill("zhao.ming");
|
|
await searchInput.press("Enter");
|
|
await expect(page).toHaveURL(/keyword=zhao\.ming/);
|
|
|
|
await page.reload();
|
|
await expect(page).toHaveURL(/keyword=zhao\.ming/);
|
|
await expect(page.getByText("zhao.ming", { exact: true })).toBeVisible();
|
|
});
|
|
});
|