test(e2e): update specs for multi-character routes

This commit is contained in:
2026-07-17 16:49:20 +08:00
parent 8a53a07e0e
commit 78e97c3612
10 changed files with 60 additions and 28 deletions
@@ -4,6 +4,7 @@ import { mockCoreApis } from "@e2e/fixtures/api-mocks";
import {
clearBrowserState,
completeVipPayment,
defaultCharacterChatUrl,
expectInsufficientCreditsDialog,
expectVipChatSubscriptionUrl,
setEmailSessionStorage,
@@ -24,7 +25,7 @@ test("guest unlocks a promoted image through email login and top-up", async ({
await page.goto(
"/external-entry?target=chat&mode=promotion&promotion_type=image",
);
await expect(page).toHaveURL(/\/chat$/);
await expect(page).toHaveURL(defaultCharacterChatUrl);
const unlockButton = page.getByRole("button", {
name: "Unlock private image",
@@ -35,7 +36,7 @@ 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: /\/chat$/ });
await submitEmailLogin(page, { expectedUrl: defaultCharacterChatUrl });
await setEmailSessionStorage(page);
const unlockRequestPromise = page.waitForRequest(
@@ -57,6 +58,6 @@ test("guest unlocks a promoted image through email login and top-up", async ({
await expectVipChatSubscriptionUrl(page);
await completeVipPayment(page);
await expect(page).toHaveURL(/\/chat$/);
await expect(page).toHaveURL(defaultCharacterChatUrl);
await expect(page.getByRole("textbox", { name: "Message" })).toBeVisible();
});