Files
ProjectE/e2e/settings.spec.ts
T
bot-hermes a60b75f075 feat: full plan execution - CI/CD, critical fixes, UX polish, secondary/advanced features, E2E + docs
Phase 0 (CI/CD): fix root typecheck to cover api+worker+web; reconcile migration
story into idempotent db:migrate (db:sync + db:triggers); add Gitea Actions
quality/deploy/smoke workflow; rewrite README/AGENTS/DEPLOY docs; add
requireWorkspaceAccess + recordActivityForEntity conventions.

Phase 1 (critical fixes): calendar delete + drag/resize DnD; canvas card CRUD +
bulk save + debounced autosave; logout route; graph edge workspaceId derivation;
real analytics endpoints (drop Math.random); task board droppable columns +
reorder persistence; Tiptap notes editor with sanitized HTML rendering; remove
insecure passkey auth; domain/owner scoping (IDOR) on all by-ID routes + search/
export/realtime scoping; command palette routing + agent mention fetch; agent
activity SSE handler; graph fly-to with tracked positions.

Phase 2 (UX polish): login on design system; Sonner toasts app-wide; shared
Loading/Empty/Error state components; working density/sidebarPos/reduce-motion
settings; Inter typography; consolidated status-colors lib; unified detail
routes; dashboard sort/realtime/responsive fixes; mobile responsive; a11y
(radiogroups, sanitized snippets, badge labels).

Phase 3 (features): daily notes timezone fix + delete + autosave + mood/energy
create; active-domain store + topbar picker; graph domain picker + navigable
entity links; tag assign/remove UI + server-side tag filter; real CSV export +
import validation; custom fields on tasks.

Phase 4 (advanced): migrate job worker into apps/worker (webhook delivery with
HMAC, recurring spawn, ai_dispatch disabled); webhook queue helper + entity
event enqueuing + test endpoint fix; recurring scheduledJobs pipeline; agents
CRUD + permission editing + activity filters; real notifications feed; MCP
polish (validation, error codes, domain scoping, dead sql leftover).

Phase 5 (E2E + docs): rewrite Playwright suite for the Vite SPA (15 specs, new
auth helpers, chromium-only in CI); add ephemeral-Postgres e2e CI job; rewrite
docs/API.md for the real Hono API.
2026-08-10 08:53:18 +00:00

82 lines
3.0 KiB
TypeScript

import { test, expect } from '@playwright/test';
import { login } from './helpers/auth';
import { testDomains } from './helpers/fixtures';
test.describe('Settings', () => {
test.beforeEach(async ({ page }) => {
await login(page);
await page.goto('/settings');
});
test('renders every settings tab', async ({ page }) => {
const tabs = [
'Appearance',
'Domains',
'Tags',
'Custom Fields',
'Keyboard Shortcuts',
'Agents & Permissions',
'Webhooks',
'Import & Export',
'Error Log',
];
for (const tab of tabs) {
await expect(page.getByRole('button', { name: tab })).toBeVisible();
}
});
test('opens on the Appearance tab with theme controls', async ({ page }) => {
await expect(page.getByRole('heading', { name: 'Theme' })).toBeVisible();
await expect(page.getByRole('heading', { name: 'Accent Color' })).toBeVisible();
await expect(page.getByRole('heading', { name: 'Font Size' })).toBeVisible();
});
test('creates a domain from the Domains tab', async ({ page }) => {
await page.getByRole('button', { name: 'Domains' }).click();
await page.getByRole('button', { name: /new domain/i }).click();
const dialog = page.getByRole('dialog');
await expect(dialog).toBeVisible();
await expect(dialog.getByRole('heading', { name: 'New Domain' })).toBeVisible();
await dialog.getByLabel('Name').fill(testDomains.name);
const createResponse = page.waitForResponse(
(resp) => resp.url().includes('/api/domains') && resp.request().method() === 'POST',
);
await dialog.getByRole('button', { name: /^create$/i }).click();
expect((await createResponse).ok()).toBeTruthy();
await expect(page.getByText(testDomains.name, { exact: true })).toBeVisible({
timeout: 10_000,
});
});
test('Webhooks tab opens the New Webhook dialog', async ({ page }) => {
await page.getByRole('button', { name: 'Webhooks' }).click();
await expect(page.getByRole('button', { name: /new webhook/i })).toBeVisible();
await page.getByRole('button', { name: /new webhook/i }).click();
const dialog = page.getByRole('dialog');
await expect(dialog).toBeVisible();
await expect(dialog.getByLabel('Name')).toBeVisible();
await expect(dialog.getByLabel('URL')).toBeVisible();
await expect(dialog.getByLabel(/events/i)).toBeVisible();
});
test('Import & Export tab renders import and export sections', async ({ page }) => {
await page.getByRole('button', { name: 'Import & Export' }).click();
await expect(page.getByRole('heading', { name: 'Import' })).toBeVisible();
await expect(page.getByRole('heading', { name: 'Export' })).toBeVisible();
await expect(page.getByRole('button', { name: /download export/i })).toBeVisible();
await expect(page.getByRole('button', { name: /^import$/i })).toBeVisible();
});
test('Error Log tab renders its controls', async ({ page }) => {
await page.getByRole('button', { name: 'Error Log' }).click();
await expect(page.getByRole('button', { name: /clear all/i })).toBeVisible();
});
});