fix: remove demonstration scenario from investor simulator and exports

This commit is contained in:
2026-11-23 09:11:12 +02:00
parent 8ffb0f1bc5
commit e929632e42
16 changed files with 565 additions and 150 deletions
@@ -381,7 +381,7 @@ void test('F31 carries all 36 calculated months, original service/department row
'Não documentado no exemplo original',
);
});
void test('F16/F31 persistence and existing Word/print exports preserve the same requirements, all months and source gaps', async () => {
void test('Investor exports preserve requirements; legacy example source never exposes demonstration tables', async () => {
const p = startup();
p.assetInvestment = requirements.startupAmount(
requirements.calculateStartupAssetRequirements(p).assetInvestment,
@@ -401,7 +401,10 @@ void test('F16/F31 persistence and existing Word/print exports preserve the same
},
{ generatedAt: '2026-11-20T12:00:00Z' },
);
assert.equal(report.sections[0].tables.length, 11);
assert.equal(
report.sections[0].tables.length,
mode === 'investor' ? 11 : 0,
);
assert.equal(JSON.stringify(p), before);
const html = await createProjectDossierPrintHtml(report, []),
doc = await generateProjectDossierDocx(report, []),
@@ -415,18 +418,14 @@ void test('F16/F31 persistence and existing Word/print exports preserve the same
'Caixa requerida',
'não financiamento realizado',
]
: [
'2025-01',
'2027-12',
'Vendas documentadas no original',
'Departamento documentado',
'Não documentado',
]) {
: ['Seleccione o plano do investidor']) {
assert.ok((html + xml).includes(s), s);
}
if (mode === 'annual_example') {
assert.match(xml, /14 537,25/);
assert.match(xml, /documental/);
assert.doesNotMatch(
html + xml,
/14 537,25|Vendas documentadas no original|Departamento documentado/,
);
}
}
});