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:
@@ -36,16 +36,22 @@ test.describe("Privacy Page", () => {
|
||||
});
|
||||
|
||||
test("renders the page heading", async ({ page }) => {
|
||||
await expect(page.getByText("Privacy Policy")).toBeVisible();
|
||||
await expect(page.getByRole("heading", { name: "Privacy Policy" })).toBeVisible();
|
||||
});
|
||||
|
||||
test("renders all section headings", async ({ page }) => {
|
||||
const headings = [
|
||||
"Overview", "Website (snapotter.com)", "Self-Hosted Software",
|
||||
"Optional Analytics", "Contact Form", "Open Source", "Changes", "Contact",
|
||||
"Overview",
|
||||
"Website (snapotter.com)",
|
||||
"Self-Hosted Software",
|
||||
"Optional Analytics",
|
||||
"Contact Form",
|
||||
"Open Source",
|
||||
"Changes",
|
||||
"Contact",
|
||||
];
|
||||
for (const heading of headings) {
|
||||
await expect(page.getByText(heading, { exact: true })).toBeVisible();
|
||||
await expect(page.getByRole("heading", { name: heading, exact: true })).toBeVisible();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -61,16 +67,22 @@ test.describe("Terms Page", () => {
|
||||
});
|
||||
|
||||
test("renders the page heading", async ({ page }) => {
|
||||
await expect(page.getByText("Terms and Conditions")).toBeVisible();
|
||||
await expect(page.getByRole("heading", { name: "Terms and Conditions" })).toBeVisible();
|
||||
});
|
||||
|
||||
test("renders all section headings", async ({ page }) => {
|
||||
const headings = [
|
||||
"Overview", "Software License", "Website Use", "Self-Hosted Software",
|
||||
"Intellectual Property", "Limitation of Liability", "Changes", "Contact",
|
||||
"Overview",
|
||||
"Software License",
|
||||
"Website Use",
|
||||
"Self-Hosted Software",
|
||||
"Intellectual Property",
|
||||
"Limitation of Liability",
|
||||
"Changes",
|
||||
"Contact",
|
||||
];
|
||||
for (const heading of headings) {
|
||||
await expect(page.getByText(heading, { exact: true })).toBeVisible();
|
||||
await expect(page.getByRole("heading", { name: heading, exact: true })).toBeVisible();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user