Add full shell, replaceable Omics adapter and bilingual interaction
Implement approved specification #32 and tickets #33-#37. Keep host authentication server-verified and pin session interaction language. Compile scoped base selectors for browser compatibility and retain full gutters during CSS pruning.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { render, screen, waitFor, within } from "@testing-library/react";
|
||||
import { act, render, screen, waitFor, within } from "@testing-library/react";
|
||||
import { setLocale } from "../i18n";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
||||
import { http, HttpResponse } from "msw";
|
||||
@@ -13,6 +14,20 @@ const readyStatus = {
|
||||
checkedAt: "2026-08-05T10:00:00.000Z",
|
||||
};
|
||||
|
||||
test("updates Pi controls and host instructions when the locale changes without remounting", async () => {
|
||||
renderManagement(true);
|
||||
await screen.findByRole("button", { name: "Test catalog default" });
|
||||
try {
|
||||
act(() => setLocale("it"));
|
||||
expect(screen.getByRole("button", { name: "Verifica il modello predefinito del catalogo" })).toBeVisible();
|
||||
await userEvent.click(screen.getByRole("button", { name: "Manutenzione host" }));
|
||||
expect(screen.getByRole("heading", { name: "Apri la directory del progetto" })).toBeVisible();
|
||||
act(() => setLocale("en"));
|
||||
expect(screen.getByRole("heading", { name: "Open the project root" })).toBeVisible();
|
||||
expect(screen.getByRole("button", { name: "Runtime and models" })).toBeVisible();
|
||||
} finally { act(() => setLocale("en")); }
|
||||
});
|
||||
|
||||
function renderManagement(page = false) {
|
||||
const client = new QueryClient({ defaultOptions: { queries: { retry: false } } });
|
||||
return render(
|
||||
|
||||
Reference in New Issue
Block a user