codeceptjs / codeceptjs/CodeceptJS

BDD one step per feature (filtering steps per feature)

Offen
#1,761 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
4.2k
Forks
757
Ø Merge
2 T. 9 Std.
Gemergte PRs (30 T.)
16

Beschreibung

#### What are you trying to achieve?

I would like to create multiples step files for my BDD. One step file per feature. It's more organized for me but if i have the same steps in different feature files I cant have two step files with the same steps. i would like to filter the steps by feature file

#### What do you get instead?

ex:
```feature
Feature: My first feature

Scenario: My first scenario
Give first given
When first when
Then first then

Scenario: My second scenario
Give first given
When second when
Then second then
```
```feature
Feature: My second feature

Scenario: My third scenario
Give first given
When second when
Then third then
```

filtering feature and scenario

```js
Feature('My first feature', () => {
Scenario('My first scenario',() => {
Give('first given')
When('first when')
Then('first then')
})
Scenario('My second scenario',() => {
Give('first given')
When('second when')
Then('second then')
})
})

Feature('My second feature', () => {
Scenario('My first scenario',() => {
Give('first given')
When('second when')
Then('third then')
})
})
```

or filtering feature only

```js
Feature('My first feature', () => {
Give('first given')
When('first when')
When('second when')
Then('first then')
Then('second then')
})

Feature('My second feature', () => {
Give('first given')
When('second when')
Then('third then')
})
```

or as is at now

```js
Give('first given')
When('first when')
When('second when')
Then('first then')
Then('second then')
Then('third then')
```

It's possible?

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.