diff --git a/apps/web/cypress/support/step_definitions/common.steps.ts b/apps/web/cypress/support/step_definitions/common.steps.ts index c74aac9..272a2ef 100644 --- a/apps/web/cypress/support/step_definitions/common.steps.ts +++ b/apps/web/cypress/support/step_definitions/common.steps.ts @@ -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) => {