codeceptjs / codeceptjs/CodeceptJS

BDD one step per feature (filtering steps per feature)

Đang mở
#1,761 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
4.2k
Fork
757
Merge trung bình
2 ngày 9 giờ
Pull request đã merge (30 ngày)
16

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.