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 { act, fireEvent, 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";
|
||||
@@ -115,6 +116,22 @@ function renderPage({
|
||||
return { ...view, client };
|
||||
}
|
||||
|
||||
test("updates database row actions and the open editor when switching EN and IT", async () => {
|
||||
renderPage({ presentation: "fleet" });
|
||||
await userEvent.click(await screen.findByRole("button", { name: "Edit Policlinico San Donato" }));
|
||||
const name = await screen.findByLabelText("Database name");
|
||||
const savedName = (name as HTMLInputElement).value;
|
||||
try {
|
||||
act(() => setLocale("it"));
|
||||
expect(screen.getByLabelText("Nome database")).toHaveValue(savedName);
|
||||
expect(screen.getByRole("button", { name: "Salva modifiche" })).toBeVisible();
|
||||
expect(screen.getByRole("button", { name: "Verifica connessione" })).toBeVisible();
|
||||
act(() => setLocale("en"));
|
||||
expect(screen.getByLabelText("Database name")).toHaveValue(savedName);
|
||||
expect(screen.getByRole("button", { name: "Save changes" })).toBeVisible();
|
||||
} finally { act(() => setLocale("en")); }
|
||||
});
|
||||
|
||||
test("fleet entry opens the database list without workspace preparation or an automatic editor", async () => {
|
||||
renderPage({ presentation: "fleet" });
|
||||
expect(await screen.findByRole("button", { name: "View tables for Policlinico San Donato" })).toBeVisible();
|
||||
|
||||
Reference in New Issue
Block a user