Skip to content

Instantly share code, notes, and snippets.

@paulbjensen
Created June 17, 2018 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulbjensen/659eac1c53bbbe68a0cdd5a50b2f1b7f to your computer and use it in GitHub Desktop.
Save paulbjensen/659eac1c53bbbe68a0cdd5a50b2f1b7f to your computer and use it in GitHub Desktop.
An example step definitions file for a Medium article
const { Given, When, Then } = require('cucumber');
Given('I am a registered user', function () {
// Write code here that turns the phrase above into concrete actions
return 'pending';
});
When('I login to the application', function () {
// Write code here that turns the phrase above into concrete actions
return 'pending';
});
When('I visit my settings', function () {
// Write code here that turns the phrase above into concrete actions
return 'pending';
});
When('I click on {string}', function (string) {
// Write code here that turns the phrase above into concrete actions
return 'pending';
});
When('I fill in {string} with {string}', function (string, string2) {
// Write code here that turns the phrase above into concrete actions
return 'pending';
});
When('I press {string}', function (string) {
// Write code here that turns the phrase above into concrete actions
return 'pending';
});
Then('I should be logged out of the application', function () {
// Write code here that turns the phrase above into concrete actions
return 'pending';
});
Then('I should see {string}', function (string) {
// Write code here that turns the phrase above into concrete actions
return 'pending';
});
Then('there shouldn\'t be any data for the user {string}', function (string) {
// Write code here that turns the phrase above into concrete actions
return 'pending';
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment