diff --git a/e2e/calculator.spec.js b/e2e/calculator.spec.js index 4dd6c64..f7cc393 100644 --- a/e2e/calculator.spec.js +++ b/e2e/calculator.spec.js @@ -94,7 +94,12 @@ test("current values are subtracted from totals and kept during recalculation", await expect(tool.locator(".calculator-result strong")).toHaveAttribute("aria-label", "8"); await tool.getByRole("button", { name: "Enregistrer", exact: true }).click(); await tool.getByRole("button", { name: "Ajouter un calcul enfant Parent", exact: true }).click(); + // Le calcul enfant remplace le champ par l'éditeur à jetons, qui prend le focus à l'image suivante : sur une machine lente, + // saisir avant ce passage perdait la formule. + await expect(expression).toHaveAttribute("contenteditable", "true"); + await expect(expression).toBeFocused(); await expression.fill("base * 10"); + await expect(tool.locator(".calculator-result strong")).toHaveAttribute("aria-label", "80"); await subtractCurrent.click(); await current.fill("20"); await tool.getByLabel("Libellé", { exact: true }).fill("Child");