fix(e2e): stabilize authenticated unlock flows
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user