multica/e2e/navigation.spec.ts
Jiayuan Zhang 1ba0fb071a fix(web): fix stale state bugs, add real-time updates, and build verification pipeline
- Fix kanban board columns not adapting to available width (w-64 → flex-1)
- Fix workspace name not updating in sidebar after save in settings
- Fix comments leaking across issues when navigating between issue details
- Fix duplicate issue appearing on create (race between callback and WebSocket)
- Add real-time WebSocket listeners for agents and inbox pages
- Add `make check` one-click verification pipeline (typecheck + tests + E2E)
- Add E2E test fixtures for self-contained test data setup/teardown
- Add settings E2E test and updateWorkspace unit test
- Make `make start/setup` reuse existing PostgreSQL if already running
- Update CLAUDE.md with AI agent verification loop and E2E test patterns

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 12:44:49 +08:00

43 lines
1.5 KiB
TypeScript

import { test, expect } from "@playwright/test";
import { loginAsDefault, openWorkspaceMenu } from "./helpers";
test.describe("Navigation", () => {
test.beforeEach(async ({ page }) => {
await loginAsDefault(page);
});
test("sidebar navigation works", async ({ page }) => {
// Click Inbox
await page.locator("nav a", { hasText: "Inbox" }).click();
await page.waitForURL("**/inbox");
await expect(page).toHaveURL(/\/inbox/);
// Click Agents
await page.locator("nav a", { hasText: "Agents" }).click();
await page.waitForURL("**/agents");
await expect(page).toHaveURL(/\/agents/);
// Click Issues
await page.locator("nav a", { hasText: "Issues" }).click();
await page.waitForURL("**/issues");
await expect(page).toHaveURL(/\/issues/);
});
test("settings page loads via workspace menu", async ({ page }) => {
// Settings is inside the workspace dropdown menu
await openWorkspaceMenu(page);
await page.locator("text=Settings").click();
await page.waitForURL("**/settings");
await expect(page.getByRole("heading", { name: "Workspace" })).toBeVisible();
await expect(page.getByRole("heading", { name: "Members" })).toBeVisible();
});
test("agents page shows agent list", async ({ page }) => {
await page.locator("nav a", { hasText: "Agents" }).click();
await page.waitForURL("**/agents");
// Should show "Agents" heading
await expect(page.locator("text=Agents").first()).toBeVisible();
});
});