Wait for the token editor to take focus before typing a child formula in the calculator e2e test
Adding a child calculation swaps the expression input for the token editor, which takes focus on the next frame.
On a slow CI runner the formula could be typed before that swap and get lost, leaving no result ("-" instead of 60).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
fc43444995
commit
ddd1b271dd
1 changed files with 5 additions and 0 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue