Skip to content

Commit f1c2f5e

Browse files
committed
fix(e2e): remove a:visible check from checkUrl
Some form pages have no visible links in #content (only buttons and inputs), causing checkUrl to timeout. Simplify to just #content visibility + click which is sufficient for hydration.
1 parent 7f2ddd5 commit f1c2f5e

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

packages/app/cypress/support/commands.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,9 @@ Cypress.Commands.add("clickRadio", (legendText, radioLabel) => {
5454

5555
Cypress.Commands.add("checkUrl", url => {
5656
cy.url().should("include", url);
57-
// Wait for Next.js hydration: #content must be visible and contain
58-
// at least one visible link, which proves React has mounted.
59-
// Note: we use "a:visible" instead of "a, button" because DSFR
60-
// breadcrumb buttons are hidden on desktop viewports.
57+
// Wait for Next.js hydration: #content must be visible, then click
58+
// to trigger reflow and confirm the page is interactive.
6159
cy.get("#content", { timeout: 30000 }).should("be.visible");
62-
cy.get("#content").find("a:visible", { timeout: 30000 }).first().should("exist");
6360
cy.get("#content").click({ force: true });
6461
});
6562

0 commit comments

Comments
 (0)