* 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>
157 lines
5.6 KiB
TypeScript
157 lines
5.6 KiB
TypeScript
import { expect, test } from "@playwright/test";
|
|
import type { Routine } from "@rakazo/contracts";
|
|
import {
|
|
activeBotId,
|
|
captureScreenshot,
|
|
completeOnboarding,
|
|
createTestRoutine,
|
|
openAgentOverview,
|
|
rpc,
|
|
signup,
|
|
} from "./helpers";
|
|
|
|
test("Slack message trigger uses the mounted messaging provider and persists", async ({
|
|
page,
|
|
}, testInfo) => {
|
|
await page.route("**/rpc/messaging/status", (route) =>
|
|
route.fulfill({
|
|
contentType: "application/json",
|
|
body: JSON.stringify({
|
|
json: { enabled: true, providers: ["slack"], openSignup: false, identities: [] },
|
|
}),
|
|
}),
|
|
);
|
|
const stamp = Date.now();
|
|
await signup(page, `routine-slack-${stamp}@rakazo.test`, "password12", "Slack Routine");
|
|
await completeOnboarding(page);
|
|
const botId = activeBotId(page);
|
|
|
|
await rpc<Routine>(page, "routines/create", {
|
|
botId,
|
|
name: "Triage Slack updates",
|
|
prompt: "Review the verified message event",
|
|
crons: [],
|
|
timezone: "UTC",
|
|
active: true,
|
|
notify: true,
|
|
webhookEnabled: false,
|
|
githubEnabled: false,
|
|
messageProvider: "slack",
|
|
});
|
|
await openAgentOverview(page);
|
|
const panel = page.getByTestId("side-panel");
|
|
await expect(panel.getByText("Slack message", { exact: true })).toBeVisible();
|
|
const [routine] = await rpc<Routine[]>(page, "routines/list", { botId });
|
|
expect(routine).toMatchObject({
|
|
name: "Triage Slack updates",
|
|
crons: [],
|
|
webhookEnabled: false,
|
|
githubEnabled: false,
|
|
messageProvider: "slack",
|
|
});
|
|
await captureScreenshot(page, testInfo, "routine-slack-message");
|
|
});
|
|
|
|
test("GitHub event trigger exposes signed delivery settings and persists", async ({
|
|
page,
|
|
}, testInfo) => {
|
|
const stamp = Date.now();
|
|
await signup(page, `routine-github-${stamp}@rakazo.test`, "password12", "GitHub Routine");
|
|
await completeOnboarding(page);
|
|
const botId = activeBotId(page);
|
|
|
|
await rpc<Routine>(page, "routines/create", {
|
|
botId,
|
|
name: "Review repository events",
|
|
prompt: "Inspect the signed GitHub event",
|
|
crons: [],
|
|
timezone: "UTC",
|
|
active: true,
|
|
notify: true,
|
|
webhookEnabled: false,
|
|
githubEnabled: true,
|
|
messageProvider: null,
|
|
});
|
|
await openAgentOverview(page);
|
|
await page.getByRole("button", { name: /Review repository events/ }).click();
|
|
await expect(
|
|
page.getByTestId("side-panel").getByText("Git event", { exact: true }),
|
|
).toBeVisible();
|
|
await expect(page.getByText(new RegExp(`/api/v1/bots/${botId}/github$`))).toBeVisible();
|
|
await expect(page.getByText("X-Hub-Signature-256: sha256=…", { exact: true })).toBeVisible();
|
|
const [routine] = await rpc<Routine[]>(page, "routines/list", { botId });
|
|
expect(routine).toMatchObject({
|
|
name: "Review repository events",
|
|
crons: [],
|
|
webhookEnabled: false,
|
|
githubEnabled: true,
|
|
});
|
|
await captureScreenshot(page, testInfo, "routine-github-event");
|
|
});
|
|
|
|
test("Korean webhook routine keeps technical field labels in English", async ({
|
|
page,
|
|
}, testInfo) => {
|
|
const stamp = Date.now();
|
|
const userName = `Korean Routine ${stamp}`;
|
|
await signup(page, `routine-ko-${stamp}@rakazo.test`, "password12", userName);
|
|
await completeOnboarding(page);
|
|
|
|
await page.getByRole("button", { name: new RegExp(userName) }).click();
|
|
await page.getByRole("button", { name: "Settings" }).click();
|
|
const settings = page.getByTestId("user-settings");
|
|
await settings.getByTestId("ui-locale-select").click();
|
|
await settings.getByRole("option", { name: "한국어", exact: true }).click();
|
|
await page.getByRole("button", { name: "계정 설정 닫기" }).click();
|
|
|
|
const botId = activeBotId(page);
|
|
await createTestRoutine(page, botId, {
|
|
name: "한국어 웹훅 확인",
|
|
prompt: "웹훅을 확인합니다.",
|
|
crons: [],
|
|
webhookEnabled: true,
|
|
});
|
|
await openAgentOverview(page, "Agent 컴퓨터");
|
|
await page.getByRole("button", { name: /한국어 웹훅 확인/ }).click();
|
|
|
|
await expect(page.getByText("웹훅이 실행될 때", { exact: true })).toBeVisible();
|
|
await expect(page.getByText("POST 대상")).toBeVisible();
|
|
await expect(page.getByText("key", { exact: true })).toBeVisible();
|
|
await expect(page.getByText("header")).toBeVisible();
|
|
await captureScreenshot(page, testInfo, "routine-webhook-ko");
|
|
});
|
|
|
|
test("routine test-run completes and survives reload", async ({ page }, testInfo) => {
|
|
const stamp = Date.now();
|
|
await signup(page, `routine-${stamp}@rakazo.test`, "password12", "Routine");
|
|
await completeOnboarding(page);
|
|
const botId = activeBotId(page);
|
|
|
|
await openAgentOverview(page);
|
|
await expect(page.getByRole("button", { name: "Test run" })).toHaveCount(0);
|
|
await createTestRoutine(page, botId, {
|
|
name: "Daily verification",
|
|
prompt: "write routine-run-now-ok into the durable task result",
|
|
crons: ["0 9 * * 1-5"],
|
|
});
|
|
await page.reload();
|
|
await openAgentOverview(page);
|
|
const routine = page.getByRole("button", { name: /Daily verification/ });
|
|
await expect(routine).toContainText("Weekdays at 9:00 AM");
|
|
await captureScreenshot(page, testInfo, "33-routine-scheduled");
|
|
|
|
await routine.click();
|
|
await page.getByRole("button", { name: "Test run" }).click();
|
|
await expect(page.getByText(/routine-run-now-ok/i).first()).toBeVisible({ timeout: 30_000 });
|
|
await expect(page.getByRole("combobox", { name: "Message" })).toBeVisible({ timeout: 30_000 });
|
|
await captureScreenshot(page, testInfo, "34-routine-run-completed");
|
|
|
|
await page.reload();
|
|
await expect(page.getByText(/routine-run-now-ok/i).first()).toBeVisible();
|
|
await openAgentOverview(page);
|
|
await expect(page.getByRole("button", { name: /Daily verification/ })).toContainText(
|
|
"Weekdays at 9:00 AM",
|
|
);
|
|
await captureScreenshot(page, testInfo, "35-routine-run-persisted");
|
|
});
|