Cypress retries commands and assertions automatically. Learn how to replace arbitrary cy.wait() calls with retryable queries and assertions, and where the mechanism stops working.
Cypress 'detached from DOM' failures are stale references, not missing elements. A cause table, ordered checks, and fixes that keep the query next to the action.
Learn how to use Cypress cy.session() to cache authentication state across tests, eliminate repeated UI logins, and keep your suite fast without hiding login regressions.
Cypress cy.session() can eliminate redundant logins, but only if you disable testIsolation. Learn the trade-offs, version requirements, and how to verify the cache works.
Fixed cy.wait() calls make Cypress suites slow and still flaky. Retry-ability, network aliases, and retrying assertions replace guesswork with deterministic waiting.
Stub XHR/fetch at the browser boundary with cy.intercept() to make UI tests deterministic — registering, verifying, and recovering from silent pass-through.
Decide when to stub API calls with cy.intercept() or hit the real endpoint with cy.request() in Cypress. A practical guide compares speed, reliability, maintenance, and contract validation, then shows concrete test snippets and how to measure trade‑offs.
Replace flaky waits with deterministic network control using Cypress cy.intercept(): stub responses, synchronize with aliases, and modify requests to cover error and slow-network states.
Cypress retries can stabilize a flaky CI pipeline — or hide real bugs. Here's how to configure run-mode-only retries, pair them with assertion-driven waits, and keep flake visible.