Skip to content

Commit 102f4b8

Browse files
committed
added integration tests
1 parent a44425c commit 102f4b8

10 files changed

+981
-118
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,7 @@ typings/
5959

6060
# next.js build output
6161
.next
62+
63+
test/integration/node_modules
64+
test/integration/output
65+

.travis.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
language: node_js
22
node_js:
33
- 12
4+
before_script:
5+
- cd test/integration && npm install
46
script:
57
- npm test
8+
- npm test-integration

README.md

+22-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ Usage:
1515
const { setHeadlessWhen } = require('@codeceptjs/configure');
1616

1717
// enable headless only if environment variable HEADLESS exist
18+
// Use it like:
19+
//
20+
// HEADLESS=true npx codeceptjs run
1821
setHeadlessWhen(process.env.HEADLESS);
1922

20-
// or enable headless on CI
21-
setHeadlessWhen(process.env.CI);
22-
2323
exports.config = {
2424
helpers: {
2525
// standard config goes here
@@ -67,6 +67,25 @@ exports.config = {
6767

6868
```
6969

70+
### setWindowSize
71+
72+
Universal way to set a browser window size. For Puppeteer this launches Chrome browser with a specified width and height dimensions without changing viewport size.
73+
74+
Usage: `setWindowSize(width, height)`.
75+
76+
```js
77+
// in codecept.conf.js
78+
const { setWindowSize } = require('@codeceptjs/configure');
79+
80+
setWindowSize(1600, 1200);
81+
82+
exports.config = {
83+
helpers: {
84+
Puppeteer: {}
85+
}
86+
}
87+
```
88+
7089
## Contributing
7190

7291
Please send your config hooks!

0 commit comments

Comments
 (0)