Localize onboarding focus facts by profile locale (DE assertion). Add mobile overflow/touch audits, deep-link matrix, extended console checks, and E2E for empty project, session unavailable, and teaching composer. Safe-area and Heute header layout on 390px viewports. Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
81 lines
2.3 KiB
TypeScript
81 lines
2.3 KiB
TypeScript
import { expect, test } from "@playwright/test";
|
|
import {
|
|
attachConsoleGuard,
|
|
completeOnboarding,
|
|
openUserSettings,
|
|
rpc,
|
|
signup,
|
|
waitForChatComposer,
|
|
} from "./helpers";
|
|
|
|
const SIGNED_IN_ROUTES = (groupId: string, botId: string) =>
|
|
["/app/heute", `/app/g/${groupId}`, `/app/${botId}`, "/onboarding"] as const;
|
|
|
|
const SETTINGS_SECTIONS = [
|
|
"general",
|
|
"integrations",
|
|
"models",
|
|
"memory",
|
|
"voice",
|
|
"notifications",
|
|
"usage",
|
|
"computer",
|
|
"updates",
|
|
"privacy",
|
|
] as const;
|
|
|
|
async function exerciseSignedInRoutes(page: import("@playwright/test").Page, errors: string[]) {
|
|
const stamp = Date.now();
|
|
await signup(page, `console-j-${stamp}@rakazo.test`, "password12", "Console QA");
|
|
await completeOnboarding(page);
|
|
await waitForChatComposer(page);
|
|
|
|
const groupId = page.url().match(/\/app\/g\/([^/]+)/)?.[1];
|
|
const bots = await rpc<Array<{ id: string }>>(page, "bots/list", {});
|
|
const botId = bots[0]?.id;
|
|
expect(groupId).toBeTruthy();
|
|
expect(botId).toBeTruthy();
|
|
|
|
for (const route of SIGNED_IN_ROUTES(groupId!, botId!)) {
|
|
await page.goto(route, { waitUntil: "domcontentloaded" });
|
|
if (route !== "/onboarding") {
|
|
await expect(page.getByTestId("shell-root")).toHaveAttribute("data-ready", "true", {
|
|
timeout: 60_000,
|
|
});
|
|
}
|
|
expect(errors, `after ${route}:\n${errors.join("\n")}`).toEqual([]);
|
|
}
|
|
|
|
const settings = await openUserSettings(page);
|
|
for (const section of SETTINGS_SECTIONS) {
|
|
const nav = settings.getByTestId(`settings-nav-${section}`);
|
|
if (section !== "general") {
|
|
if (!(await nav.isVisible().catch(() => false))) continue;
|
|
await nav.click();
|
|
}
|
|
expect(errors, `after settings ${section}:\n${errors.join("\n")}`).toEqual([]);
|
|
}
|
|
}
|
|
|
|
test.describe("desktop journeys", () => {
|
|
test.use({ viewport: { width: 1440, height: 900 } });
|
|
|
|
test("signed-in route matrix has no unexpected console errors", async ({ page }) => {
|
|
const errors = attachConsoleGuard(page);
|
|
await exerciseSignedInRoutes(page, errors);
|
|
});
|
|
});
|
|
|
|
test.describe("mobile journeys", () => {
|
|
test.use({
|
|
viewport: { width: 390, height: 844 },
|
|
isMobile: true,
|
|
hasTouch: true,
|
|
});
|
|
|
|
test("signed-in route matrix has no unexpected console errors", async ({ page }) => {
|
|
const errors = attachConsoleGuard(page);
|
|
await exerciseSignedInRoutes(page, errors);
|
|
});
|
|
});
|