-
Notifications
You must be signed in to change notification settings - Fork 114
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
[Bug] onBeforeRunFeature not being called in a specific case #278
Comments
This is interesting, we then have to keep track which scenario is the actual first scenario that is being ran. I will take a look at this, |
This is a bigger problem than I anticipated. We actually have 2 cases here, we have to check multiple things:
Bottom line, this is a bit more difficult to manage than I anticipated if I am honest. |
I have been thinking about a clean solution. The issue is also valid for the If you think that this issue is worth fixing and adding some logic in the generated code to determine the scenarios that will be run is a clean solution, I can submit a PR in the near future. |
Version: 3.0.0-rc.17
Hello,
First of all, I would like to thank you for the package.
The issue is related to calling reporters before running a feature using the following method:
flutter_gherkin/lib/src/flutter/runners/gherkin_integration_test_runner.dart
Line 126 in 7c8be5f
This method is called before running the first scenario, which is equivalent to calling it before the feature generally speaking.
But, what if the first scenario was ignored using a tag expression ?
In this case, the method onBeforeRunFeature will not be called.
The example using the integration_test package illustrates the issue:
For the first scenario, onBeforeRunFeature is called
flutter_gherkin/example_with_integration_test/integration_test/gherkin_suite_test.g.dart
Line 93 in 7c8be5f
But, for the second scenario, the method onBeforeRunFeature is not passed as an argument to it. As a consequence, onBeforeRunFeature cannot be called in any case.
It would be great to use another mechanism to detect the first scenario to run for a feature.
Thank you !
The text was updated successfully, but these errors were encountered: