From c659c5fc3fb9891934c38af8730e8a3217102697 Mon Sep 17 00:00:00 2001 From: Codex Date: Thu, 23 Jul 2026 19:33:08 +0800 Subject: [PATCH] test(e2e): align simplified splash expectations --- e2e/specs/mock/favorite-menu-navigation.spec.ts | 2 +- e2e/specs/mock/multi-role-commercial.spec.ts | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/e2e/specs/mock/favorite-menu-navigation.spec.ts b/e2e/specs/mock/favorite-menu-navigation.spec.ts index aad4963a..26043e31 100644 --- a/e2e/specs/mock/favorite-menu-navigation.spec.ts +++ b/e2e/specs/mock/favorite-menu-navigation.spec.ts @@ -57,7 +57,7 @@ test("favorite entry and three-tab Menu navigation render on the real pages", as name: "Primary navigation", }); await expect(navigation).toContainText("Chat"); - await expect(navigation).toContainText("Elio Private Zone"); + await expect(navigation).toContainText("Private Zone"); await expect(navigation).toContainText("Menu"); await savePreview(page, `${mobile ? "mobile" : "desktop"}-splash.png`); diff --git a/e2e/specs/mock/multi-role-commercial.spec.ts b/e2e/specs/mock/multi-role-commercial.spec.ts index 3ca68efe..87d4df5d 100644 --- a/e2e/specs/mock/multi-role-commercial.spec.ts +++ b/e2e/specs/mock/multi-role-commercial.spec.ts @@ -13,6 +13,7 @@ const characters = [ displayName: "Elio Silvestri", shortName: "Elio", cover: "elio.png", + splashCover: "elio.png", }, { id: "maya-tan", @@ -20,6 +21,7 @@ const characters = [ displayName: "Maya Tan", shortName: "Maya", cover: "maya.webp", + splashCover: "maya-home.webp", }, { id: "nayeli-cervantes", @@ -27,6 +29,7 @@ const characters = [ displayName: "Nayeli Cervantes", shortName: "Nayeli", cover: "nayeli.webp", + splashCover: "nayeli.webp", }, ] as const; @@ -56,9 +59,11 @@ for (const character of characters) { 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(page.getByText(character.displayName).last()).toBeVisible(); + await expect( + page.getByRole("navigation", { name: "Primary navigation" }), + ).toContainText("Private Zone"); await expect .poll(() => cover.evaluate((image: HTMLImageElement) =>