* Fix red main: typecheck, lint, i18n and stale unit tests Direct pushes to main left typecheck, lint and 16 unit tests red. - Typecheck: AskCard test uses the current ask block shape, the sandbox fault test calls the two-argument desktop writeFile, removing a queued message notifies with the thread's latest event seq, and the replay fixture only reads ref from steps that carry one. - Lint: format and import order. - i18n: transcript status labels were German source strings; they are English now with German translations, catalogs re-extracted, and the mobile "Failed to remove message" string is translated. - Tests follow intended behavior changes: the time instruction now closes the system prompt, short chat turns start at low reasoning, owner-owned read-only files (git objects) pass the home check, and the desktop computer may read and write host files outside its home. The old desktop write-containment suite is replaced by a host file test. - The composer task pill test mocks the Lingui macros like other tests. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TnT7eVHuaCzZKY5CnYzpr1 * Bump Expo patch releases so expo install --check passes Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TnT7eVHuaCzZKY5CnYzpr1 * Bring web E2E back in line with the new side panel The side panel lost its computer tab, which left the full computer window (take control, teach, release) unreachable from the web app. The browser view now offers an "Open in full window" button, and opening the panel no longer boots a stopped computer. Also: the slash picker scrolls instead of growing under the header, user skills come first in it, the agent overview hides an empty routines block, the hover time hides again with collapsed details, and the light destructive token meets contrast on the sidebar. E2E specs follow the new panel layout, and the cursor and hover tests no longer race the UI. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TnT7eVHuaCzZKY5CnYzpr1 --------- Co-authored-by: Claude <noreply@anthropic.com>
105 lines
5.0 KiB
TypeScript
105 lines
5.0 KiB
TypeScript
import { expect, test } from "@playwright/test";
|
|
import { captureScreenshot, completeOnboarding, rpc, signup } from "./helpers";
|
|
|
|
test("onboarding names the first Oo and shows it in chat", async ({ page }) => {
|
|
const stamp = Date.now();
|
|
await signup(page, `name-oo-${stamp}@rakazo.test`, "password12", "Namer");
|
|
await page.waitForURL(/\/onboarding/, { timeout: 20_000 });
|
|
await page.getByRole("button", { name: /^(Continue|Weiter)$/i }).click();
|
|
await expect(page.getByTestId("onboarding-name-step")).toBeVisible();
|
|
await page.getByTestId("onboarding-oo-name-input").fill("Luna");
|
|
await page
|
|
.getByTestId("onboarding-name-step")
|
|
.getByRole("button", { name: /^(Continue|Weiter)$/i })
|
|
.click();
|
|
await page.getByRole("button", { name: /^(Skip|Überspringen ·)/i }).click();
|
|
await page.getByRole("button", { name: /^(Skip|Überspringen)$/i }).click();
|
|
await expect(page).toHaveURL(/\/app\/g\/[^/]+/, { timeout: 30_000 });
|
|
await expect(
|
|
page.getByTestId("bot-settings-trigger").getByText("Luna", { exact: true }),
|
|
).toBeVisible();
|
|
expect((await rpc<{ name: string }>(page, "bots/ensureMain", {})).name).toBe("Luna");
|
|
});
|
|
|
|
test("German UI keeps Deutsch on language skip label", async ({ page }) => {
|
|
await page.addInitScript(() => {
|
|
Object.defineProperty(navigator, "language", { value: "de-DE", configurable: true });
|
|
localStorage.setItem("rakazo.uiLocale", "de");
|
|
});
|
|
const stamp = Date.now();
|
|
await signup(page, `de-skip-${stamp}@rakazo.test`, "password12", "Deutsch");
|
|
await page.getByRole("button", { name: /^(Continue|Weiter)$/i }).click();
|
|
await page.getByRole("button", { name: /^(Skip|Überspringen)$/i }).click();
|
|
await expect(
|
|
page.getByRole("heading", { name: /Wähle deine Sprache|Choose your language/i }),
|
|
).toBeVisible();
|
|
await expect(page.getByRole("button", { name: /Überspringen · Deutsch/i })).toBeVisible();
|
|
});
|
|
|
|
test("German voice step lists German voices after choosing Deutsch", async ({ page }) => {
|
|
await page.addInitScript(() => {
|
|
Object.defineProperty(navigator, "language", { value: "de-DE", configurable: true });
|
|
localStorage.setItem("rakazo.uiLocale", "de");
|
|
});
|
|
const stamp = Date.now();
|
|
await signup(page, `de-voice-${stamp}@rakazo.test`, "password12", "Stimme");
|
|
await page.getByRole("button", { name: /^(Continue|Weiter)$/i }).click();
|
|
await page.getByRole("button", { name: /^(Skip|Überspringen)$/i }).click();
|
|
await page.getByRole("button", { name: "Deutsch", exact: true }).click();
|
|
await expect(page.getByText(/Loading voices|Stimmen werden geladen/i)).toHaveCount(0, {
|
|
timeout: 30_000,
|
|
});
|
|
await expect(page.getByTestId("onboarding-voice-df_eva")).toBeVisible({ timeout: 30_000 });
|
|
await expect(page.getByTestId("onboarding-voice-dm_thorsten")).toBeVisible();
|
|
await expect(page.getByTestId("onboarding-voice-af_alloy")).toHaveCount(0);
|
|
await expect(page.getByTestId("onboarding-voice-dm_thorsten")).toHaveAttribute(
|
|
"aria-pressed",
|
|
"true",
|
|
);
|
|
});
|
|
|
|
test("main conversation does not show a group subtitle for one Oo", async ({ page }) => {
|
|
await page.addInitScript(() => {
|
|
Object.defineProperty(navigator, "language", { value: "de-DE", configurable: true });
|
|
localStorage.setItem("rakazo.uiLocale", "de");
|
|
});
|
|
const stamp = Date.now();
|
|
await signup(page, `main-1-1-${stamp}@rakazo.test`, "password12", "Solo");
|
|
await completeOnboarding(page, undefined, { mainConversation: true });
|
|
await expect(page.getByTestId("bot-settings-trigger")).not.toContainText("Gruppenunterhaltung");
|
|
await expect(page.getByTestId("oo-group-stage")).toHaveCount(0);
|
|
});
|
|
|
|
test.describe("mobile shell", () => {
|
|
test.use({
|
|
hasTouch: true,
|
|
isMobile: true,
|
|
viewport: { width: 390, height: 844 },
|
|
});
|
|
|
|
test("Escape closes the mobile navigation drawer", async ({ page }) => {
|
|
const stamp = Date.now();
|
|
await signup(page, `mobile-esc-${stamp}@rakazo.test`, "password12", "Escape");
|
|
await completeOnboarding(page);
|
|
await page.getByRole("button", { name: "Open navigation" }).click();
|
|
await expect(page.getByRole("button", { name: "Close navigation" })).toBeVisible();
|
|
await page.keyboard.press("Escape");
|
|
await expect(page.getByRole("button", { name: "Close navigation" })).toHaveCount(0);
|
|
await expect(page.getByTestId("open-navigation")).toBeFocused();
|
|
});
|
|
});
|
|
|
|
test("main conversation opens its lead's computer", async ({ page }, testInfo) => {
|
|
const stamp = Date.now();
|
|
await signup(page, `main-computer-${stamp}@rakazo.test`, "password12", "Screen");
|
|
await completeOnboarding(page, undefined, { mainConversation: true });
|
|
await expect(page).toHaveURL(/\/app\/g\//);
|
|
// The lead's computer opens beside the main conversation without leaving it.
|
|
await page.getByTitle("Agent computer").click();
|
|
await expect(page).toHaveURL(/\/app\/g\//);
|
|
const sidePanel = page.getByTestId("side-panel");
|
|
await expect(sidePanel).toHaveAttribute("data-panel", "computer");
|
|
await expect(sidePanel.getByTestId("oo-computer-browser-viewport")).toBeVisible();
|
|
await captureScreenshot(page, testInfo, "main-conversation-computer");
|
|
});
|