diff --git a/frontend/src/components/PersonalViewsModal.dom.test.tsx b/frontend/src/components/PersonalViewsModal.dom.test.tsx index dc3ea327..486f2bf6 100644 --- a/frontend/src/components/PersonalViewsModal.dom.test.tsx +++ b/frontend/src/components/PersonalViewsModal.dom.test.tsx @@ -19,7 +19,13 @@ const h = vi.hoisted(() => ({ vi.mock("react-i18next", async (importOriginal) => { const actual = await importOriginal(); - return { ...actual, useTranslation: () => ({ t: (key: string) => key }) }; + return { + ...actual, + useTranslation: () => ({ + t: (key: string, o?: { name?: string }) => + key === "common.order.dragNamed" ? `${key}:${o?.name}` : key, + }), + }; }); // A full feed filter set that differs from the sidebar default ONLY in `tags`, so useActiveFilters @@ -225,7 +231,7 @@ describe("PersonalViewsModal — reordering without a drag (WCAG 2.5.7)", () => it("picks a view up from the keyboard, as its grip's instructions say", async () => { CTX.views = [view(5, "Docs", 0), view(6, "Music", 1)]; mount(); - const grip = (await screen.findAllByRole("button", { name: "views.reorder" }))[0]!; + const grip = await screen.findByRole("button", { name: "common.order.dragNamed:Docs" }); grip.focus(); fireEvent.keyDown(grip, { code: "Space", key: " " }); await waitFor(() => expect(document.body.textContent).toContain("common.dnd.pickedUp")); diff --git a/frontend/src/components/PersonalViewsModal.tsx b/frontend/src/components/PersonalViewsModal.tsx index 691a5622..e4b415a6 100644 --- a/frontend/src/components/PersonalViewsModal.tsx +++ b/frontend/src/components/PersonalViewsModal.tsx @@ -62,7 +62,11 @@ function ViewRow({ selected ? "bg-accent/15" : "state-layer" }`} > - +