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

Step format inconsistency #53

Closed
jromero opened this issue Nov 23, 2016 · 3 comments
Closed

Step format inconsistency #53

jromero opened this issue Nov 23, 2016 · 3 comments

Comments

@jromero
Copy link
Contributor

jromero commented Nov 23, 2016

First off, I want to say thank you for the work put into this already.

We initially had our own Http Steps implementations and moved to cuke-rest for the number of features provided out of the box. One of our challenges in moving to this library were in part the inconsistencies when writing a step.

What I mean by this are the following:

  • Some steps use double quotes, others don't
  • Some steps use a colon (:) to denote it accepts a Docstrings

I know it seems minor but a major part of our use of cucumber/guerkin is to make it externally presentable. Also, without proper IDE support it becomes a nightmare to remember nuances.

Examples:

Quotes

And content type is "application/json"
vs
And header Location is not empty

Docstrings

And request body:
"""
{
  "something": "value"
}
"""

vs

And response contains properties from json
"""
{
  "id": 1,
  "userId": "u1",
  "sku": "6mszh9v1sv",
  "store": "apple",
  "storeTransactionId": "t1",
  "status": "current"
}
"""
``
@AlexeyBuzdin
Copy link
Contributor

Hi Javier, thank for the input, really appreciate your kind words. Regarding the problem, yeap, we've spotted that inconsistency awhile back, even did some enhancements on it, but the biggest problem right now is that we've "been used to this" and it hard to spot places of inconsistencies.

Would be great if you could send a Pull-Request with your view of fixing the Step definition inconsistency, so we could compare the ideas.

@jromero
Copy link
Contributor Author

jromero commented Nov 28, 2016

@AlexeyBuzdin Finally had some time to create the PR. Let me know what you think. I'm also willing to add more tests to the sample to cover more steps but I wanted to do that after some initial feedback.

@AlexeyBuzdin
Copy link
Contributor

Looks good for me. Only thing, could you please tell when does the pattern != null is needed? @IgorGursky what do you think?

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