feat: refine metadata catalog workflows

This commit is contained in:
Codex
2026-09-02 15:58:23 +02:00
parent 4531746038
commit ae053961a3
31 changed files with 848 additions and 219 deletions
@@ -321,7 +321,7 @@ test("shows the configured access type and endpoint in catalog status", async ()
renderPage({ rows: [direct, rest, ssh], presentation: "fleet" });
const directRow = await screen.findByRole("row", { name: /Policlinico San Donato/ });
expect(within(directRow).getByText("Direct PostgreSQL")).toBeVisible();
expect(within(directRow).getByText("Direct PostgreSQL connection")).toBeVisible();
expect(within(directRow).getByText("db.internal:5432")).toBeVisible();
const restRow = screen.getByRole("row", { name: /REST laboratory/ });
@@ -502,10 +502,10 @@ test("keeps both run-history buttons visible beside the metadata-description sel
const metadataControls = screen.getByRole("group", { name: "Metadata description controls" });
const actions = screen.getByRole("group", { name: "Database management actions" });
const descriptionHistoryButton = within(metadataControls).getByRole("button", {
name: "Run descriptions generation history",
name: "View description generation history",
});
const suggestionHistoryButton = within(metadataControls).getByRole("button", {
name: "Run sensitive suggestions history",
name: "View sensitive suggestion history",
});
expect(toolbar).toHaveClass("sm:items-end", "sm:justify-between");
@@ -513,11 +513,11 @@ test("keeps both run-history buttons visible beside the metadata-description sel
expect(metadataControls).toContainElement(selector);
expect(descriptionHistoryButton).toBeVisible();
expect(descriptionHistoryButton).toBeEnabled();
expect(descriptionHistoryButton).toHaveTextContent("Run descriptions generation history");
expect(descriptionHistoryButton).toHaveTextContent("View description generation history");
expect(descriptionHistoryButton).toHaveClass("disabled:opacity-70");
expect(suggestionHistoryButton).toBeVisible();
expect(suggestionHistoryButton).toBeEnabled();
expect(suggestionHistoryButton).toHaveTextContent("Run sensitive suggestions history");
expect(suggestionHistoryButton).toHaveTextContent("View sensitive suggestion history");
expect(toolbar.lastElementChild).toBe(actions);
expect(actions).toHaveClass("sm:justify-end");
expect(actions).toContainElement(screen.getByRole("button", { name: "Refresh" }));
@@ -675,7 +675,7 @@ test.each(synchronizationScopes)(
},
);
test("discloses source sampling before starting Generate Missing", async () => {
test("discloses source sampling before starting Generate missing descriptions", async () => {
const user = userEvent.setup();
const queuedRun = makeDescriptionGenerationRun({ scope: "missing", total: 3 });
let startBody: unknown;
@@ -696,7 +696,7 @@ test("discloses source sampling before starting Generate Missing", async () => {
const databaseRow = await screen.findByRole("row", { name: /Policlinico San Donato/ });
await user.click(within(databaseRow).getByRole("checkbox", { name: /toggle row selection/i }));
await user.click(screen.getByRole("button", { name: "Actions" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate Missing" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate missing descriptions" }));
expect(screen.getByText("Generate missing descriptions for Policlinico San Donato?")).toBeVisible();
expect(screen.getByRole("note", {
@@ -706,7 +706,7 @@ test("discloses source sampling before starting Generate Missing", async () => {
);
expect(startBody).toBeUndefined();
await user.click(screen.getByRole("button", { name: "Generate Missing" }));
await user.click(screen.getByRole("button", { name: "Generate missing descriptions" }));
await waitFor(() => expect(startBody).toEqual({
modelId: "local-qwen",
scope: "missing",
@@ -715,7 +715,7 @@ test("discloses source sampling before starting Generate Missing", async () => {
expect(await screen.findByRole("dialog", { name: "Description generation" })).toBeVisible();
});
test("keeps Fleet Generate Missing behind the source-data disclosure", async () => {
test("keeps Fleet Generate missing descriptions behind the source-data disclosure", async () => {
const user = userEvent.setup();
let generationStarts = 0;
server.use(
@@ -753,7 +753,7 @@ test("keeps Fleet Generate Missing behind the source-data disclosure", async ()
expect(generationStarts).toBe(0);
});
test("confirms Generate All replacement, supports cancel, and sends the database-wide scope", async () => {
test("confirms generating all descriptions, supports cancel, and sends the database-wide scope", async () => {
const user = userEvent.setup();
const queuedRun = makeDescriptionGenerationRun({ scope: "all", total: 6 });
let startBody: unknown;
@@ -774,7 +774,7 @@ test("confirms Generate All replacement, supports cancel, and sends the database
const databaseRow = await screen.findByRole("row", { name: /Policlinico San Donato/ });
await user.click(within(databaseRow).getByRole("checkbox", { name: /toggle row selection/i }));
await user.click(screen.getByRole("button", { name: "Actions" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate All" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate all descriptions" }));
expect(screen.getByText("Replace generated descriptions for Policlinico San Donato?")).toBeVisible();
expect(screen.getByText(/existing generated descriptions for eligible tables and columns will be replaced/i)).toBeVisible();
@@ -788,8 +788,8 @@ test("confirms Generate All replacement, supports cancel, and sends the database
expect(startBody).toBeUndefined();
await user.click(screen.getByRole("button", { name: "Actions" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate All" }));
await user.click(screen.getByRole("button", { name: "Generate All" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate all descriptions" }));
await user.click(screen.getByRole("button", { name: "Generate all descriptions" }));
await waitFor(() => expect(startBody).toEqual({
modelId: "local-qwen",
@@ -815,8 +815,8 @@ test("keeps the database selected and safely explains when no descriptions are e
const databaseRow = await screen.findByRole("row", { name: /Policlinico San Donato/ });
await user.click(within(databaseRow).getByRole("checkbox", { name: /toggle row selection/i }));
await user.click(screen.getByRole("button", { name: "Actions" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate Missing" }));
await user.click(screen.getByRole("button", { name: "Generate Missing" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate missing descriptions" }));
await user.click(screen.getByRole("button", { name: "Generate missing descriptions" }));
expect(await screen.findByText(
"No eligible catalog tables or columns need description generation.",
@@ -876,10 +876,10 @@ test.each([
await user.click(within(databaseRow).getByRole("checkbox", { name: /toggle row selection/i }));
await user.click(screen.getByRole("button", { name: "Actions" }));
await user.click(await screen.findByRole("menuitem", {
name: scope === "all" ? "Generate All" : "Generate Missing",
name: scope === "all" ? "Generate all descriptions" : "Generate missing descriptions",
}));
await user.click(screen.getByRole("button", {
name: scope === "all" ? "Generate All" : "Generate Missing",
name: scope === "all" ? "Generate all descriptions" : "Generate missing descriptions",
}));
expect(await screen.findByRole("heading", {
@@ -954,9 +954,9 @@ test.each([
}
await user.click(screen.getByRole("button", { name: "Actions" }));
expect(await screen.findByRole("menuitem", { name: "Generate All" }))
expect(await screen.findByRole("menuitem", { name: "Generate all descriptions" }))
.toHaveAttribute("aria-disabled", "true");
expect(screen.getByRole("menuitem", { name: "Generate Missing" }))
expect(screen.getByRole("menuitem", { name: "Generate missing descriptions" }))
.toHaveAttribute("aria-disabled", "true");
});
@@ -983,16 +983,16 @@ test("disables database-wide generation while a description generation is active
let databaseRow = await screen.findByRole("row", { name: /Policlinico San Donato/ });
await user.click(within(databaseRow).getByRole("checkbox", { name: /toggle row selection/i }));
await user.click(screen.getByRole("button", { name: "Actions" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate Missing" }));
await user.click(screen.getByRole("button", { name: "Generate Missing" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate missing descriptions" }));
await user.click(screen.getByRole("button", { name: "Generate missing descriptions" }));
expect(await screen.findByRole("dialog", { name: "Description generation" })).toBeVisible();
databaseRow = await screen.findByRole("row", { name: /Policlinico San Donato/ });
await user.click(within(databaseRow).getByRole("checkbox", { name: /toggle row selection/i }));
await user.click(screen.getByRole("button", { name: "Actions" }));
expect(await screen.findByRole("menuitem", { name: "Generate All" }))
expect(await screen.findByRole("menuitem", { name: "Generate all descriptions" }))
.toHaveAttribute("aria-disabled", "true");
expect(screen.getByRole("menuitem", { name: "Generate Missing" }))
expect(screen.getByRole("menuitem", { name: "Generate missing descriptions" }))
.toHaveAttribute("aria-disabled", "true");
});
@@ -1472,7 +1472,7 @@ test("filters catalog tables as the operator types", async () => {
});
});
test("selected table Actions exposes cleanup commands and sends synchronization ids", async () => {
test("selected table Actions expose table commands and send synchronization ids", async () => {
const user = userEvent.setup();
let startBody: unknown;
const run = makeSyncRun("columns", [patientsTable.id]);
@@ -1494,10 +1494,11 @@ test("selected table Actions exposes cleanup commands and sends synchronization
await user.click(within(tableRow).getByRole("checkbox", { name: /toggle row selection/i }));
await user.click(screen.getByRole("button", { name: "Actions" }));
const synchronizeColumns = await screen.findByRole("menuitem", { name: "Synchronize columns" });
const synchronizeColumns = await screen.findByRole("menuitem", { name: "Synchronize columns for selected tables" });
expect(synchronizeColumns).toBeEnabled();
expect(screen.getByRole("menuitem", { name: "Delete all columns" })).toBeEnabled();
expect(screen.getByRole("menuitem", { name: "Delete all relationships" })).toBeEnabled();
expect(screen.getByRole("menuitem", { name: "Synchronize database tables" })).toBeEnabled();
expect(screen.getByRole("menuitem", { name: "Remove synchronized columns" })).toBeEnabled();
expect(screen.queryByRole("menuitem", { name: "Delete all relationships" })).not.toBeInTheDocument();
await user.click(synchronizeColumns);
await waitFor(() => expect(startBody).toEqual({
@@ -1546,10 +1547,10 @@ test("starts description generation for multiple selected tables", async () => {
await user.click(within(await screen.findByRole("row", { name: /visits/ })).getByRole("checkbox"));
await user.click(screen.getByRole("button", { name: "Actions" }));
const generate = await screen.findByRole("menuitem", { name: "Generate descriptions" });
const generate = await screen.findByRole("menuitem", { name: "Generate table description" });
expect(generate).toBeEnabled();
expect(screen.getByRole("menuitem", {
name: "Move generated description to Description",
name: "Copy generated descriptions to Description",
})).toBeEnabled();
await user.click(generate);
@@ -1628,9 +1629,9 @@ test("observes an active run from another browser and reopens a terminal run fro
renderPage();
const observe = await screen.findByRole("button", {
name: "Run descriptions generation history",
name: "View description generation history",
});
expect(observe).toHaveTextContent("Run descriptions generation history");
expect(observe).toHaveTextContent("View description generation history");
expect(requestedLimit).toBe("50");
await user.click(observe);
@@ -1654,9 +1655,9 @@ test("keeps the sensitive suggestion history label stable while showing active s
renderPage();
const historyButton = await screen.findByRole("button", {
name: "Run sensitive suggestions history",
name: "View sensitive suggestion history",
});
expect(historyButton).toHaveTextContent("Run sensitive suggestions history");
expect(historyButton).toHaveTextContent("View sensitive suggestion history");
await waitFor(() => expect(historyButton).toHaveAttribute(
"title",
"Sensitive suggestion generation is active",
@@ -1692,7 +1693,7 @@ test.each([
client.setQueryData(unrelatedColumnKey, []);
await user.click(await screen.findByRole("button", {
name: "Run descriptions generation history",
name: "View description generation history",
}));
await waitFor(() => expect(client.getQueryState(tableKey)?.isInvalidated).toBe(true));
@@ -1731,7 +1732,7 @@ test("keeps selected tables when description generation cannot start", async ()
await user.click(within(await screen.findByRole("row", { name: /patients/ })).getByRole("checkbox"));
await user.click(within(await screen.findByRole("row", { name: /visits/ })).getByRole("checkbox"));
await user.click(screen.getByRole("button", { name: "Actions" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate descriptions" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate table description" }));
expect(await screen.findByText("A description generation run is already active.")).toBeVisible();
expect(screen.getByText("2 selected")).toBeVisible();
@@ -1801,7 +1802,7 @@ test("refreshes Catalog Tables and Catalog Columns after table generation comple
await user.click(within(await screen.findByRole("row", { name: /patients/ })).getByRole("checkbox"));
await user.click(within(await screen.findByRole("row", { name: /visits/ })).getByRole("checkbox"));
await user.click(screen.getByRole("button", { name: "Actions" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate descriptions" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate table description" }));
expect(await screen.findByRole("heading", { name: "Completed" })).toBeVisible();
await waitFor(() => expect(tableReads).toBe(2));
@@ -1857,7 +1858,7 @@ test("moves selected generated table descriptions and reports copied and skipped
await user.click(within(visitsRow).getByRole("checkbox", { name: /toggle row selection/i }));
await user.click(screen.getByRole("button", { name: "Actions" }));
await user.click(await screen.findByRole("menuitem", {
name: "Move generated description to Description",
name: "Copy generated descriptions to Description",
}));
await waitFor(() => expect(consolidationBody).toEqual({
@@ -1945,8 +1946,9 @@ test("selects columns, moves generated descriptions, and refreshes only the affe
await user.click(within(idRow).getByRole("checkbox", { name: /toggle row selection/i }));
await user.click(within(nameRow).getByRole("checkbox", { name: /toggle row selection/i }));
await user.click(screen.getByRole("button", { name: "Actions" }));
expect(await screen.findByRole("menuitem", { name: "Synchronize columns for this table" })).toBeEnabled();
await user.click(await screen.findByRole("menuitem", {
name: "Move generated description to Description",
name: "Copy generated descriptions to Description",
}));
await waitFor(() => expect(consolidationBody).toEqual({
@@ -2000,7 +2002,7 @@ test("starts one selected column with the configured default model", async () =>
expect(columnRow).toBeDefined();
await user.click(within(columnRow!).getByRole("checkbox", { name: /toggle row selection/i }));
await user.click(screen.getByRole("button", { name: "Actions" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate description" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate column description" }));
await waitFor(() => expect(startBody).toEqual({
modelId: "local-qwen",
@@ -2354,7 +2356,7 @@ test("polls a description run and renders its events in sequence order", async (
.find((row) => within(row).queryByRole("checkbox", { name: /toggle row selection/i }));
await user.click(within(columnRow!).getByRole("checkbox", { name: /toggle row selection/i }));
await user.click(screen.getByRole("button", { name: "Actions" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate description" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate column description" }));
const drawer = await screen.findByRole("dialog", { name: "Description generation" });
expect(within(drawer).getByText(/local-qwen/)).toBeVisible();
@@ -2436,7 +2438,7 @@ test("refreshes Catalog Tables and Catalog Columns after column generation compl
.find((row) => within(row).queryByRole("checkbox", { name: /toggle row selection/i }));
await user.click(within(columnRow!).getByRole("checkbox", { name: /toggle row selection/i }));
await user.click(screen.getByRole("button", { name: "Actions" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate description" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate column description" }));
expect(await screen.findByRole("heading", { name: "Completed" })).toBeVisible();
await waitFor(() => expect(columnReads).toBe(2));
@@ -2469,7 +2471,7 @@ test("keeps the selected column and shows a safe message when generation cannot
.find((row) => within(row).queryByRole("checkbox", { name: /toggle row selection/i }));
await user.click(within(columnRow!).getByRole("checkbox", { name: /toggle row selection/i }));
await user.click(screen.getByRole("button", { name: "Actions" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate description" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate column description" }));
expect(await screen.findByText("A description generation run is already active.")).toBeVisible();
expect(screen.getByText("1 selected")).toBeVisible();
@@ -2536,7 +2538,7 @@ test("shows a basic failed run without exposing private model or provider fields
.find((row) => within(row).queryByRole("checkbox", { name: /toggle row selection/i }));
await user.click(within(columnRow!).getByRole("checkbox", { name: /toggle row selection/i }));
await user.click(screen.getByRole("button", { name: "Actions" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate description" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate column description" }));
const drawer = await screen.findByRole("dialog", { name: "Description generation" });
expect(await within(drawer).findByRole("heading", { name: "Failed" })).toBeVisible();
@@ -2590,18 +2592,18 @@ test("offers generation and consolidation for multiple selected columns", async
.find((row) => within(row).queryByRole("checkbox", { name: /toggle row selection/i }));
await user.click(within(idRow!).getByRole("checkbox", { name: /toggle row selection/i }));
await user.click(screen.getByRole("button", { name: "Actions" }));
expect(await screen.findByRole("menuitem", { name: "Generate description" })).toBeEnabled();
expect(await screen.findByRole("menuitem", { name: "Generate column description" })).toBeEnabled();
expect(screen.getByRole("menuitem", {
name: "Move generated description to Description",
name: "Copy generated descriptions to Description",
})).toBeEnabled();
await user.keyboard("{Escape}");
await user.click(within(nameRow!).getByRole("checkbox", { name: /toggle row selection/i }));
await user.click(screen.getByRole("button", { name: "Actions" }));
const generate = await screen.findByRole("menuitem", { name: "Generate descriptions" });
const generate = await screen.findByRole("menuitem", { name: "Generate column descriptions" });
expect(generate).toBeEnabled();
expect(await screen.findByRole("menuitem", {
name: "Move generated description to Description",
name: "Copy generated descriptions to Description",
})).toBeEnabled();
await user.click(generate);
@@ -2637,7 +2639,7 @@ test.each([
const tableRow = await screen.findByRole("row", { name: /patients/ });
await user.click(within(tableRow).getByRole("checkbox", { name: /toggle row selection/i }));
await user.click(screen.getByRole("button", { name: "Actions" }));
expect(await screen.findByRole("menuitem", { name: "Generate description" }))
expect(await screen.findByRole("menuitem", { name: "Generate descriptions for all columns" }))
.toHaveAttribute("aria-disabled", "true");
await user.keyboard("{Escape}");
await user.click(screen.getByRole("button", { name: "Clear" }));
@@ -2647,7 +2649,7 @@ test.each([
await user.click(within(columnRow!).getByRole("checkbox", { name: /toggle row selection/i }));
await user.click(screen.getByRole("button", { name: "Actions" }));
expect(await screen.findByRole("menuitem", { name: "Generate description" }))
expect(await screen.findByRole("menuitem", { name: "Generate column description" }))
.toHaveAttribute("aria-disabled", "true");
});
@@ -2680,11 +2682,11 @@ test("disables another generation start while the selected-column run is active"
.find((row) => within(row).queryByRole("checkbox", { name: /toggle row selection/i }));
await user.click(within(columnRow!).getByRole("checkbox", { name: /toggle row selection/i }));
await user.click(screen.getByRole("button", { name: "Actions" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate description" }));
await user.click(await screen.findByRole("menuitem", { name: "Generate column description" }));
expect(await screen.findByRole("dialog", { name: "Description generation" })).toBeVisible();
await user.click(screen.getByRole("button", { name: "Actions" }));
expect(await screen.findByRole("menuitem", { name: "Generate description" }))
expect(await screen.findByRole("menuitem", { name: "Generate column description" }))
.toHaveAttribute("aria-disabled", "true");
expect(screen.getByText("1 selected")).toBeVisible();
@@ -2692,7 +2694,7 @@ test("disables another generation start while the selected-column run is active"
const tableRow = await screen.findByRole("row", { name: /patients/ });
await user.click(within(tableRow).getByRole("checkbox", { name: /toggle row selection/i }));
await user.click(screen.getByRole("button", { name: "Actions" }));
expect(await screen.findByRole("menuitem", { name: "Generate description" }))
expect(await screen.findByRole("menuitem", { name: "Generate descriptions for all columns" }))
.toHaveAttribute("aria-disabled", "true");
});
@@ -2720,7 +2722,7 @@ test("disables selected description consolidation without database.manage", asyn
await user.click(screen.getByRole("button", { name: "Actions" }));
expect(await screen.findByRole("menuitem", {
name: "Move generated description to Description",
name: "Copy generated descriptions to Description",
})).toHaveAttribute("aria-disabled", "true");
expect(consolidationCalls).toBe(0);
});
@@ -2748,7 +2750,7 @@ test("shows an operation conflict without clearing selected descriptions or refr
await user.click(within(tableRow).getByRole("checkbox", { name: /toggle row selection/i }));
await user.click(screen.getByRole("button", { name: "Actions" }));
await user.click(await screen.findByRole("menuitem", {
name: "Move generated description to Description",
name: "Copy generated descriptions to Description",
}));
expect(await screen.findByText("A database operation is already in progress.")).toBeVisible();
@@ -2756,52 +2758,22 @@ test("shows an operation conflict without clearing selected descriptions or refr
expect(tableReads).toBe(1);
});
test("selected table Actions confirms and deletes incoming and outgoing relationships", async () => {
test("selected table Actions do not expose relationship cleanup", async () => {
const user = userEvent.setup();
let cleanupBody: unknown;
server.use(
http.get("/api/catalog/databases/:databaseId/tables", () => HttpResponse.json([patientsTable])),
http.post("/api/catalog/databases/:databaseId/tables/metadata-cleanup", async ({ request }) => {
cleanupBody = await request.json();
return HttpResponse.json({ tables: 0, columns: 0, relationships: 2 });
}),
);
const { client } = renderPage({
renderPage({
rows: [makeDatabase({ connectionStatus: "reachable", testedVersion: 3 })],
});
const unselectedColumnQuery = [
"catalog-columns",
patientsTable.databaseId,
"bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb",
] as const;
client.setQueryData(unselectedColumnQuery, []);
await user.click(await screen.findByRole("button", { name: "View Policlinico San Donato" }));
await user.click(screen.getByRole("tab", { name: "Tables" }));
const tableRow = await screen.findByRole("row", { name: /patients/ });
await user.click(within(tableRow).getByRole("checkbox", { name: /toggle row selection/i }));
await user.click(screen.getByRole("button", { name: "Actions" }));
await user.click(await screen.findByRole("menuitem", { name: "Delete all relationships" }));
expect(screen.getByText("Delete all relationships for 1 table?")).toBeVisible();
expect(screen.getByText(/incoming and outgoing relationships/i)).toBeVisible();
expect(cleanupBody).toBeUndefined();
await user.click(within(tableRow).getByRole("checkbox", { name: /toggle row selection/i }));
expect(screen.queryByText("Delete all relationships for 1 table?")).not.toBeInTheDocument();
expect(cleanupBody).toBeUndefined();
await user.click(within(tableRow).getByRole("checkbox", { name: /toggle row selection/i }));
await user.click(screen.getByRole("button", { name: "Actions" }));
await user.click(await screen.findByRole("menuitem", { name: "Delete all relationships" }));
await user.click(screen.getByRole("button", { name: "Delete relationships" }));
await waitFor(() => expect(cleanupBody).toEqual({
tableIds: [patientsTable.id],
target: "relationships",
}));
await waitFor(() => expect(screen.queryByText("1 selected")).not.toBeInTheDocument());
expect(client.getQueryState(unselectedColumnQuery)?.isInvalidated).toBe(true);
await waitFor(() => expect(screen.getByRole("textbox", { name: "Search tables" })).toHaveFocus());
expect(screen.queryByRole("menuitem", { name: "Delete all relationships" })).not.toBeInTheDocument();
expect(screen.queryByRole("menuitem", { name: "Clear catalog relationships" })).not.toBeInTheDocument();
});
test("navigates purely from a database to its tables and edits review metadata", async () => {
@@ -2974,9 +2946,10 @@ test("opens the durable job drawer and confirms its exact destructive plan", asy
rows: [makeDatabase({ connectionStatus: "reachable", testedVersion: 3 })],
});
await user.click(await screen.findByRole("button", { name: "View Policlinico San Donato" }));
await user.click(screen.getByRole("tab", { name: "Tables" }));
await user.click(await screen.findByRole("button", { name: "Sync tables" }));
const databaseRow = await screen.findByRole("row", { name: /Policlinico San Donato/ });
await user.click(within(databaseRow).getByRole("checkbox", { name: /toggle row selection/i }));
await user.click(screen.getByRole("button", { name: "Actions" }));
await user.click(await screen.findByRole("menuitem", { name: "Synchronize tables" }));
const synchronizationDrawer = await screen.findByRole("dialog", {
name: "Schema synchronization",