Reconciliar verificacoes com navegacao e relatorios aprovados
This commit is contained in:
@@ -114,15 +114,19 @@ void test('business plan values in the dossier equal the existing simulator fore
|
||||
const finance = report.sections.find((section) => section.id === 'finance');
|
||||
const row = (field) =>
|
||||
finance.rows.find((item) => item.field === field).value;
|
||||
const numeric = (value) => {
|
||||
assert.match(value, /MZN$/);
|
||||
return value.replace(/\s|MZN/g, '').replace(',', '.');
|
||||
};
|
||||
assert.equal(
|
||||
row('Facturação no horizonte'),
|
||||
`${expected.totalRevenue} MZN`,
|
||||
numeric(row('Facturação no horizonte')),
|
||||
expected.totalRevenue,
|
||||
);
|
||||
assert.equal(
|
||||
row('Resultado antes de impostos'),
|
||||
`${expected.totalProfitBeforeTax} MZN`,
|
||||
numeric(row('Resultado antes de impostos')),
|
||||
expected.totalProfitBeforeTax,
|
||||
);
|
||||
assert.equal(row('Caixa final projectada'), `${expected.endingCash} MZN`);
|
||||
assert.equal(numeric(row('Caixa final projectada')), expected.endingCash);
|
||||
assert.equal(row('Reconciliação do financiamento'), expected.fundingStatus);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user