fixed clip lengths not syncing

This commit is contained in:
2026-10-01 21:39:11 +02:00
parent 9241b35291
commit b6bedaf41e
2 changed files with 27 additions and 7 deletions
+13
View File
@@ -167,6 +167,19 @@ test('Save retains definition fields in the project without exporting and restor
assert.equal(h.exports[0].display_name, result.display_name);
});
test('cycle seconds always follow the current stage lengths', () => {
const h = createHarness(), dialog = h.open(), result = defaults(dialog.form);
result.stub_stage_1_cycle_seconds = 99;
result.stub_stage_2_cycle_seconds = 88;
h.setFormResult(result);
assert.equal(dialog.onConfirm(result), true);
assert.deepEqual(h.exports[0].stages.map((stage) => stage.cycle_seconds), [1, 2]);
const reopened = h.open();
assert.equal(reopened.form.stub_stage_1_cycle_seconds.value, 1);
assert.equal(reopened.form.stub_stage_2_cycle_seconds.value, 2);
});
test('invalid Save leaves previously saved fields intact', () => {
const h = createHarness(), dialog = h.open(), result = defaults(dialog.form);
result.display_name = 'Original';