Skip to content

Cy.visit() fails to load data from any web address, local or otherwise #21296

Discussion options

You must be logged in to vote

I did find a solution. As it turns out, cy.visit() does not work in my app's current test suite configuration. Our command runs yarn run test:unit:cy which opens cypress in unit testing mode?

To sidestep this, I set up a new make command to run yarn run cypress open, where none of the unit test will run apparently, but cy.visit() runs quite happily.

Further, for anyone who's app runs in Tauri, you'll have to expect an exception to be thrown about window.__TAURI_IPC__ is not a function.

Adding this to the top of the integration test file or a helper file should keep the test from failing outright to the uncaught exception:

Cypress.on('uncaught:exception', (err, runnable) => {
  // we expec…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by OjGrooms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant