Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gherking/gpc-scenario-numbering
The ScenarioNumbering precompiler is responsible for adding an index to all scenarios and scenario outlines.
https://github.com/gherking/gpc-scenario-numbering
cucumber feature-file gherkin gherking gpc hacktoberfest precompiler typescript
Last synced: 1 day ago
JSON representation
The ScenarioNumbering precompiler is responsible for adding an index to all scenarios and scenario outlines.
- Host: GitHub
- URL: https://github.com/gherking/gpc-scenario-numbering
- Owner: gherking
- License: mit
- Created: 2019-11-03T20:42:27.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-13T04:30:11.000Z (5 months ago)
- Last Synced: 2024-11-07T14:02:51.307Z (8 days ago)
- Topics: cucumber, feature-file, gherkin, gherking, gpc, hacktoberfest, precompiler, typescript
- Language: Gherkin
- Homepage: https://gherking.github.io/gpc-scenario-numbering/
- Size: 103 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gpc-scenario-numbering
![Downloads](https://img.shields.io/npm/dw/gpc-scenario-numbering?style=flat-square) ![Version@npm](https://img.shields.io/npm/v/gpc-scenario-numbering?label=version%40npm&style=flat-square) ![Version@git](https://img.shields.io/github/package-json/v/gherking/gpc-scenario-numbering/master?label=version%40git&style=flat-square) ![CI](https://img.shields.io/github/workflow/status/gherking/gpc-scenario-numbering/CI/master?label=ci&style=flat-square) ![Docs](https://img.shields.io/github/workflow/status/gherking/gpc-scenario-numbering/Docs/master?label=docs&style=flat-square)
The ScenarioNumbering precompiler is responsible for adding an index to all scenarios and scenario outlines.
## Example
```gherkin
@tag1
Scenario Outline: Test language ()
Given I am on Home page user
When language is choosen
Then I should be on Home page
And the title should be ""@tag2
Examples:
| language | title |
| EN | Welcome |
| FR | Bienvenue |Scenario: Test without tag
Given I am on Home page user
Then I should be on Home page
```
It will be modified to:
```gherkin
@tag1
Scenario Outline: 1. Test language ()
Given I am on Home page user
When language is choosen
Then I should be on Home page
And the title should be ""@tag2
Examples:
| language | title |
| EN | Welcome |
| FR | Bienvenue |Scenario: 2. Test without tag
Given I am on Home page user
Then I should be on Home page
```## Configuration
ScenarioNumbering accepts the following configuration:
| Option | Type | Description | Default |
|:------:|:----:|:------------|:--------|
| `format` | `String` | The format, how index should be added to the name of the scenario/scenairo outline. Possible tokens:
- `${name}` the original name
- `${i}` the index
## Other
This package uses [debug](https://www.npmjs.com/package/debug) for logging, use `gpc:scenario-numbering` :
```shell
DEBUG=gpc:scenario-numbering* gherking ...
```
For detailed documentation see the [TypeDocs documentation](https://gherking.github.io/gpc-scenario-numbering/).