-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add first Gherkin Feature and Step Definitions
- Loading branch information
Showing
7 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// cucumber.js | ||
let common = [ | ||
'features/**/*.feature', // Specify our feature files | ||
'--require-module ts-node/register', //typescript cucumber | ||
'--require ./features/step_definitions/**/*.ts', // Load step definitions | ||
].join(' '); | ||
|
||
module.exports = { | ||
default: common | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Feature: Add Car To Fleet | ||
Scenario: Add A BMW to the Fleet | ||
Given car is BMW model 1er | ||
When I add the car to the fleet | ||
Then an incomplete car should be added | ||
|
24 changes: 24 additions & 0 deletions
24
packages/be/features/step_definitions/AddCarToFleetSteps.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { binding, given, then, when } from "cucumber-tsflow"; | ||
|
||
@binding() | ||
class AddCarToFleetSteps { | ||
@given('car is BMW model 1er') | ||
public givenCarWithBrandAndModel (): string { | ||
// Write code here that turns the phrase above into concrete actions | ||
return 'pending'; | ||
} | ||
|
||
@when(/I add the car to the fleet/) | ||
public addsCarToFleet(): string { | ||
// Write code here that turns the phrase above into concrete actions | ||
return 'pending'; | ||
} | ||
|
||
@then(/an incomplete car should be added/) | ||
public thenIncompleteCarAdded(): string { | ||
// Write code here that turns the phrase above into concrete actions | ||
return 'pending'; | ||
} | ||
} | ||
|
||
export = AddCarToFleetSteps; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"compilerOptions": { | ||
"moduleResolution": "node", | ||
"experimentalDecorators": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters