mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix: resolve e2e test failures for landing and docs suites
- Change landing e2e port from 1350 to 4350 (avoids Docker conflict) - Fix strict mode violations in docs tests (use heading roles, exact matches) - Fix VitePress footer visibility (use DOM queries for hidden footer) - Fix theme toggle (use evaluate click for CSS-hidden switch) - Fix landing subpage tests (use heading roles for Privacy/Terms)
This commit is contained in:
@@ -18,11 +18,11 @@ test.describe("Docs Homepage", () => {
|
||||
});
|
||||
|
||||
test("hero renders action buttons", async ({ page }) => {
|
||||
const getStarted = page.getByRole("link", { name: "Get started" });
|
||||
const getStarted = page.getByRole("link", { name: "Get started", exact: true });
|
||||
await expect(getStarted).toBeVisible();
|
||||
await expect(getStarted).toHaveAttribute("href", /getting-started/);
|
||||
|
||||
const apiRef = page.getByRole("link", { name: "API reference" });
|
||||
const apiRef = page.getByRole("link", { name: "API reference", exact: true });
|
||||
await expect(apiRef).toBeVisible();
|
||||
await expect(apiRef).toHaveAttribute("href", /\/api\/rest/);
|
||||
});
|
||||
@@ -37,7 +37,7 @@ test.describe("Docs Homepage", () => {
|
||||
"Teams & Access Control",
|
||||
];
|
||||
for (const feature of features) {
|
||||
await expect(page.getByText(feature)).toBeVisible();
|
||||
await expect(page.getByRole("heading", { name: feature }).first()).toBeVisible();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -57,7 +57,7 @@ test.describe("Docs Navbar", () => {
|
||||
await page.goto("/");
|
||||
await page.getByRole("link", { name: "Guide" }).first().click();
|
||||
await expect(page).toHaveURL(/getting-started/);
|
||||
await expect(page.getByText("Getting Started")).toBeVisible();
|
||||
await expect(page.getByRole("heading", { name: "Getting Started" })).toBeVisible();
|
||||
});
|
||||
|
||||
test("API Reference nav link navigates to REST API", async ({ page }) => {
|
||||
|
||||
Reference in New Issue
Block a user