Skip to content

Commit f45f656

Browse files
authored
Merge pull request #129 from wvankuipers/feature/1.3.0
Release 1.3.0
2 parents 60e186f + 053c763 commit f45f656

File tree

109 files changed

+3356
-3401
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+3356
-3401
lines changed

.babelrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
presets: ['es2015']
2+
"presets": ["es2015"]
33
}

.codeclimate.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
engines:
22
eslint:
33
enabled: true
4-
channel: "eslint-3"
4+
channel: "eslint-4"
55

66
exclude_paths:
77
- "demo-app/"

.travis.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1-
notifications:
2-
email: false
1+
dist: trusty
32

43
language: node_js
54

5+
cache: yarn
6+
7+
notifications:
8+
email: false
9+
610
node_js:
711
- '4'
12+
- '5'
13+
- '6'
14+
- '7'
15+
- '8'
816

917
env:
1018
- CXX=g++-4.8

CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Changelog
22

3+
## [1.3.0] - T.B.D.
4+
### Added
5+
- More Node versions to Travis build
6+
- [Forever](https://www.npmjs.com/package/forever) for managing the `http-server` process
7+
8+
### Changed
9+
- Updated Chai, wdio-cucumber-framework & wdio-spec-reporter dependencies
10+
- Updated codebase to match new Cucumber 2 syntax & functionalities
11+
- Updated readme to reflect changes in the tags processing mechanism
12+
13+
### Fixed
14+
- Syntax issue in `.babelrc`
15+
16+
### Removed
17+
- No longer needed tagprocessor functionality
18+
19+
320
## [1.2.0] - 2017-07-12
421
### Added
522
- Rules:

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,10 @@ If you want to run only specific tests you can mark your features with tags. The
139139
Feature: ...
140140
```
141141

142-
To run only the tests with specific tag(s) use the `--tags=` parameter like so:
142+
To run only the tests with specific tag(s) use the `--cucumberOpts.tagExpression=` parameter like so:
143143

144144
```sh
145-
$ yarn run wdio -- --tags=@Tag,@AnotherTag
145+
$ yarn run wdio -- --cucumberOpts.tagExpression=@Tag,@AnotherTag
146146
```
147147

148148
You can add multiple tags separated by a comma
@@ -165,7 +165,7 @@ Scenario: ...
165165

166166
The predefined snippets allow you to do a lot of common things but you might need extra snippets which
167167
are better aligned with your aims. To do so you will find all step definitions in `./src/steps`. They
168-
are separated in `given`, `when` and `then`.
168+
are separated in `given`, `when` and `then`.
169169

170170
You define your snippet using regular expressions. This is pretty powerful as it allows you to create complex
171171
sentences with multiple options. Everything that's within `"([^"]*)?"` gets captured and appended to the

package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"homepage": "https://github.com/webdriverio/cucumber-boilerplate",
66
"scripts": {
77
"clean": "read -p \"Are you sure you want to clean the project? [y/n] \" REPLY; if [[ $REPLY =~ ^[Yy]$ ]]; then rm -R .git .github demo-app test .codeclimate.yml .travis.yml jest.json wdio.BUILD.conf.js src/features/**; fi",
8-
"local-webserver": "http-server ./demo-app -s",
8+
"local-webserver": "forever start -s ./node_modules/.bin/http-server ./demo-app -s",
99
"test": "npm run test:validate && npm run test:unit && npm run test:features",
10-
"test:features": "npm run local-webserver & (wdio wdio.BUILD.conf.js; wdio_ret=$?; kill $(lsof -t -i:8080); exit $wdio_ret)",
10+
"test:features": "npm run local-webserver & (wdio wdio.BUILD.conf.js; wdio_ret=$?; forever stopall; exit $wdio_ret)",
1111
"test:unit": "jest --config=jest.json",
1212
"test:validate": "eslint 'src/**/*.js' 'test/**/*.js!(setup.js)'"
1313
},
@@ -32,18 +32,19 @@
3232
"dependencies": {
3333
"babel-preset-es2015": "~6.24.0",
3434
"babel-register": "~6.26.0",
35-
"chai": "~4.1.0",
35+
"chai": "~4.1.2",
3636
"wdio-cucumber-framework": "~1.0.2",
3737
"wdio-phantomjs-service": "~0.2.2",
3838
"wdio-selenium-standalone-service": "~0.0.9",
39-
"wdio-spec-reporter": "~0.1.0",
39+
"wdio-spec-reporter": "~0.1.2",
4040
"webdriverio": "4.7.1"
4141
},
4242
"devDependencies": {
4343
"babel-polyfill": "~6.26.0",
4444
"eslint": "~4.6.0",
4545
"eslint-config-airbnb-base": "~12.0.0",
4646
"eslint-plugin-import": "~2.7.0",
47+
"forever": "~0.15.3",
4748
"http-server": "~0.10.0",
4849
"jest": "~21.0.0"
4950
}

