* 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>
63 lines
3.5 KiB
TypeScript
63 lines
3.5 KiB
TypeScript
import { expect, test } from "@playwright/test";
|
|
import { activeBotId, captureScreenshot, completeOnboarding, rpc, signup } from "./helpers";
|
|
|
|
test("teach a task records interaction and saves a draft", async ({ page }, testInfo) => {
|
|
const stamp = Date.now();
|
|
await signup(page, `teach-${stamp}@rakazo.test`, "password12", "Teach");
|
|
await completeOnboarding(page);
|
|
|
|
await page.getByTitle("Agent computer").click();
|
|
const sidePanel = page.getByTestId("side-panel");
|
|
await expect(sidePanel).toHaveAttribute("data-panel", "computer");
|
|
await expect(sidePanel.getByText("Teach a task")).toHaveCount(0);
|
|
await expect(sidePanel.getByTestId("teach-start-button")).toHaveCount(0);
|
|
await expect(sidePanel.getByRole("button", { name: "Recover computer" })).toHaveCount(0);
|
|
await expect(sidePanel.getByRole("button", { name: "Reset computer" })).toHaveCount(0);
|
|
await expect(sidePanel.getByRole("button", { name: "Update computer" })).toHaveCount(0);
|
|
await expect(sidePanel.getByRole("button", { name: "Take control" })).toHaveCount(0);
|
|
await expect(sidePanel.getByTestId("computer-more-button")).toHaveCount(0);
|
|
await expect(sidePanel.getByTestId("oo-computer-browser-viewport")).toBeVisible();
|
|
// Showing the panel never boots the computer; its Open action is visible without hover.
|
|
const openButton = sidePanel.getByTestId("computer-open");
|
|
await expect(openButton).toBeVisible();
|
|
const botId = activeBotId(page);
|
|
expect((await rpc<{ state: string }>(page, "computer/status", { botId })).state).toBe("stopped");
|
|
await captureScreenshot(page, testInfo, "teach-sidepanel-simple");
|
|
|
|
const preview = sidePanel.getByTestId("oo-computer-browser-viewport");
|
|
await expect(openButton).toBeVisible();
|
|
await captureScreenshot(page, testInfo, "teach-sidepanel-open-hover");
|
|
|
|
await openButton.click();
|
|
await expect(page.getByRole("button", { name: "Close computer" })).toBeVisible();
|
|
const chrome = page.getByTestId("computer-chrome");
|
|
await expect(chrome.getByText("You have control", { exact: true })).toBeVisible();
|
|
await expect(chrome.getByRole("button", { name: "Release", exact: true })).toBeVisible();
|
|
await expect(chrome.getByTestId("teach-start-button")).toBeVisible();
|
|
const more = chrome.getByTestId("computer-more-button");
|
|
if (await more.isVisible().catch(() => false)) {
|
|
await more.click();
|
|
await expect(page.getByTestId("computer-more-menu")).toBeVisible();
|
|
// Close via the More control again (Escape must not close the computer overlay).
|
|
await more.click();
|
|
await expect(page.getByTestId("computer-more-menu")).toHaveCount(0);
|
|
}
|
|
await captureScreenshot(page, testInfo, "teach-computer-chrome");
|
|
|
|
const teachStart = chrome.getByTestId("teach-start-button");
|
|
await expect(teachStart).toBeEnabled();
|
|
await teachStart.click();
|
|
await page.getByTestId("teach-goal-input").fill("Export weekly CRM list");
|
|
await page.getByRole("button", { name: "Start recording" }).click();
|
|
await expect(page.getByTestId("teach-recording-overlay")).toBeVisible();
|
|
await expect(page.getByTestId("teach-capture-overlay")).toBeVisible();
|
|
await page.getByTestId("teach-capture-overlay").click({ position: { x: 200, y: 200 } });
|
|
await page.keyboard.type("demo");
|
|
await page.getByTestId("teach-stop-overlay").click();
|
|
await expect(page.getByTestId("skill-draft-card")).toBeVisible({ timeout: 20_000 });
|
|
await page.getByTestId("skill-draft-card").getByRole("button", { name: "Save" }).click();
|
|
await expect(
|
|
page.getByTestId("skill-draft-card").getByRole("button", { name: "Saved" }),
|
|
).toBeVisible({ timeout: 10_000 });
|
|
});
|