Route stubs, mocks, delays, offline mode. Lets QA cover error states, 3G simulation, and dependency outages without staging changes.
Step phrasings in this group
The book sidebar lists each individual step page under this group.
Given the URL "**\/api/users" returns the JSON:Stub a URL pattern with a JSON response body.
Given the URL "**\/api/login" returns status 401 with body "Unauthorized"Stub a URL pattern with a status code and plain-text body.
Given the URL "**\/analytics.js" is blockedBlock a URL pattern entirely (network failure simulation).
Given the URL "**\/api/**" is delayed by 1500 msDelay matching requests by N milliseconds (slow-network simulation).
Given the network is offline" or "*.png".`,
Given the network is onlineRestore network connectivity after the network is offline.
Given I start recording network requestsStart recording every outgoing request for later assertion.
Then a request to "**\/api/users" should have been madeAssert at least one request matching a URL pattern was recorded.
Then a GET request to "**\/api/users" should have been madeAssert at least one HTTP-method-specific request was recorded.
Then no request to "**\/tracking" should have been madeAssert NO request matching a URL pattern was recorded.