mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
Restores Developers to the top nav by swapping out the Features homepage anchor. Nav is now Enterprise, Pricing, Alternatives, Developers, Docs, Talk to a human. Updated two e2e assertions that checked for a Features nav link. Verified visually at 1120/1280px and 62/62 landing e2e.
53 lines
2.4 KiB
TypeScript
53 lines
2.4 KiB
TypeScript
import { expect, test } from "@playwright/test";
|
|
|
|
test.describe("FAQ Page Accordion", () => {
|
|
test.beforeEach(async ({ page }) => {
|
|
await page.goto("/faq");
|
|
});
|
|
|
|
test("renders all FAQ questions", async ({ page }) => {
|
|
await expect(page.getByText("Frequently Asked Questions")).toBeVisible();
|
|
await expect(page.getByText("Are my files safe and private?")).toBeVisible();
|
|
await expect(page.getByText("Is SnapOtter really free?")).toBeVisible();
|
|
await expect(page.getByText("Do I need an internet connection?")).toBeVisible();
|
|
});
|
|
|
|
test("answers are hidden by default", async ({ page }) => {
|
|
await expect(page.getByText(/All processing happens on your own server/)).not.toBeVisible();
|
|
});
|
|
|
|
test("clicking a question expands the answer", async ({ page }) => {
|
|
await page.getByText("Are my files safe and private?").click();
|
|
await expect(page.getByText(/All processing happens on your own server/)).toBeVisible();
|
|
});
|
|
|
|
test("clicking again collapses the answer", async ({ page }) => {
|
|
const question = page.getByText("Are my files safe and private?");
|
|
await question.click();
|
|
await expect(page.getByText(/All processing happens on your own server/)).toBeVisible();
|
|
await question.click();
|
|
await expect(page.getByText(/All processing happens on your own server/)).not.toBeVisible();
|
|
});
|
|
|
|
test("multiple FAQs can be open simultaneously", async ({ page }) => {
|
|
await page.getByText("Are my files safe and private?").click();
|
|
await page.getByText("Is SnapOtter really free?").click();
|
|
await expect(page.getByText(/All processing happens on your own server/)).toBeVisible();
|
|
await expect(page.getByText(/open source under AGPL-3.0/)).toBeVisible();
|
|
});
|
|
});
|
|
|
|
test.describe("Mobile Navigation", () => {
|
|
test("hamburger menu opens and shows links", async ({ page }) => {
|
|
await page.setViewportSize({ width: 375, height: 812 });
|
|
await page.goto("/");
|
|
const toggle = page.getByLabel("Toggle menu");
|
|
await toggle.click();
|
|
await expect(page.getByRole("link", { name: "Developers" }).last()).toBeVisible();
|
|
await expect(page.getByRole("link", { name: "Enterprise" }).last()).toBeVisible();
|
|
await expect(page.getByRole("link", { name: "Pricing" }).last()).toBeVisible();
|
|
await expect(page.getByRole("link", { name: "Docs" }).last()).toBeVisible();
|
|
await expect(page.getByRole("link", { name: "Talk to a human" }).last()).toBeVisible();
|
|
});
|
|
});
|