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",
|
||||
});
|
||||
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`);
|
||||
|
||||
|
||||
@@ -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) =>
|
||||
|
||||
Reference in New Issue
Block a user