test(e2e): align simplified splash expectations
Docker Image / Build and Push Docker Image (push) Successful in 3m4s

This commit is contained in:
Codex
2026-07-23 19:33:08 +08:00
parent 537a0a2c36
commit c659c5fc3f
2 changed files with 8 additions and 3 deletions
@@ -57,7 +57,7 @@ test("favorite entry and three-tab Menu navigation render on the real pages", as
name: "Primary navigation", name: "Primary navigation",
}); });
await expect(navigation).toContainText("Chat"); await expect(navigation).toContainText("Chat");
await expect(navigation).toContainText("Elio Private Zone"); await expect(navigation).toContainText("Private Zone");
await expect(navigation).toContainText("Menu"); await expect(navigation).toContainText("Menu");
await savePreview(page, `${mobile ? "mobile" : "desktop"}-splash.png`); await savePreview(page, `${mobile ? "mobile" : "desktop"}-splash.png`);
+7 -2
View File
@@ -13,6 +13,7 @@ const characters = [
displayName: "Elio Silvestri", displayName: "Elio Silvestri",
shortName: "Elio", shortName: "Elio",
cover: "elio.png", cover: "elio.png",
splashCover: "elio.png",
}, },
{ {
id: "maya-tan", id: "maya-tan",
@@ -20,6 +21,7 @@ const characters = [
displayName: "Maya Tan", displayName: "Maya Tan",
shortName: "Maya", shortName: "Maya",
cover: "maya.webp", cover: "maya.webp",
splashCover: "maya-home.webp",
}, },
{ {
id: "nayeli-cervantes", id: "nayeli-cervantes",
@@ -27,6 +29,7 @@ const characters = [
displayName: "Nayeli Cervantes", displayName: "Nayeli Cervantes",
shortName: "Nayeli", shortName: "Nayeli",
cover: "nayeli.webp", cover: "nayeli.webp",
splashCover: "nayeli.webp",
}, },
] as const; ] as const;
@@ -56,9 +59,11 @@ for (const character of characters) {
await page.goto(`/characters/${character.slug}/splash`); await page.goto(`/characters/${character.slug}/splash`);
const cover = page.locator(`img[src*="${character.cover}"]`); const cover = page.locator(`img[src*="${character.splashCover}"]`);
await expect(cover).toBeVisible(); await expect(cover).toBeVisible();
await expect(page.getByText(character.displayName).last()).toBeVisible(); await expect(
page.getByRole("navigation", { name: "Primary navigation" }),
).toContainText("Private Zone");
await expect await expect
.poll(() => .poll(() =>
cover.evaluate((image: HTMLImageElement) => cover.evaluate((image: HTMLImageElement) =>