-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
05d3ea0
commit 1ce5f44
Showing
10 changed files
with
69 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ switch (cucumberVersion) { | |
break; | ||
|
||
case 3: | ||
case 4: | ||
module.exports = eventListeners; | ||
break; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
let env = require('./environment.js'); | ||
|
||
exports.config = Object.assign({}, env, { | ||
cucumberOpts: { | ||
require: '../stepDefinitions/**/cucumber4Steps.js', | ||
tags: '', | ||
format: 'summary', | ||
strict: true, | ||
'format-options': '{"colorsEnabled": false}' | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Feature: Running Cucumber 4 with Protractor | ||
|
||
@cucumber4 | ||
Scenario: Using Cucumber 4 | ||
Given I go on "index.html" | ||
Then the title should equal "My AngularJS App" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const path = require('path'); | ||
const chai = require('chai'); | ||
const chaiAsPromised = require('chai-as-promised'); | ||
chai.use(chaiAsPromised); | ||
const expect = chai.expect; | ||
const {Given, Then} = require(path.join( | ||
__dirname, | ||
'..', | ||
'..', | ||
'..', | ||
'lib', | ||
'cucumberLoader' | ||
)).load(); | ||
|
||
Given('I go on {string}', function(url) { | ||
return browser.get(url); | ||
}); | ||
|
||
Then(/the title should equal "([^"]*)"$/, function(text) { | ||
return expect(browser.getTitle()).to.eventually.equal(text); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
let util = require('./test_util'); | ||
|
||
describe('cucumber version 4', function() { | ||
it('runs successful features', function() { | ||
return util | ||
.runOne( | ||
'test/cucumber/conf/cucumber4Conf.js --cucumberOpts.tags @cucumber4' | ||
) | ||
.cucumberVersion4() | ||
.expectExitCode(0) | ||
.expectOutput('1 scenario (1 passed)') | ||
.expectOutput('2 steps (2 passed)') | ||
.expectErrors([]) | ||
.run(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters