evOo-local/apps/web/e2e/journey-console-errors.spec.ts
cynarAI 97787a0272
Production readiness phase 1: journey audit, fixes 1–4, E2E (#175)
* Production readiness phase 1: journeys doc, onboarding persistence, teardown, chat UX

- Add docs/PRODUCTION-READINESS.md with journey matrix and defect backlog
- Persist onboarding draft in session storage across reload
- Localize onboarding discovery main-bot role; German Chief of Staff string
- Destroy team sandboxes and home folders when deleting an account
- Keep composer/transcript visible during queued runs; extend send watchdog
- Add Playwright specs: reload persistence, DE intake, queued progress, console guard

Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>

* Fix CI: sync Lingui catalogs, onboarding name draft, E2E stability

- Localize Chief of Staff in discovery shell; sync all locale PO files
- Propagate Oo name to onboarding draft while typing
- Adjust DE intake, queued-run, and console-error E2E specs

Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>

* Format chat-queued-progress E2E spec

Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>

* fix(api): scope account-delete sandbox teardown to owned spaces

Only destroy team sandboxes and homes for spaces the deleting user
owns with no remaining members or bots. Guard home removal under
dataDir/homes. Add unit and postgres journey coverage.

Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>

* chore: apply biome formatting

Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
2026-10-07 11:25:39 +02:00

56 lines
1.8 KiB
TypeScript

import { expect, test } from "@playwright/test";
import { completeOnboarding, openUserSettings, signup, waitForChatComposer } from "./helpers";
const ALLOWED_CONSOLE = [
/Failed to load resource.*404/i,
/favicon/i,
/ERR_ABORTED/i,
/Content Security Policy/i,
/net::ERR_/i,
];
function attachConsoleGuard(page: import("@playwright/test").Page) {
const errors: string[] = [];
page.on("console", (msg) => {
if (msg.type() !== "error") return;
const text = msg.text();
if (ALLOWED_CONSOLE.some((pattern) => pattern.test(text))) return;
errors.push(text);
});
page.on("pageerror", (err) => errors.push(err.message));
return errors;
}
test.describe("desktop journeys", () => {
test.use({ viewport: { width: 1440, height: 900 } });
test("sign-up through settings has no unexpected console errors", async ({ page }) => {
const errors = attachConsoleGuard(page);
const stamp = Date.now();
await signup(page, `console-j-${stamp}@rakazo.test`, "password12", "Console QA");
await completeOnboarding(page);
await waitForChatComposer(page);
await page.goto("/app/heute");
await expect(page).toHaveURL(/\/app\/heute/);
await openUserSettings(page);
expect(errors, errors.join("\n")).toEqual([]);
});
});
test.describe("mobile journeys", () => {
test.use({
viewport: { width: 390, height: 844 },
isMobile: true,
hasTouch: true,
});
test("onboarding and chat shell stay console-clean", async ({ page }) => {
const errors = attachConsoleGuard(page);
const stamp = Date.now();
await signup(page, `console-m-${stamp}@rakazo.test`, "password12", "Mobile Console");
await completeOnboarding(page);
await waitForChatComposer(page);
expect(errors, errors.join("\n")).toEqual([]);
});
});