-
Notifications
You must be signed in to change notification settings - Fork 111
Check if multiple tests using only a single cy.visit in before block produce code coverage #137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Is this issue stating that having a single cy.visit in the before() block for multiple it() tests won't produce the correct code coverage? |
Yup, if you have a single `cy.visit` in a `before` hook, the code coverage
is incorrect unfortunately
…On Wed, Mar 4, 2020 at 12:15 PM CalebGM ***@***.***> wrote:
Is this issue stating that having a single cy.visit in the before() block
for multiple it() tests won't produce the correct code coverage?
Because that's the issue I seem to be having. I have a single before()
block that does the visit then multiple tests that check for elements on
that page, but my coverage was very low. Changing the before() to a
beforeEach() greatly improves my code coverage but also makes my tests
slower since it's reloading the page for each it() block
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#137?email_source=notifications&email_token=AAQ4BJQHYRKNLY4A43GOSGTRF2EC5A5CNFSM4KVIP332YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENY75UI#issuecomment-594673361>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ4BJQG4ZJTVDIQRT46PF3RF2EC5ANCNFSM4KVIP33Q>
.
--
Dr. Gleb Bahmutov, PhD
Schedule video chat / phone call / meeting with me via
https://calendly.com/bahmutov
[email protected] @bahmutov <https://twitter.com/@bahmutov>
https://glebbahmutov.com/ https://glebbahmutov.com/blog
https://github.com/bahmutov
|
Yes that is unfortunate. Do you have any idea if it's planned to be fixed soon? |
No immediate plans unfortunately
…Sent from my iPhone
On Mar 4, 2020, at 12:32, CalebGM ***@***.***> wrote:
Yes that is unfortunate. Do you have any idea if it's planned to be fixed soon?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@CalebGM I fixed this with the following fork: danmaftei@45c1ff4 |
🎉 This issue has been resolved in version 1.13.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
or if the second test clobbers the coverage from the first one
I have seen this in cypress-io/cypress-realworld-app#115
The text was updated successfully, but these errors were encountered: