fix: harden reviewer workflow and memory handling
This commit is contained in:
@@ -33,6 +33,13 @@ const descriptor: WidgetDescriptor = {
|
||||
reserved: ["back", "exit", "other"],
|
||||
};
|
||||
|
||||
test("starts include rows checked and exclude rows unchecked even for legacy payloads", () => {
|
||||
render(<SchemaLinkingGateWidget descriptor={descriptor} onRespond={vi.fn()} />);
|
||||
|
||||
expect(screen.getByRole("checkbox", { name: "dim_patient" })).toBeChecked();
|
||||
expect(screen.getByRole("checkbox", { name: "fact_sostituzione" })).not.toBeChecked();
|
||||
});
|
||||
|
||||
test("Confirm emits enacted tables with suggested columns (catalog order)", async () => {
|
||||
const onRespond = vi.fn();
|
||||
render(<SchemaLinkingGateWidget descriptor={descriptor} onRespond={onRespond} />);
|
||||
@@ -42,7 +49,7 @@ test("Confirm emits enacted tables with suggested columns (catalog order)", asyn
|
||||
kind: "schema-linking",
|
||||
tables: [
|
||||
{ id: "t-pat", enacted: true, columns: ["cod_paz"] },
|
||||
{ id: "x-sub", enacted: true },
|
||||
{ id: "x-sub", enacted: false },
|
||||
],
|
||||
});
|
||||
});
|
||||
@@ -60,7 +67,7 @@ test("selecting a column in the modal adds it to the response", async () => {
|
||||
kind: "schema-linking",
|
||||
tables: [
|
||||
{ id: "t-pat", enacted: true, columns: ["cod_paz", "nome"] },
|
||||
{ id: "x-sub", enacted: true },
|
||||
{ id: "x-sub", enacted: false },
|
||||
],
|
||||
});
|
||||
});
|
||||
@@ -75,7 +82,7 @@ test("declining a table's enact checkbox drops its columns", async () => {
|
||||
kind: "schema-linking",
|
||||
tables: [
|
||||
{ id: "t-pat", enacted: false },
|
||||
{ id: "x-sub", enacted: true },
|
||||
{ id: "x-sub", enacted: false },
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user