src/features/pending.feature

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,4 @@ Feature: Pending scenario
55

66
Scenario: do somethimg
77
Given I open the site "/"
8-
# And ...
9-
# Then ...
10-
# And ...
8+
Then this will fail since this does not exist

src/steps/given.js

+26-23
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { defineSupportCode } from 'cucumber';
2+
13
import checkContainsAnyText from '../support/check/checkContainsAnyText';
24
import checkIsEmpty from '../support/check/checkIsEmpty';
35
import checkContainsText from '../support/check/checkContainsText';
@@ -19,109 +21,110 @@ import isVisible from '../support/check/isVisible';
1921
import openWebsite from '../support/action/openWebsite';
2022
import resizeScreenSize from '../support/action/resizeScreenSize';
2123

22-
module.exports = function given() {
23-
this.Given(
24+
25+
defineSupportCode(({ Given }) => {
26+
Given(
2427
/^I open the (url|site) "([^"]*)?"$/,
2528
openWebsite
2629
);
2730

28-
this.Given(
31+
Given(
2932
/^the element "([^"]*)?" is( not)* visible$/,
3033
isVisible
3134
);
3235

33-
this.Given(
36+
Given(
3437
/^the element "([^"]*)?" is( not)* enabled$/,
3538
isEnabled
3639
);
3740

38-
this.Given(
41+
Given(
3942
/^the element "([^"]*)?" is( not)* selected$/,
4043
checkSelected
4144
);
4245

43-
this.Given(
46+
Given(
4447
/^the checkbox "([^"]*)?" is( not)* checked$/,
4548
checkSelected
4649
);
4750

48-
this.Given(
51+
Given(
4952
/^there is (an|no) element "([^"]*)?" on the page$/,
5053
checkElementExists
5154
);
5255

53-
this.Given(
56+
Given(
5457
/^the title is( not)* "([^"]*)?"$/,
5558
checkTitle
5659
);
5760

58-
this.Given(
61+
Given(
5962
/^the element "([^"]*)?" contains( not)* the same text as element "([^"]*)?"$/,
6063
compareText
6164
);
6265

63-
this.Given(
66+
Given(
6467
/^the element "([^"]*)?"( not)* matches the text "([^"]*)?"$/,
6568
checkEqualsText
6669
);
6770

68-
this.Given(
71+
Given(
6972
/^the element "([^"]*)?"( not)* contains the text "([^"]*)?"$/,
7073
checkContainsText
7174
);
7275

73-
this.Given(
76+
Given(
7477
/^the element "([^"]*)?"( not)* contains any text$/,
7578
checkContainsAnyText
7679
);
7780

78-
this.Given(
81+
Given(
7982
/^the element "([^"]*)?" is( not)* empty$/,
8083
checkIsEmpty
8184
);
8285

83-
this.Given(
86+
Given(
8487
/^the page url is( not)* "([^"]*)?"$/,
8588
checkUrl
8689
);
8790

88-
this.Given(
91+
Given(
8992
/^the( css)* attribute "([^"]*)?" from element "([^"]*)?" is( not)* "([^"]*)?"$/,
9093
checkProperty
9194
);
9295

93-
this.Given(
96+
Given(
9497
/^the cookie "([^"]*)?" contains( not)* the value "([^"]*)?"$/,
9598
checkCookieContent
9699
);
97100

98-
this.Given(
101+
Given(
99102
/^the cookie "([^"]*)?" does( not)* exist$/,
100103
checkCookieExists
101104
);
102105

103-
this.Given(
106+
Given(
104107
/^the element "([^"]*)?" is( not)* ([\d]+)px (broad|tall)$/,
105108
checkDimension
106109
);
107110

108-
this.Given(
111+
Given(
109112
/^the element "([^"]*)?" is( not)* positioned at ([\d]+)px on the (x|y) axis$/,
110113
checkOffset
111114
);
112115

113-
this.Given(
116+
Given(
114117
/^I have a screen that is ([\d]+) by ([\d]+) pixels$/,
115118
resizeScreenSize
116119
);
117120

118-
this.Given(
121+
Given(
119122
/^I have closed all but the first (window|tab)$/,
120123
closeAllButFirstTab
121124
);
122125

123-
this.Given(
126+
Given(
124127
/^a (alertbox|confirmbox|prompt) is( not)* opened$/,
125128
checkModal
126129
);
127-
};
130+
});

0 commit comments

Comments
 (0)