-
-
Notifications
You must be signed in to change notification settings - Fork 530
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
Update better-gherkin.md #873
base: main
Are you sure you want to change the base?
Conversation
Added an intermediate style between imperative and declarative
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check your editor as it seems as though some inconsistent spacing is being added.
content/docs/bdd/better-gherkin.md
Outdated
|
||
## A third style | ||
|
||
There is a style that is intermediate between these two. The exact values are specified in the scenario, but the way the user interacts with the system is not. This style uses stepdef tables with domain terms as the column headers. The step definitions can be reused for mulitple scenarios with different data in the table. In this example, the scenarios for free and paid subscribers use the same step defs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few minor things to fix:
- Check your formatter here as lots of extra spaces are being added.
- Use
step definitions
instead of stepdef mulitple
* typo
Also these technical items are known as data tables not step definition tables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made the changes as you suggested. Thanks for the corrections.
content/docs/bdd/better-gherkin.md
Outdated
| Title | For Subscription | | ||
| Free Article 1 | Free | | ||
| Paid Article 1 | Paid | | ||
And user is logged in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you're using a single table, maybe suffix it with as
i.e. And the user is logged in as
for both scenarios
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made the change
content/docs/bdd/better-gherkin.md
Outdated
And user is logged in | ||
| User Name | Password | Subscription | | ||
| [email protected] | validPassword123 | Paid | | ||
When articles are displayed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This step would then become redundant in both scenarios
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was split on whether the login should become a separate scenario or not. I was matching the data in the imperative style
There would at least need to be a step that said the logged user had a paid.free subscription. Keeping that as a data table emphasizes that Subscription is a domain term.
I could write a section on splitting scenarios, which might come after this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the sentences are good but it's likely you're missing the conjunction "the" in most/all of them (Possibly confusing if you're not a native speaker).
Also if you can remove the redundant steps we can get this merged.
Split off the login scenario from the display scenarios. The logon follows along with the first scenario on this page.
Add conjunctions to the scenarios.
I think this should meet what you asked for. Let me know if I am still missing something. Thanks. |
Hi @atdd-bdd Think there's still a couple of things to fix up. Missed your comment sorry |
Added an intermediate style between imperative and declarative
🤔 What's changed?
Added a third style between imperative and declarative
⚡️ What's your motivation?
It's good to have three perspectives on how to approach an issue. In many cases, the data in the scenario should be transparent. The third way allows for transparency, as well as reuse of the scenario in multiple contexts.
📋 Checklist: