feat(plans): publish honest Free and Pro
CI and Deploy / test (pull_request) Successful in 5m6s
CI and Deploy / deploy (pull_request) Has been skipped

This commit is contained in:
cesnimda
2026-08-15 18:04:18 +02:00
parent a7c25499bb
commit a25c31b93a
26 changed files with 403 additions and 93 deletions
+30
View File
@@ -53,6 +53,36 @@ test.beforeEach(async ({ page }) => {
await page.addInitScript(() => window.localStorage.setItem("uiLanguage", "en"));
});
test("public plans stay honest, responsive and keyboard accessible", async ({ page }) => {
for (const scheme of ["light", "dark"] as const) {
await page.addInitScript((value) => window.localStorage.setItem("jobtracker.themeMode", value), scheme);
await page.goto("/");
await expect(page.getByRole("heading", { name: "Two clear plans" })).toBeVisible();
await expect(page.locator('section[aria-labelledby^="plan-"]')).toHaveCount(2);
await expect(page.getByRole("heading", { name: "Free", exact: true })).toBeVisible();
await expect(page.getByRole("heading", { name: "Pro", exact: true })).toBeVisible();
await expect(page.getByText(/Bring your own key|Unlimited AI|Billed monthly|Most popular/i)).toHaveCount(0);
await expect(page.locator("html")).toHaveAttribute("data-color-scheme", scheme);
for (const width of [375, 768, 1440]) {
await page.setViewportSize({ width, height: 900 });
const overflow = await page.evaluate(() => document.documentElement.scrollWidth - document.documentElement.clientWidth);
expect(overflow).toBeLessThanOrEqual(1);
}
}
const freeAction = page.getByRole("button", { name: "Create a Free account" });
await freeAction.focus();
await page.keyboard.press("Enter");
await expect(page).toHaveURL(/\/register$/);
await page.goBack();
const proAction = page.getByRole("button", { name: "Sign in to view Pro" });
await proAction.focus();
await page.keyboard.press("Enter");
await expect(page).toHaveURL(/\/login$/);
});
test("login establishes an authenticated session", async ({ page }) => {
await login(page);
await expect(page.getByText("e2e@example.test").first()).toBeVisible();