changes i dont like
This commit is contained in:
+16
-22
@@ -5,7 +5,6 @@ const pages = [
|
||||
["/", "Built to develop."],
|
||||
["/fabrics", "Different yarns."],
|
||||
["/products", "Knitted for"],
|
||||
["/about", "Built around"],
|
||||
["/contact", "Bring us your"],
|
||||
];
|
||||
|
||||
@@ -115,11 +114,13 @@ test("mobile navigation closes on selection and Escape", async ({ page }) => {
|
||||
await toggle.click();
|
||||
await page
|
||||
.getByRole("navigation", { name: "Main navigation" })
|
||||
.getByRole("link", { name: "Manufacturing", exact: true })
|
||||
.getByRole("link", { name: "Products", exact: true })
|
||||
.click();
|
||||
await expect(page).toHaveURL("/about");
|
||||
await expect(page).toHaveURL("/products");
|
||||
await expect(toggle).toHaveAttribute("aria-expanded", "false");
|
||||
await expect(page.locator(".owner")).toHaveCount(2);
|
||||
await expect(page.getByRole("heading", { level: 1 })).toContainText(
|
||||
"Knitted for",
|
||||
);
|
||||
await toggle.click();
|
||||
await page.getByRole("link", { name: "RRS home", exact: true }).click();
|
||||
await expect(page).toHaveURL("/");
|
||||
@@ -197,27 +198,20 @@ test("every page section unveils once when scrolled into view", async ({
|
||||
}
|
||||
});
|
||||
|
||||
test("homepage presents proof, fabrics and process in that order", async ({
|
||||
test("homepage shows the four stat facts and nothing else", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/");
|
||||
const fabricsHeading = page.getByRole("heading", {
|
||||
level: 2,
|
||||
name: "Grey is where it begins.",
|
||||
});
|
||||
const developmentsHeading = page.getByRole("heading", {
|
||||
level: 2,
|
||||
name: "What we make. What we can develop.",
|
||||
});
|
||||
await expect(fabricsHeading).toHaveCSS("text-align", "center");
|
||||
await expect(developmentsHeading.locator("..").locator("..")).toHaveClass(
|
||||
/section-heading--centered/,
|
||||
);
|
||||
const sections = await page
|
||||
.locator("#main-content > section")
|
||||
.evaluateAll((nodes) => nodes.map((node) => node.classList[0]));
|
||||
expect(sections.indexOf("stats")).toBeLessThan(sections.indexOf("gallery"));
|
||||
expect(sections.indexOf("gallery")).toBeLessThan(sections.indexOf("process"));
|
||||
await expect(page.locator(".stats__item")).toHaveCount(4);
|
||||
await expect(
|
||||
page.getByText("The starting point for a world of possibilities."),
|
||||
).toHaveCount(0);
|
||||
await expect(page.locator(".contact-banner")).toHaveCount(0);
|
||||
await expect(page.locator(".contact-strip")).toHaveCount(0);
|
||||
await expect(page.locator(".site-nav__contact")).toHaveCount(0);
|
||||
await expect(
|
||||
page.getByRole("link", { name: "Manufacturing", exact: true }),
|
||||
).toHaveCount(0);
|
||||
});
|
||||
|
||||
test("home and products heroes cycle through four product images", async ({
|
||||
|
||||
Reference in New Issue
Block a user