Skip to content

Add cypress-mock-latency plugin - #6735

Merged
jennifer-shehane merged 1 commit into
cypress-io:mainfrom
dhrusoni84:add-cypress-mock-latency
Jul 21, 2026
Merged

Add cypress-mock-latency plugin#6735
jennifer-shehane merged 1 commit into
cypress-io:mainfrom
dhrusoni84:add-cypress-mock-latency

Conversation

@dhrusoni84

Copy link
Copy Markdown
Contributor

Summary

Adds an entry for cypress-mock-latency to the Network & API Testing
section of the plugins list. The plugin adds a cy.mockLatency() command
that layers randomized delay ranges, named network presets (e.g.
3g-poor, satellite), and jitter spikes on top of cy.intercept(), plus
a cy.mockLatencyOffline() command for simulating a dropped connection.

Why

cy.intercept() supports a fixed response delay, but there's no built-in
way to simulate a realistic, variable network (randomized ranges, jitter
spikes, common named profiles) without writing that logic by hand in every
test suite. This plugin wraps that boilerplate into a single reusable
command so teams can test loading states, timeouts, and retry UX under
realistic flaky-network conditions with one line.

Closes #

Notes for reviewers

@netlify

netlify Bot commented Jul 19, 2026

Copy link
Copy Markdown

👷 Deploy request for cypress-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 6f3ca26

@CLAassistant

CLAassistant commented Jul 19, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@jennifer-shehane
jennifer-shehane merged commit 08edee5 into cypress-io:main Jul 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants