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

Introduce Cucumber parameter type 'command' #941

Merged
merged 2 commits into from
Nov 15, 2024
Merged

Conversation

mvz
Copy link
Contributor

@mvz mvz commented Nov 15, 2024

Summary

Introduce Cucumber parameter type 'command' and use it

Details

This introduces a new Cucumber parameter type 'command', matching a string between backticks. It then uses this new parameter types to replace the old regular expression based step definitions. This allows more steps to use the Cucumber Expression syntax.

It also removes the need for python to be installed on of the scenarios that uses these step definitions, to ensure they're properly tested.

Motivation and Context

While working on #894, I noticed that the steps matching output from a particular command could not match against a command including quote characters. This change will make it easier to add an extra step definition to support that case. Update: It turns out matching is possible by using \. The present change is still an improvement, however.

How Has This Been Tested?

I ran the relevant scenarios with the updated step definitions.

Types of changes

  • Internal change (refactoring, test improvements, developer experience or update of dependencies)

Checklist:

N/A

mvz added 2 commits November 15, 2024 13:58
Using just a script that uses Ruby is enough to test this step.
This allows more steps to use the Cucumber Expression syntax.
@mvz mvz merged commit 6b05a86 into main Nov 15, 2024
18 checks passed
@mvz mvz deleted the command-parameter-type branch November 15, 2024 13:57
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

Successfully merging this pull request may close these issues.

1 participant