fix(evenements): un tableau de covoiturage par événement (B25, commit G, D8)
Le tableau commun nommait la semaine aux invités de la plantation. La page forêt pointe désormais vers son propre tableau (28-29 novembre), la page codev garde le tableau de la semaine. Test HTTP ajouté dans test-y.mjs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DwRV4Gjq47A633kqxvCint
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
8e5cae13bb
commit
f1cdd2343e
@@ -16,12 +16,12 @@ export const evenement = {
|
||||
reponsesAvant: 'vendredi 6 novembre',
|
||||
/** Le lieu-dit sur Google Maps (jamais l'adresse de la maison) ; ouvre l'application au téléphone. */
|
||||
mapsUrl: 'https://www.google.com/maps/search/?api=1&query=Ruetz%2C%20Bayard-sur-Marne',
|
||||
/** Tableau de covoiturage (Google Sheet, Drive de Jules) ; null tant qu'il n'existe pas. */
|
||||
covoiturageUrl: 'https://docs.google.com/spreadsheets/d/12YHom74GQyjpdMPGU4qzB0kk1EKkM97jb0YoKzNucYA/edit' as string | null,
|
||||
|
||||
codev: {
|
||||
chemin: '/ruetz/codev',
|
||||
titre: 'La semaine d\'entraide',
|
||||
/** Tableau de covoiturage (Google Sheet, Drive de Jules) ; null tant qu'il n'existe pas.
|
||||
* Un tableau par événement : celui de la semaine nomme le codev, la forêt ne doit pas le voir. */
|
||||
covoiturageUrl: 'https://docs.google.com/spreadsheets/d/12YHom74GQyjpdMPGU4qzB0kk1EKkM97jb0YoKzNucYA/edit' as string | null,
|
||||
du: '2026-11-21',
|
||||
au: '2026-11-27',
|
||||
/** Lundi → vendredi : la semaine de codev proprement dite ; le week-end d'avant, on atterrit ensemble. */
|
||||
@@ -40,6 +40,7 @@ export const evenement = {
|
||||
titre: 'On plante une forêt',
|
||||
du: '2026-11-28',
|
||||
au: '2026-11-29',
|
||||
covoiturageUrl: 'https://docs.google.com/spreadsheets/d/1sAs7RwGGUGiCcrV3N5w72m9omRhsCu7SIDTQENqiN_Q/edit' as string | null,
|
||||
/** Personnes au chantier, enfants compris ; non affiché, ferme le formulaire. */
|
||||
capacite: 40,
|
||||
},
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
Paris Est → Saint-Dizier, environ 2 h 30, souvent direct. Puis 15 km : covoiturage et navette depuis la gare,
|
||||
organisés avec les inscrit·es.
|
||||
</p>
|
||||
<p v-if="e.covoiturageUrl"><a :href="e.covoiturageUrl" rel="noopener" target="_blank">Le tableau de covoiturage</a></p>
|
||||
<p v-if="e.codev.covoiturageUrl"><a :href="e.codev.covoiturageUrl" rel="noopener" target="_blank">Le tableau de covoiturage</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -119,8 +119,8 @@
|
||||
En train jusqu'à la gare de Saint-Dizier : Paris Est → Saint-Dizier, environ 2 h 30, billets sur
|
||||
<a href="https://www.sncf-connect.com/" rel="noopener" target="_blank">SNCF Connect</a>. Puis 15 km.
|
||||
</p>
|
||||
<p v-if="e.covoiturageUrl">
|
||||
<a :href="e.covoiturageUrl" rel="noopener" target="_blank">Le tableau de covoiturage</a>
|
||||
<p v-if="e.foret.covoiturageUrl">
|
||||
<a :href="e.foret.covoiturageUrl" rel="noopener" target="_blank">Le tableau de covoiturage</a>
|
||||
</p>
|
||||
<p v-else>Un tableau de covoiturage partagé arrive avec la confirmation.</p>
|
||||
</div>
|
||||
|
||||
@@ -17,6 +17,7 @@ const racine = join(__dirname, '..')
|
||||
|
||||
const evt = await jiti.import(join(racine, 'utils', 'evenements.ts'))
|
||||
const ins = await jiti.import(join(racine, 'utils', 'inscriptionEvenement.ts'))
|
||||
const { evenement: ruetz } = await jiti.import(join(racine, 'data', 'evenements', 'ruetz-2026.ts'))
|
||||
|
||||
let echecs = 0
|
||||
function egal(nom, obtenu, attendu) {
|
||||
@@ -149,6 +150,9 @@ if (base) {
|
||||
const fo = (await get('/ruetz/foret', EVT)).html
|
||||
egal('HTTP forêt : aucun lien vers le codev ni le carrefour', /href="\/(evenements\/)?ruetz(\/codev)?"/.test(fo), false)
|
||||
egal('HTTP forêt : le lieu mène à Maps', fo.includes('maps/search/?api=1&query=Ruetz%2C%20Bayard-sur-Marne'), true)
|
||||
// D8 : un tableau de covoiturage par événement ; celui de la semaine nomme le codev.
|
||||
egal('HTTP forêt : son propre tableau, pas celui de la semaine',
|
||||
[fo.includes(`href="${ruetz.foret.covoiturageUrl}"`), fo.includes(ruetz.codev.covoiturageUrl)], [true, false])
|
||||
const cd = (await get('/ruetz/codev', EVT)).html
|
||||
egal('HTTP codev : bloc plantation cliquable, arrivée fixe', [cd.includes('aria-label="La page forêt"'), cd.includes('Arrivée le samedi 21')], [true, true])
|
||||
egal('HTTP event/agences : 404', (await get('/agences', EVT)).status, 404)
|
||||
|
||||
Reference in New Issue
Block a user