[FIX] walk-through: step 21 scrolls the history panel to its lines

With "Reculer" and "Avancer" held at the top of the history panel, the
abandoned line of step 21 no longer fit the window, and the check that both
the abandoned line and the named instant show in the capture failed. The
step now scrolls the panel to the abandoned line first. Checked: the browser
series fails step 21 only on its stale capture.

--- FR ---

[FIX] parcours : l'étape 21 fait défiler le panneau jusqu'à ses lignes

« Reculer » et « Avancer » tenus en haut du panneau d'historique, la ligne
abandonnée de l'étape 21 ne tenait plus dans la fenêtre, et l'épreuve qui
veut la ligne abandonnée et l'instant nommé dans la capture échouait. L'étape
fait d'abord défiler le panneau jusqu'à la ligne abandonnée. Vérifié : la
série navigateur n'échoue plus à l'étape 21 que sur sa capture périmée.

Assisted-by: Claude Opus 5.5
This commit is contained in:
Mathieu Benoit 2026-11-05 01:09:33 -05:00
parent a5a040fd7e
commit 966e74b343

View file

@ -2275,7 +2275,10 @@ describe('le parcours par gestes, depuis un répertoire neuf', { timeout: DUREE
expect(pastilles(abandonnee, 'abandonne')).toEqual([t('evenement.historique.abandonne')]);
expect(abandonnee.querySelector('[data-commande="revenir"]')).not.toBeNull();
expect(getComputedStyle(abandonnee.querySelector('.libelle')).color).not.toBe(getComputedStyle(lignes[0].querySelector('.libelle')).color);
// Le fil abandonné et le jalon tiennent dans l'image.
// Le fil abandonné et le jalon tiennent dans l'image : le panneau défile
// jusqu'à la ligne abandonnée, sous « Reculer » qui reste en haut.
abandonnee.scrollIntoView({ block: 'nearest' });
await images(2);
for (const element of [abandonnee.querySelector('[data-pastille-instant="abandonne"]'), ligne(courante).querySelector('[data-pastille-instant="jalon"]')]) {
expect(entiereDansLaFenetre(element), texteDe(element)).toBe(true);
}