test: align delivery regressions with removal of public financial example
tests / ci (push) Waiting to run
tests / ci (push) Waiting to run
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user