Align public simulator entry check with integrated home layout
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-10-23 17:11:15 +02:00
parent 088f2c2cf4
commit d8224ba84b
+7 -6
View File
@@ -14,13 +14,14 @@ const simulator = readFileSync(
'utf8',
);
void test('portal home hero exposes a direct public simulator link', () => {
const hero = homePage.slice(
homePage.indexOf('function Hero('),
homePage.indexOf('function SectorGrid('),
void test('portal home investor support exposes a direct public simulator link', () => {
const supportHeading = homePage.indexOf('Apoio ao Investidor');
assert.ok(supportHeading >= 0, 'home investor support must exist');
const support = homePage.slice(
supportHeading,
homePage.indexOf('</article>', supportHeading),
);
assert.match(hero, /href="\/simulador-fiscal"/);
assert.match(hero, /Planear finanças/);
assert.match(support, /<a\s[^>]*href="\/simulador-fiscal"[^>]*>[\s\S]*?Simulador Fiscal[\s\S]*?<\/a>/);
});
void test('completed simulator result keeps public interest submission independent', () => {