-
-
Notifications
You must be signed in to change notification settings - Fork 149
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
fix(cypress): Merge all steps of a scenario into a single test. #44
Conversation
BREAKING CHANGE: each scenario is implemented as a single test now. We lose the ability to know exactly which step fails within a scenario
Thanks @BenoitAverty ! I was hoping for the cypress-io/cypress#686 to happen soon. It might. In: cypress-io/cypress#1473 @brian-mann says but it's hard to say when is 3.0 supposed to come out. Meanwhile, it would be great if you could fix the linting issue (./node_modules/.bin/eslint --fix) so we can see what happens with the tests. There is a chance they might work.. all in all if we could make it meanwhile the way you propose, without breaking tests for people that already use this - I think it might be the way to go |
Ok, maybe it's going to be sooner or later based on this tweet: |
Awesome,glad you're considering it. cypress-io/cypress#686 would make it way better, but it looks like a big proposal so I'm not sure it'll come up fast enough. In any case, i'll fix the lint issue tomorrow and see if I can't tackle the beforeEach task. Thanks ! |
Cool. As I thought, the tests just passed which is great - meaning, this would be backward compatible change for the most part. Two things:
I'm warming up to this approach for the time being if we are able to iron out the remaining weirdnesses Thanks so much for your help :) |
I think I'm pretty much finished with the changes. I diffed the report from jest with the one from master and made sure it is what I expected : the steps have disappeared but the scenario names themselves should be the same. I have looked around the code and I didn't find other problems but I'll let you do your review. With this PR, I should be able to use cypress and gherkin to make my QA team happy. Assuming you decide to merge this, I'll try to find the time to get back the steps failures once cypress-io/cypress#686 is ready. |
Here's the diff between the reports before/after |
It has become useless since we don't execute steps as individual tests anymore. It will become useful again when cypress allows to control state clearing and we can get steps as tests again.
Thanks again. Looks good. I will update the docs and publish a new, major version tomorrow. |
Thanks a lot! |
So is this feature now released with the latest version? If so, how can I see this kind of report? |
@badeball |
This is a proof of concept / illustration regardin the issue #43 . It is not meant to be merged right now or as-is, but this issue may force me to abandon cypress so i'd like this proposal to be considered.
I've put a cy.log() command to mark the start of each step, but this is not as good as before wrt reporting. Once cypress-io/cypress#686 is implemented, it should be possible to go back to separate tests by controlling the state clearing within a scenario. In the meantime, I think this is the only way to use gherkin + cypress in my use case (keep state between tests), and it's very likely that other people will run into the same issue.