fix(e2e): stabilize authenticated unlock flows

This commit is contained in:
Codex
2026-07-22 16:53:09 +08:00
parent 8bd67b83c5
commit e813333607
16 changed files with 116 additions and 28 deletions
@@ -7,7 +7,6 @@ import {
defaultCharacterChatUrl,
expectInsufficientCreditsDialog,
expectVipChatSubscriptionUrl,
setEmailSessionStorage,
submitEmailLogin,
switchToEmailSignIn,
} from "@e2e/fixtures/test-helpers";
@@ -36,13 +35,10 @@ test("guest unlocks a promoted image through email login and top-up", async ({
await expect(page).toHaveURL(/\/auth\?redirect=/);
await switchToEmailSignIn(page);
await submitEmailLogin(page, { expectedUrl: defaultCharacterChatUrl });
await setEmailSessionStorage(page);
const unlockRequestPromise = page.waitForRequest(
"**/api/chat/unlock-private",
);
await page.reload();
await submitEmailLogin(page, { expectedUrl: defaultCharacterChatUrl });
const unlockRequest = await unlockRequestPromise;
expect(unlockRequest.method()).toBe("POST");