fix(portal): deduplicate tiles and align FALC visual
All checks were successful
Validation applicative / Tests de contrat (push) Successful in 10s

This commit is contained in:
Santinova Deployment
2026-10-25 22:14:30 +00:00
parent 7faf57cbb8
commit bd00148615
3 changed files with 20 additions and 1 deletions

View File

@@ -4,6 +4,7 @@
* domaine courant choisit strictement son dashboard, ses URLs et son groupe.
*/
const assert = require('node:assert/strict');
const crypto = require('node:crypto');
const fs = require('node:fs');
const path = require('node:path');
const vm = require('node:vm');
@@ -150,6 +151,16 @@ for (const [host, ids] of Object.entries(expectedVisible)) {
assert.deepEqual(visible, ids, `${host} ne doit afficher que les tuiles de son portail`);
}
const santinovaRecettePortal = loadPortal(hosts.santinovaRecette).sandbox;
assert.deepEqual(
santinovaRecettePortal.uniqueAppsById([
{ id: 'falc-generator', name: 'FALC Generator', category: 'ITINOVA', urls: { recette: 'https://falc-itinova.recette.santinova-soft.org' } },
{ id: 'falc-generator', name: 'FALC Generator dupliqué', category: 'ITINOVA', urls: { recette: 'https://falc-itinova.recette.santinova-soft.org' } }
]).map(app => app.id),
['falc-generator'],
'un inventaire erroné ne doit jamais rendre FALC deux fois dans le portail'
);
const santelisProductionPortal = loadPortal(hosts.santelisProd).sandbox;
assert.deepEqual(
Array.from(santelisProductionPortal.getPortalOnlyApps(), app => app.id),
@@ -167,6 +178,12 @@ for (const imageName of ['budget-si.jpg', 'gestion-astreintes-had.jpg', 'gestion
assert.equal(fs.existsSync(imagePath), true, `l’asset ${imageName} doit être publié`);
assert.ok(fs.statSync(imagePath).size > 2048, `l’asset ${imageName} ne doit pas être vide`);
}
const falcAsset = path.join(root, 'images', 'falc-generator.png');
assert.equal(
crypto.createHash('sha256').update(fs.readFileSync(falcAsset)).digest('hex'),
'6867b5253e45970cfb21b720804c1d186e53a38d9689ce37c6cdcbf21406e20d',
'la recette doit utiliser la même vignette FALC de référence que la production'
);
for (const historicalHost of [historicalRecetteHost, historicalProductionHost]) {
const historicalPortal = loadPortal(historicalHost);