feat(gate): buildSchemaLinkingRequest descriptor builder
This commit is contained in:
@@ -15,6 +15,7 @@ const {
|
||||
buildArtifactGate,
|
||||
buildInfoRequest,
|
||||
buildFreetextRequest,
|
||||
buildSchemaLinkingRequest,
|
||||
withChildLinkage,
|
||||
} = require("../builders.js");
|
||||
|
||||
@@ -118,6 +119,17 @@ test("freetext request carries a title and no options", () => {
|
||||
assert.deepEqual(result.reserved, ["back", "exit", "other"]);
|
||||
});
|
||||
|
||||
test("buildSchemaLinkingRequest carries tables + reserved", () => {
|
||||
const out = buildSchemaLinkingRequest({
|
||||
id: "u7", phase: "F4", title: "F4 — Schema linking",
|
||||
tables: [{ id: "t1", name: "dim_patient", kind: "promote", columns: [] }],
|
||||
});
|
||||
assert.equal(out.widget, "schema-linking");
|
||||
assert.equal(out.id, "u7");
|
||||
assert.equal(out.tables.length, 1);
|
||||
assert.deepEqual(out.reserved, ["back", "exit", "other"]);
|
||||
});
|
||||
|
||||
test("withChildLinkage sets option.opens and returns the option", () => {
|
||||
const child = { widget: "freetext", title: "Motivazione del rifiuto" };
|
||||
const option = withChildLinkage({ id: "reject", label: "Rifiuta" }, child);
|
||||
|
||||
Reference in New Issue
Block a user