Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example for bundled features files #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ npm install
npm test
```

## Bundle feature files before running

```
npm run test:all
```

# Tags usage

### Tagging tests
Expand Down Expand Up @@ -39,7 +45,7 @@ Feature: The Facebook
@another-tag-to-include @some-other-tag
Scenario: Different kind of opening
Given I kinda open Facebook page
Then I am very happy
Then I am super happy

```

Expand Down
3 changes: 2 additions & 1 deletion cypress.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"ignoreTestFiles": "*.js"
"ignoreTestFiles": "*.js",
"testFiles": "**/*.{feature,features}"
}
Empty file.
2 changes: 1 addition & 1 deletion cypress/integration/socialNetworks/Facebook.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ Feature: The Facebook
@another-tag-to-include @some-other-tag
Scenario: Different kind of opening
Given I kinda open Facebook page
Then I am very happy
Then I am super happy
2 changes: 1 addition & 1 deletion cypress/integration/socialNetworks/Facebook/different.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ Given(`I kinda open Facebook page`, () => {
});

// This is the same step that we have in news/Google/different.js, but you don't have to worry about collisions!
Then(`I am very happy`, () => {
Then(`I am super happy`, () => {
cy.title().should("include", "Facebook");
});
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "Example of cypress with cucumber",
"main": "index.js",
"scripts": {
"test": "cypress run"
"test": "cypress run --spec \"**/*.feature\"",
"test:all": "cypress run --spec \"**/*.features\""
},
"repository": {
"type": "git",
Expand All @@ -23,7 +24,7 @@
"homepage": "https://github.com/TheBrainFamily/cypress-cucumber-example#readme",
"dependencies": {
"cypress": "^3.3.0",
"cypress-cucumber-preprocessor": "1.11.2"
"cypress-cucumber-preprocessor": "^1.15.0"
},
"cypress-cucumber-preprocessor": {
"nonGlobalStepDefinitions": true
Expand Down