-
-
Notifications
You must be signed in to change notification settings - Fork 519
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
Hooks - Edit & add java and javascript examples #56
Conversation
@jaysonesmith - Would you please have a look at the Ruby text & examples to see if they're still up to date? (esp. the Tagged Hooks) and suggest corrections as needed? |
content/cucumber/hooks.md
Outdated
There is no association between where a Hook is defined and which Scenario or Step it is run for. | ||
But if you want more fine grained control, you can use Tagged Hooks (see below). | ||
There is no link between where a Hook is defined and which Scenario or Step it is run for. | ||
If you want more fine grained control, you can use [Tagged Hooks](#tagged-hooks). |
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.
fine grained control
=> fine-grained control
content/cucumber/hooks.md
Outdated
|
||
## Scenario hooks | ||
|
||
`Before` hooks will be run before the first Step of each Scenario. | ||
They are run in the same order they are registered. | ||
`Before` hooks will be run before the first Step of each Scenario. They will run in the **same order** in which they are registered. |
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.
It seems that you want to avoid the indirectness of the expression will be run
.
The first sentence of this paragraph still uses that turn of phrase.
content/cucumber/hooks.md
Outdated
``` | ||
|
||
{{% text "javascript" %}} | ||
Hooks are used for setup and teardown the environment before and after each scenario. |
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.
for setup and teardown the environment
=> for setup and teardown of the environment
content/cucumber/hooks.md
Outdated
``` | ||
|
||
See more documentation on [tag expressions](https://docs.cucumber.io/tag-expressions/). |
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.
Is this link meant to be a local relative link?
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.
Atm it's not; perhaps it should be? (i.e. the info on Tag Expressions should be added to these docs)
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 repository has source code for a Web site which is not currently officially live, is it?
content/cucumber/hooks.md
Outdated
|
||
## Global Hooks | ||
|
||
{{% text "ruby" %}} |
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.
A note on the paragraph after this {{% text "ruby" %}}
annotation: Can we somehow get rid of the "just" in that sentence?
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.
The addition of these changes ease navigation for the reader who's interested in one language: that's a great improvement.
Thanks for the review @olleolleolle ! |
content/cucumber/hooks.md
Outdated
@@ -260,7 +260,7 @@ defineSupportCode(function({After, Before}) { | |||
}); | |||
``` | |||
|
|||
See more documentation on [tag expressions](https://docs.cucumber.io/tag-expressions/). | |||
See more documentation on [tag expressions](https:/tag-expressions/). |
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.
Oh, the link got wonky (non-local)
Review document, add polyglot to frontmatter, add examples for java and javascript, as well as NOT tag. Js examples taken from cucumber-js documentation on github (https://github.com/cucumber/cucumber-js/blob/2.x/docs/support_files/hooks.md), java examples inspired by examples in blogs / on StackOverflow.
Tested by running locally and reading Hooks page for Java/Javascript/Ruby, to make sure page is readable considering text & examples marked for specific languages.
Note: a few js examples are still marked "TODO" inline. As I don't use js myself, I'm not sure what would be the best examples to put for these particular examples. Do note there are plenty of js examples provided. I'm open to suggestions here.