test(e2e): align simplified splash expectations
Docker Image / Build and Push Docker Image (push) Successful in 3m4s
Docker Image / Build and Push Docker Image (push) Successful in 3m4s
This commit is contained in:
@@ -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`);
|
||||||
|
|
||||||
|
|||||||
@@ -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) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user