fix: address administration layout and navigation issues #28 #29 #30 #31

This commit is contained in:
Codex
2026-09-12 18:16:52 +02:00
parent f52bf22e05
commit c7e5f295e6
25 changed files with 286 additions and 90 deletions
@@ -90,12 +90,14 @@ function renderPage({
canManageSecrets = true,
onNavigationStateChange,
presentation = "legacy",
initialWorkspaceId,
}: {
rows?: CatalogDatabase[] | (() => CatalogDatabase[]);
canManage?: boolean;
canManageSecrets?: boolean;
onNavigationStateChange?: (state: { dirty: boolean; busy: boolean }) => void;
presentation?: "legacy" | "fleet";
initialWorkspaceId?: string;
} = {}) {
server.use(http.get("/api/catalog/databases", () => HttpResponse.json(
typeof rows === "function" ? rows() : rows,
@@ -104,6 +106,7 @@ function renderPage({
const view = render(
<QueryClientProvider client={client}>
<DatabaseManagementPage
initialWorkspaceId={initialWorkspaceId}
canManage={canManage}
canManageSecrets={canManageSecrets}
onNavigationStateChange={onNavigationStateChange}
@@ -115,6 +118,15 @@ function renderPage({
return { ...view, client };
}
test("fleet entry opens the database list without workspace preparation or an automatic editor", async () => {
renderPage({ presentation: "fleet", initialWorkspaceId: "psd-clinical" });
expect(await screen.findByRole("button", { name: "View tables for Policlinico San Donato" })).toBeVisible();
expect(screen.getByText("Research laboratory")).toBeVisible();
expect(screen.queryByRole("button", { name: "Back to list" })).not.toBeInTheDocument();
expect(screen.queryByText(/Workspace preparation/)).not.toBeInTheDocument();
expect(screen.queryByRole("link", { name: "Open workspace preprocessing" })).not.toBeInTheDocument();
});
function makeSyncRun(
scope: CatalogSyncRun["scope"],
tableIds: string[] = [],