codeceptjs / codeceptjs/CodeceptJS

BDD one step per feature (filtering steps per feature)

Aperta
#1,761 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
4.2k
Fork
757
Merge medio
2g 9h
PR unite (30g)
16

Descrizione

#### 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?

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.