Add browser-level end-to-end tests covering public pages, Keycloak OAuth authentication flow, dashboard interactions, providers config, developer section, organization pages, and sidebar navigation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
42 lines
1.7 KiB
TypeScript
42 lines
1.7 KiB
TypeScript
import { test, expect } from "@playwright/test";
|
|
|
|
test.describe("Organization section", () => {
|
|
test("pricing page loads with three pricing cards", async ({ page }) => {
|
|
await page.goto("/organization/pricing");
|
|
await page.waitForSelector(".org-shell", { timeout: 15_000 });
|
|
|
|
const cards = page.locator(".pricing-card");
|
|
await expect(cards).toHaveCount(3);
|
|
});
|
|
|
|
test("pricing cards show Starter, Team, Enterprise tiers", async ({
|
|
page,
|
|
}) => {
|
|
await page.goto("/organization/pricing");
|
|
await page.waitForSelector(".org-shell", { timeout: 15_000 });
|
|
|
|
await expect(page.locator(".pricing-card", { hasText: "Starter" })).toBeVisible();
|
|
await expect(page.locator(".pricing-card", { hasText: "Team" })).toBeVisible();
|
|
await expect(page.locator(".pricing-card", { hasText: "Enterprise" })).toBeVisible();
|
|
});
|
|
|
|
test("organization dashboard loads with billing stats", async ({ page }) => {
|
|
await page.goto("/organization/dashboard");
|
|
await page.waitForSelector(".org-dashboard-page", { timeout: 15_000 });
|
|
|
|
await expect(page.locator(".page-header")).toContainText("Organization");
|
|
await expect(page.locator(".org-stats-bar")).toBeVisible();
|
|
await expect(page.locator(".org-stat").first()).toBeVisible();
|
|
});
|
|
|
|
test("member table is visible on org dashboard", async ({ page }) => {
|
|
await page.goto("/organization/dashboard");
|
|
await page.waitForSelector(".org-dashboard-page", { timeout: 15_000 });
|
|
|
|
await expect(page.locator(".org-table")).toBeVisible();
|
|
await expect(page.locator(".org-table thead")).toContainText("Name");
|
|
await expect(page.locator(".org-table thead")).toContainText("Email");
|
|
await expect(page.locator(".org-table thead")).toContainText("Role");
|
|
});
|
|
});
|