WOD ponctuel proposé par l'IA et records par WOD (lot 4c)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
06bd91d797
commit
7dc106837b
@@ -414,15 +414,18 @@ function check(scheme, cond, msg) {
|
||||
const wodLink = await page.evaluate(async () => {
|
||||
const { store } = await import("./main.js");
|
||||
const program = structuredClone(store.getState().program);
|
||||
program.sessions.push({ key: "W", name: "Mini Fran", format: { type: "fortime", capMinutes: 2 }, warmup: [],
|
||||
program.sessions.push({ key: "J1", oneOff: true, name: "Mini Fran", format: { type: "fortime", capMinutes: 2 }, warmup: [],
|
||||
exercises: [{ ref: "barbell-thruster", sets: 1, reps: "21-15-9", rest: 0, note: "RX 43 kg / 29 kg" }, { ref: "kipping-pull-up", sets: 1, reps: "21-15-9", rest: 0 }] });
|
||||
return "#import-json=" + encodeURIComponent(JSON.stringify({ program, reason: "Un WOD pour essayer." }));
|
||||
});
|
||||
await go(wodLink);
|
||||
await button("Adopter").click();
|
||||
await settle();
|
||||
await go("#/seance/W");
|
||||
ok(await page.locator(".wod-format__label").textContent() === "For Time · cap 2 min", "WOD : format affiché");
|
||||
await go("#/");
|
||||
ok(await page.getByRole("heading", { name: /WOD proposé/ }).isVisible(), "WOD ponctuel : proposé sur l'accueil");
|
||||
await page.getByRole("link", { name: /Mini Fran/ }).click();
|
||||
await settle();
|
||||
ok(page.url().endsWith("#/seance/J1") && await page.locator(".wod-format__label").textContent() === "For Time · cap 2 min", "WOD : format affiché");
|
||||
ok(await page.locator(".wod-move").count() === 2, "WOD : deux mouvements");
|
||||
await button("Terminer la séance").click();
|
||||
ok(/temps/.test(await page.locator(".status").textContent() ?? ""), "WOD : score exigé avant d'enregistrer");
|
||||
@@ -441,6 +444,10 @@ function check(scheme, cond, msg) {
|
||||
ok(page.url().endsWith("#/bravo"), "WOD : séance enregistrée");
|
||||
await go("#/historique");
|
||||
ok(await page.getByText(`WOD · ${wodTime} · Scaled`).first().isVisible(), "WOD : score dans l'historique");
|
||||
await go("#/");
|
||||
ok(await page.getByRole("heading", { name: /WOD proposé/ }).count() === 0, "WOD ponctuel fait : plus proposé");
|
||||
await go("#/analyses");
|
||||
ok(await page.getByText(`Record ${wodTime} · Scaled`).isVisible(), "analyses : record du WOD");
|
||||
|
||||
// ---- réinitialisation --------------------------------------------------------------
|
||||
await go("#/donnees");
|
||||
|
||||
Reference in New Issue
Block a user