diff --git a/README.md b/README.md index a311aa3..97c36fe 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,12 @@ npm install npm test ``` +## Bundle feature files before running + +``` +npm run test:all +``` + # Tags usage ### Tagging tests @@ -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 ``` diff --git a/cypress.json b/cypress.json index db024fd..bef927c 100644 --- a/cypress.json +++ b/cypress.json @@ -1,3 +1,4 @@ { - "ignoreTestFiles": "*.js" + "ignoreTestFiles": "*.js", + "testFiles": "**/*.{feature,features}" } diff --git a/cypress/integration/All.features b/cypress/integration/All.features new file mode 100644 index 0000000..e69de29 diff --git a/cypress/integration/socialNetworks/Facebook.feature b/cypress/integration/socialNetworks/Facebook.feature index cb1ff91..cbe0f22 100644 --- a/cypress/integration/socialNetworks/Facebook.feature +++ b/cypress/integration/socialNetworks/Facebook.feature @@ -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 diff --git a/cypress/integration/socialNetworks/Facebook/different.js b/cypress/integration/socialNetworks/Facebook/different.js index 78ffb21..39c2a1d 100644 --- a/cypress/integration/socialNetworks/Facebook/different.js +++ b/cypress/integration/socialNetworks/Facebook/different.js @@ -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"); }); diff --git a/package.json b/package.json index f49d7ca..490eaac 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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.14.3" }, "cypress-cucumber-preprocessor": { "nonGlobalStepDefinitions": true