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
@@ -10,6 +10,10 @@ import {
signInWithEmailAndOpenChat,
} from "@e2e/fixtures/test-helpers";
const paidImageOverlayUrl = new RegExp(
`/chat\\?image=${paidImageMessageId}$`,
);
test.beforeEach(async ({ baseURL, context, page }) => {
await clearBrowserState(context, page, baseURL);
await mockCoreApis(page, {
@@ -29,7 +33,7 @@ test("user sees insufficient credits when unlocking a paid image from fullscreen
await expect(paidImageButton).toBeVisible({ timeout: 10_000 });
await paidImageButton.click();
await expect(page).toHaveURL(new RegExp(`/chat/image/${paidImageMessageId}$`));
await expect(page).toHaveURL(paidImageOverlayUrl);
const lockedImageDialog = page.getByRole("dialog", {
name: "Locked fullscreen image",