I'm trying to generate cypress code coverage for iframe which is part of my application.
Cypress creates an object called __coverage__
for the instrumentation that is present in my iframe window(main content). But at the end of each spec, it shows the below message
Without an iframe, it's generating the report.
I followed this link https://github.com/cypress-io/code-coverage#instrument-your-application
I don't think adding an <iframe>
can affect the code coverage, since the counters in __coverage__
are counting lines of javascript code and not HTML.
To check it out, I downloaded the latest repo from code-coverage/tree/v3.10.0 and added an <iframe>
to one of the simple examples under /test-apps
.
The coverage report was still created even though there was now an iframe on the page.
If you can provide more details, preferably a repo I can check further - but as it stands, it seems it's not reproducible.
BTW Cypress v10 is used in the code-coverage repo (not yet visible/released on the Cypress repo).