refactor(e2e): organize fixtures by feature

This commit is contained in:
2026-07-16 11:49:58 +08:00
parent 764bb5a862
commit e730799aa5
28 changed files with 521 additions and 1335 deletions
+14
View File
@@ -0,0 +1,14 @@
import type { Page } from "@playwright/test";
import { apiEnvelope } from "../data/common";
import { e2eEmailUser } from "../data/auth";
import { userEntitlementsResponse } from "../data/user";
export async function registerUserMocks(page: Page) {
await page.route("**/api/user/profile", async (route) => {
await route.fulfill({ json: apiEnvelope(e2eEmailUser) });
});
await page.route("**/api/user/entitlements", async (route) => {
await route.fulfill({ json: apiEnvelope(userEntitlementsResponse) });
});
}