Bilan du match : page, courbe des chances de gagner le match, listes et accès
Page #/matchs/<id>/bilan (en-tête, courbe continue lue au doigt, partie par partie, jeu, videau, moment décisif, décision à revoir, export SGF, prompt). Un match tient en une ligne dans Mes parties et la progression ; le bilan et l'analyse d'une partie de match y renvoient. Test navigateur d'un match en 5 points remonté de 0–4. ADR 0007 et 0013 amendés, plan clos. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
68664dc3f7
commit
3b0107af1b
+17
-4
@@ -23,10 +23,15 @@
|
||||
# progression gardée), captures dans build/browser-shots/lecons/. La
|
||||
# progression (tests/browser/progression.mjs : cas vide, trois parties, courbe
|
||||
# égale aux taux des bilans, ligne de l'accueil, « Créer des exercices »),
|
||||
# captures dans build/browser-shots/progression/.
|
||||
# captures dans build/browser-shots/progression/. Le bilan d'un match entier
|
||||
# (tests/browser/match-bilan.mjs : un match en 5 points avec dés imposés, où
|
||||
# le joueur remonte après avoir été mené ; courbe continue, bilan, analyse,
|
||||
# « Mes parties », export SGF, prompt), captures dans
|
||||
# build/browser-shots/match-bilan/.
|
||||
#
|
||||
# BROWSERS=chromium et SCRIPTS=accueil (ou play, match, maitre, bilan,
|
||||
# prompts, nouvelle-partie, retours-joueurs, lecons, progression) restreignent le test.
|
||||
# prompts, nouvelle-partie, retours-joueurs, lecons, progression, match-bilan)
|
||||
# restreignent le test.
|
||||
#
|
||||
# Outils : l'image de Playwright (navigateurs) et le paquet playwright,
|
||||
# installé une fois par npm dans build/browser-tools/ (réseau nécessaire la
|
||||
@@ -39,7 +44,7 @@ cd "$(dirname "$0")/.."
|
||||
image="${PLAYWRIGHT_IMAGE:?lancer via make test-browser}"
|
||||
browsers="${BROWSERS:-chromium firefox}"
|
||||
# Les scripts à lancer (tests/browser/<nom>.mjs), tous par défaut.
|
||||
scripts="${SCRIPTS:-play accueil match maitre bilan prompts nouvelle-partie retours-joueurs lecons progression}"
|
||||
scripts="${SCRIPTS:-play accueil match maitre bilan prompts nouvelle-partie retours-joueurs lecons progression match-bilan}"
|
||||
|
||||
unset MAKEFLAGS MFLAGS MAKELEVEL
|
||||
make -s package >/dev/null
|
||||
@@ -78,7 +83,8 @@ rm -rf build/browser-shots
|
||||
mkdir -p build/browser-shots
|
||||
cp tests/browser/play.mjs tests/browser/accueil.mjs tests/browser/match.mjs tests/browser/recette.mjs \
|
||||
tests/browser/maitre.mjs tests/browser/bilan.mjs tests/browser/prompts.mjs tests/browser/nouvelle-partie.mjs \
|
||||
tests/browser/retours-joueurs.mjs tests/browser/lecons.mjs tests/browser/progression.mjs "$tools/"
|
||||
tests/browser/retours-joueurs.mjs tests/browser/lecons.mjs tests/browser/progression.mjs \
|
||||
tests/browser/match-bilan.mjs "$tools/"
|
||||
status=0
|
||||
for browser in $browsers; do
|
||||
# Réseau de l'hôte : le site est sur 127.0.0.1. Le service worker
|
||||
@@ -155,5 +161,12 @@ for browser in $browsers; do
|
||||
-v "$PWD/$tools:/tools" -v "$PWD/build/browser-shots:/shots" -w /tools "$image" \
|
||||
node progression.mjs "http://localhost:$port/" "$browser" /shots || status=1
|
||||
fi
|
||||
if [[ " $scripts " == *" match-bilan "* ]]; then
|
||||
# Le bilan d'un match entier (étape 1l) ; captures dans
|
||||
# build/browser-shots/match-bilan/.
|
||||
docker run --rm --init --ipc=host --network host --user "$(id -u):$(id -g)" -e HOME=/tmp \
|
||||
-v "$PWD/$tools:/tools" -v "$PWD/build/browser-shots:/shots" -w /tools "$image" \
|
||||
node match-bilan.mjs "http://localhost:$port/" "$browser" /shots || status=1
|
||||
fi
|
||||
done
|
||||
exit "$status"
|
||||
|
||||
Reference in New Issue
Block a user