Skip to content
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

Can not generate the suite part file when a step contains some special characters #257

Closed
Stephane99 opened this issue Jul 21, 2022 · 1 comment

Comments

@Stephane99
Copy link

Hi,
I have an error when trying to generate the suite part file for a feature with a step that contains a regular expression.

The step is:

And the document property "String property" displays a Value-must-match-the-validation-rule error message with the rule "^[A-Z]{3}\\d{5}\$"

The last part is no longer accepted now in version 3.0.0-rc16.
It is accepted with the previous version 3.0.0-rc9.

Here is the error in log:

[SEVERE] flutter_gherkin:gherkin_test_suite on integration_test/gherkin/suites/workflow/workflow_finalize_and_force_transitions_test.dart:
An error `FormatterException` occurred while formatting the generated source for
  `asset:aodocsmobile/integration_test/gherkin/suites/workflow/workflow_finalize_and_force_transitions_test.dart`
which was output to
  `integration_test/gherkin/suites/workflow/workflow_finalize_and_force_transitions_test.gherkin_tests.g.part`.
This may indicate an issue in the generator, the input source code, or in the
source formatter.
Could not format because the source could not be parsed:

line 10237, column 153 of .: Expected an identifier.
      ╷
10237 │     name: 'And the document property "String property" displays a Value-must-match-the-validation-rule error message with the rule "^[A-Z]{3}\\\\d{5}\\$"',
      │                                                                                                                                                         ^
      ╵

A second (non-blocking) remark, the name of the dart file in error is not the correct one.
The feature file containing the step in error is "string_properties_edition_with_validation_rules", not "workflow_finalize_and_force_transitions_test".

@Stephane99 Stephane99 changed the title Can not generate the suite part file when a step contains some regex characters Can not generate the suite part file when a step contains some special characters Jul 22, 2022
jonsamwell added a commit that referenced this issue Jul 25, 2022
  - Fix #256 - Ensure all exceptions generated when running a step are logged
  - Fix #253 - Ensure features with descriptions that span more than one line are parsed correctly
  - Fix #252 - Ensure all async code is awaited
  - When taking a screenshot on the web use the render element rather than relying on native code that does not work
@jonsamwell
Copy link
Owner

Fixed in 3.0.0-rc.17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants