Skip to content

Instantly share code, notes, and snippets.

@vincentchalamon
Created December 9, 2019 14:26
Show Gist options
  • Save vincentchalamon/7703074eadc57539281e83e93e3cbe65 to your computer and use it in GitHub Desktop.
Save vincentchalamon/7703074eadc57539281e83e93e3cbe65 to your computer and use it in GitHub Desktop.
Cypress.io: ignore Symfony debug requests like /_wdt
Cypress.Server.defaults({
whitelist: xhr => {
return (new RegExp(`^${Cypress.config().baseUrl}/_`.replace('/', '\/'))).test(xhr.url)
|| /\.(jsx?|html|css)(\?.*)?$/.test(xhr.url);
}
});
@benjamin-schneider
Copy link

Since Cypress 5, the cy.server() whitelist option has been renamed to ignore to more closely reflect its behavior.
https://docs.cypress.io/guides/references/changelog#5-0-0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment