Several web surfaces hard-coded German (the project card, roster and
activity status labels, the sidebar "Heute" label) or used German text as
the Lingui source message (sidebar sections, project timeline, bot picker,
voice entry, group stage, copy and read-aloud buttons). English users saw
German, and because production builds keep only message ids, none of these
strings could be translated per locale.
Convert them to English source messages, keeping the meaning:
- ProjectCreatedCard: Lingui Trans/Plural instead of literals.
- agent-activity: labels go through i18n._ with literal ids so the module
stays importable from plain unit tests; the extractor still collects them.
- Shell, ProjectSessionTimeline, bot-picker, StageVoiceEntry, OoStage:
English sources, reusing existing messages where one already fit
("just now", "{n}m ago", "Search", "No bots match", "Set up voice",
"Group conversation", "Transcript").
- The conversation picker matches its create entry against the translated
label instead of a fixed German string.
The German wording returns through the de catalog in the next commit.
Unit and E2E tests now assert the English labels.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MRtGG9ARfqqhma3t85Ro2u
61 lines
2.9 KiB
TypeScript
61 lines
2.9 KiB
TypeScript
import { expect, test } from "@playwright/test";
|
|
import { completeOnboarding, openNewBot, signup, unterhaltungenOnly } from "./helpers";
|
|
|
|
test("conversations and projects stay separate; + opens bot picker", async ({ page }) => {
|
|
const stamp = Date.now();
|
|
await signup(page, `unterhaltungen-${stamp}@rakazo.test`, "password12", "Unterhaltungen UX");
|
|
await completeOnboarding(page);
|
|
await page.goto("/app");
|
|
await page.waitForURL(/\/app\/[^/]+$/);
|
|
|
|
const unterhaltungen = page.locator(".sidebar-unterhaltungen");
|
|
const projekte = page.locator(".sidebar-projekte");
|
|
|
|
await expect(unterhaltungen.getByText("Talk to your Oos", { exact: true })).toBeVisible();
|
|
await expect(projekte.getByText("Projects", { exact: true })).toBeVisible();
|
|
await expect(unterhaltungen.getByRole("button", { name: /^Chief/ })).toBeVisible();
|
|
|
|
await unterhaltungen.getByTestId("conversation-picker-trigger").click();
|
|
const picker = page.getByTestId("conversation-bot-picker");
|
|
await expect(picker).toBeVisible();
|
|
await expect(picker.getByTestId("conversation-create-bot")).toBeVisible();
|
|
await expect(picker.getByText("Chief", { exact: true })).toBeVisible();
|
|
|
|
await picker.getByTestId("conversation-create-bot").click();
|
|
await expect(page.getByTestId("create-bot-form")).toBeVisible();
|
|
|
|
await page.keyboard.press("Escape");
|
|
await openNewBot(page);
|
|
const form = page.getByTestId("create-bot-form");
|
|
await form.locator("label:has-text('Name') input").fill("Researcher");
|
|
await form.getByRole("button", { name: "Create", exact: true }).click();
|
|
await page.waitForURL(/\/app\/[^/]+$/);
|
|
await expect(page.getByRole("combobox", { name: "Message" })).toBeVisible();
|
|
|
|
await projekte.getByTestId("create-project-trigger").click();
|
|
const dialog = page.getByRole("dialog", { name: "New project" });
|
|
await dialog.getByLabel("Name").fill("Side project");
|
|
await dialog.getByRole("button", { name: "Create project", exact: true }).click();
|
|
await page.waitForURL(/\/app/);
|
|
await expect(projekte.getByText("Side project", { exact: true })).toBeVisible();
|
|
await expect(unterhaltungenOnly(page).getByText("Side project", { exact: true })).toHaveCount(0);
|
|
});
|
|
|
|
test("chat header shows avatar once and composer uses generic placeholder", async ({ page }) => {
|
|
const stamp = Date.now();
|
|
await signup(page, `chat-header-${stamp}@rakazo.test`, "password12", "Chat Header");
|
|
await completeOnboarding(page);
|
|
await page.goto("/app");
|
|
await page.waitForURL(/\/app\/[^/]+$/);
|
|
|
|
const header = page.getByTestId("bot-settings-trigger");
|
|
await expect(
|
|
header.locator(".rakazo-bot-avatar, [data-testid='bot-avatar']").first(),
|
|
).toBeVisible();
|
|
await expect(header.getByText("Chief", { exact: true })).toBeVisible();
|
|
await expect(header.getByText("1:1 conversation", { exact: true })).toHaveCount(0);
|
|
|
|
const composer = page.getByRole("combobox", { name: "Message" });
|
|
await expect(composer).toHaveAttribute("placeholder", "Message…");
|
|
});
|