test(recipe-form): corrige la visibilité flaky de l'étape d'ingrédient préchargé
Le step Gherkin partagé « the recipe should include the ingredient »
utilisait un `.should("be.visible")` nu sur `.ingredient-row__name`.
Sur le formulaire d'édition de recette, la liste d'ingrédients peut se
trouver sous le pli du scroll propre à `.app-content` (Nom/Description/
Photo/Portions/Visibilité/Régimes viennent avant) — un `.should`
seul ne scrolle pas automatiquement, contrairement aux commandes
d'interaction (`.click()`/`.check()`).
Repéré comme bug pré-existant et hors périmètre lors de la vérification
de #29/#30 (voir la note dans tech-step-metadata-editor-redesign.md).
Même correctif que « I should see the highlighted technique »
(common.steps.ts) et « I should see the highlighted temperature »
(recipes.ts) : `.scrollIntoView()` avant l'assertion.
Reproduit avant correctif (recipe-form.feature, scénario « Preloads an
existing recipe's ingredients when editing »: 4/5 puis 5/5 après le
correctif). Suite e2e complète: 27/28 fichiers verts (la seule
exception, admin-monitoring.cy.ts, est un flake distinct et
sans rapport, signalé séparément).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
bd607b17f3
commit
3b78582d29
1 changed files with 6 additions and 1 deletions
|
|
@ -180,7 +180,12 @@ Then("the ingredient {string} should be visible in the picker", (name: string) =
|
|||
});
|
||||
|
||||
Then("the recipe should include the ingredient {string}", (name: string) => {
|
||||
cy.contains(".ingredient-row__name", name).should("be.visible");
|
||||
// Same reasoning as "I should see the highlighted technique" above: on the
|
||||
// recipe-edit form the ingredients list can sit below the fold of
|
||||
// `.app-content`'s own scroll (Nom/Description/Photo/Portions/Visibilité/
|
||||
// Régimes all come first), and a bare `.should("be.visible")` doesn't
|
||||
// auto-scroll — only interaction commands like `.click()`/`.check()` do.
|
||||
cy.contains(".ingredient-row__name", name).scrollIntoView().should("be.visible");
|
||||
});
|
||||
|
||||
Then("there should be {int} ingredient rows", (count: number) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue