test: align delivery regressions with removal of public financial example
tests / ci (push) Waiting to run

This commit is contained in:
2026-11-23 11:38:35 +02:00
parent 3c2da0291a
commit ab471454f1
3 changed files with 40 additions and 22 deletions
+11 -5
View File
@@ -196,16 +196,22 @@ function editor(initialSnapshot) {
};
}
void test('annual example snapshot is saved through the existing parent callback and recovered by a fresh editor', () => {
void test('legacy example snapshot stays preserved but cannot be loaded from the investor editor', () => {
const form = editor();
form.edit('Preço por unidade', '100');
const saved = JSON.parse(form.snapshot());
const exampleSnapshot = serializeAnnualExampleSnapshot(
newAnnualReferencePlan(),
);
form.example().onSnapshotChange(exampleSnapshot);
const recovered = editor(form.snapshot());
assert.equal(recovered.example().snapshot, exampleSnapshot);
saved.plan.annualExampleSnapshot = exampleSnapshot;
const recovered = editor(JSON.stringify(saved));
assert.equal(recovered.example(), undefined);
recovered.edit('Preço por unidade', '250.50');
assert.equal(recovered.example().snapshot, exampleSnapshot);
assert.equal(
JSON.parse(recovered.snapshot()).plan.annualExampleSnapshot,
exampleSnapshot,
);
assert.equal(recovered.field('Preço por unidade').value, '250.50');
});
void test('monthly units, unit price, variable cost and operating expenses remain editable after snapshot echo', () => {