- Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
npm: @cypress/react@cypress/react package issues@cypress/react package issues
Description
lazy-loaded components loaded in a webpack environment error out. The chunk is requested, but Cypress intercepts it and returns something like this:
<!doctype html> <html> <head> <meta charset="utf-8"> <title>component/BrazeIcon/src/integration_tests/0.BrazeIcon.test.tsx.js</title> </head> <body> <script type="text/javascript"> document.domain = 'localhost'; (function(parent) { var Cypress = window.Cypress = parent.Cypress; if (!Cypress) { throw new Error("Tests cannot run without a reference to Cypress!"); } return Cypress.onSpecWindow(window, [{"absolute":"/Users/gregory.beaver/Documents/GitHub/beacon-labs/integration-tests/cypress/support/index.js","relative":"cypress/support/index.js","relativeUrl":"/__cypress/tests?p=cypress/support/index.js"},{"absolute":"/Users/gregory.beaver/Documents/GitHub/beacon-labs/packages/BrazeIcon/src/integration_tests/0.BrazeIcon.test.tsx.js","relative":"../packages/BrazeIcon/src/integration_tests/0.BrazeIcon.test.tsx.js","relativeUrl":"/__cypress/tests?p=../packages/BrazeIcon/src/integration_tests/0.BrazeIcon.test.tsx.js"}]); })(window.opener || window.parent); </script> </body> </html>It would be interesting to see if the loader could be made smart enough to "know" this is a chunk and return as-is?
Metadata
Metadata
Assignees
Labels
npm: @cypress/react@cypress/react package issues@cypress/react package issues