Sharing our challenges, mistakes, hacks, successes, opinions and news
This blog post tests an application that fetches new data every 30 seconds, but the test itself runs in milliseconds because it controls the application's clock and stubs the network responses. Note: you can find the source code in the cy.intercept recipe in the repository cypress-example-recipes. A
If at first you don't succeed, then dust yourself off and try again. Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â - American R&B singer Aaliyah (1979-2001) The modern Internet is built on retries. Software and hardware failures are normal and expected. Eve
Today, we're elevating the power and scope of Cypress' network handling capabilities with the introduction of the cy.intercept command in Cypress 6.0. One of the most powerful and beloved features of Cypress are easy network stubbing and spying APIs via cy.route and cy.server commands. These command
Modern web applications need to continue working when a network is unavailable, or at least show users the current network status. In this blog post, I will show how Cypress can simulate an offline network status during a test. Note: the source code for this blog post can be found in the "Offline" r
Let's take an application that makes an Ajax call to the browser to load a list of ... fruits. You can find this awesome and healthy application in Cypress Example Recipes under name "Stubbing window.fetch". Application Every time you visit an application you get five new fruits This application pre
Your application might be a layered cake of historical data. Often old records are missing pieces because at first the web application never asked for them, or never validated them. The current web application might be much stricter with its user inputs, never allowing incomplete data to be entered.
The Cypress Test Runner can "see" everything happening inside the web application under test: DOM elements, cookies, local storage items, location, etc. The Test Runner can also spy on and stub network requests the application is making to its backend API or even to the 3rd party APIs. This blog pos