Add external row quantity foundation
This commit is contained in:
@@ -179,6 +179,7 @@ describe("circuit device-row update project commands", () => {
|
||||
{ field: "roomId", value: null },
|
||||
{ field: "quantity", value: 2 },
|
||||
{ field: "cosPhi", value: 0.9 },
|
||||
{ field: "manualQuantity", value: 2 },
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -187,6 +188,13 @@ describe("circuit device-row update project commands", () => {
|
||||
() => createCircuitDeviceRowUpdateProjectCommand("row-1", {}),
|
||||
/at least one change/
|
||||
);
|
||||
assert.throws(
|
||||
() => createCircuitDeviceRowUpdateProjectCommand("row-1", {
|
||||
quantity: 1,
|
||||
manualQuantity: 2,
|
||||
}),
|
||||
/must not exceed/
|
||||
);
|
||||
assert.throws(
|
||||
() =>
|
||||
createCircuitDeviceRowUpdateProjectCommand("row-1", {
|
||||
@@ -470,7 +478,7 @@ describe("circuit device-row structure project commands", () => {
|
||||
row.circuitId
|
||||
);
|
||||
|
||||
assert.deepEqual(insert.payload.row, row);
|
||||
assert.deepEqual(insert.payload.row, { ...row, manualQuantity: 1 });
|
||||
assert.deepEqual(remove.payload, {
|
||||
rowId: "row-1",
|
||||
expectedCircuitId: "circuit-1",
|
||||
|
||||
Reference in New Issue
Block a user