fix(web-tests): scroll the highlighted technique into view before asserting

Same class of failure as the household-settings sources scenario earlier
this session: the steps section sits below the detail panel's
header/photo/description, off the fold of .app-content's own scroll — a
bare .should("be.visible") doesn't auto-scroll.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Nicolas 2026-08-20 14:53:04 +02:00
parent d0900ad7fd
commit 0619fafd28

View file

@ -113,7 +113,11 @@ Then("the URL should match the recipes list", () => {
});
Then("I should see the highlighted technique {string}", (text: string) => {
cy.contains(".step-tech-step", text).should("be.visible");
// The steps section sits below the panel's header/photo/description, off
// the fold of `.app-content`'s own scroll (see layout.cy.ts) — a bare
// `.should("be.visible")` doesn't auto-scroll, same fix as
// household-settings.feature's sources-section scenario.
cy.contains(".step-tech-step", text).scrollIntoView().should("be.visible");
});
When("I focus the highlighted technique {string}", (text: string) => {