Verify Revit reference CSV
This commit is contained in:
@@ -103,6 +103,25 @@ describe("external CSV configuration", () => {
|
||||
});
|
||||
assert.match(validateFailure(invalidQuantity), /positive finite number/);
|
||||
});
|
||||
|
||||
it("allows a missing quantity column only for fixed quantity rules", () => {
|
||||
const configuration = createDefaultExternalCsvConfiguration({
|
||||
...columns,
|
||||
quantity: null,
|
||||
});
|
||||
configuration.familyTypeRules.push({
|
||||
exactFamilyAndType: "Steckdose: Standard",
|
||||
internalDeviceType: "Steckdose",
|
||||
connectionKind: null,
|
||||
category: "single_phase",
|
||||
quantityRule: { kind: "fixed", quantity: 1 },
|
||||
displayNameSuggestion: null,
|
||||
});
|
||||
assert.equal(validateExternalCsvConfiguration(configuration).success, true);
|
||||
|
||||
configuration.familyTypeRules[0].quantityRule = { kind: "mapped-column" };
|
||||
assert.match(validateFailure(configuration), /requires a configured quantity column/);
|
||||
});
|
||||
});
|
||||
|
||||
function validateFailure(value: unknown) {
|
||||
|
||||
Reference in New Issue
Block a user