Skip to content

Commit 916505b

Browse files
authored
Merge branch 'master' into feat-puppeteer-send-basic-auth
2 parents 00325c4 + a40d8e2 commit 916505b

350 files changed

Lines changed: 15464 additions & 10256 deletions

File tree

Some content is hidden

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

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
test/data/output

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"import/no-unresolved": 0,
3838
"no-await-in-loop": 0,
3939
"arrow-body-style": 0,
40-
"no-loop-func": 0
40+
"no-loop-func": 0,
41+
"arrow-parens": 0
4142
}
4243
}
File renamed without changes.

CONTRIBUTING.md renamed to .github/CONTRIBUTING.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ To start you need:
88
2. Run `npm install` to install all required libraries
99
3. Do the changes.
1010
4. Add/Update Test (if possible)
11-
5. Update documentation
11+
5. Update documentation
1212
6. Commit and Push to your fork
1313
7. Make Pull Request
1414

@@ -20,7 +20,6 @@ node bin/codecept.js
2020

2121
To run examples:
2222

23-
2423
```
2524
node bin/codecept.js run -c examples
2625
```
@@ -30,9 +29,9 @@ Depending on a type of a change you should do the following.
3029

3130
## Helpers
3231

33-
Please keep in mind that CodeceptJS have **unified API** for WebDriverIO, Appium, Protractor, SeleniumWebdriver, Nightmare. Tests written using those helpers should be compatible at syntax level. However, some of helpers may contain unique methods. That happen. If, for instance, WebDriverIO have method XXX and SeleniumWebDriver doesn't, you can implement XXX inside SeleniumWebDriver using the same method signature.
32+
Please keep in mind that CodeceptJS have **unified API** for WebDriverIO, Appium, Protractor, Nightmare, Puppeteer, TestCafe. Tests written using those helpers should be compatible at syntax level. However, some of helpers may contain unique methods. That happens. If, for instance, WebDriverIO has method XXX and Nightmare doesn't, you can implement XXX inside Nightmare using the same method signature.
3433

35-
### Updating a WebDriverIO | SeleniumWebdriver | Nightmare
34+
### Updating a WebDriverIO | Nightmare
3635

3736
*Whenever a new method or new behavior is added it should be documented in a docblock. Valid JS-example is required! Do **not edit** `docs/helpers/`, those files are generated from docblocks in corresponding helpers! *
3837

@@ -75,7 +74,7 @@ http://localhost:8000/form/myexample
7574

7675
*Whenever a new method or new behavior is added it should be documented in a docblock. Valid JS-example is required! Do **not edit** `docs/helpers/`, those files are generated from docblocks in corresponding helpers! *
7776

78-
Protractor Helper extends SeleniumWebdriver. For non-protractor specific changes you will need to update SeleniumWebdriver helper instead. See section above.
77+
Protractor helper is based on [Protractor library](http://www.protractortest.org)
7978

8079
In case you do Protractor-specific change, please add a test:To run the test suite you need:
8180

@@ -115,15 +114,16 @@ Please try to add corresponding testcase to runner or unit.
115114
Documentation is stored in `/docs` directory in markdown format.
116115

117116
**Documentation for helpers is a part of a source code**.
118-
Whenever you need to update docs for a helper do it inside a .js file.
119117

120-
In order to generate new documentation from source code run the following command with [Robo](https://robo.li/):
118+
> **Whenever you need to update docs for a helper do it inside a .js file.**
119+
120+
After you updated docblock in JS file, generate markdown files with next command:
121121

122122
```
123-
robo docs:helpers
123+
npm run docs
124124
```
125125

126-
To update markdown documentation. Shared documentation for helpers are located in `docs/webapi/*.mustache`. Inside a docblock those files can be included like this:
126+
Documentation parts can be shared accross helpers. Those parts are located in `docs/webapi/*.mustache`. Inside a docblock those files can be included like this:
127127

128128
```js
129129
/**
@@ -134,6 +134,16 @@ To update markdown documentation. Shared documentation for helpers are located i
134134
}
135135
```
136136

137+
## Typings
138+
139+
Typings is generated in `typings/` directory via `jsdoc`
140+
141+
After you updated docblock in JS file, generate typing files with next command:
142+
143+
```
144+
npm run def
145+
```
146+
137147
## Testing
138148

139149
Whenever you implemented a feature/bugfix
@@ -191,7 +201,7 @@ docker-compose run --rm test-acceptance.protractor
191201

192202
#### Running against specific Node version
193203

194-
By default dockerized tests are run against node 8.9.1, you can run it against
204+
By default dockerized tests are run against node 12.10.0, you can run it against
195205
specific version as long as there is Docker container available for such
196206
version. To do that you need to build codecept's Docker image prior to running
197207
tests and pass `NODE_VERSION` as build argument.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
* CodeceptJS version:
2020
* NodeJS Version:
2121
* Operating System:
22-
* Protractor || WebDriverIO || Nightmare version (if related)
22+
* puppeteer || webdriverio || protractor || testcafe version (if related)
2323
* Configuration file:
2424

2525
```js
26-
# paste suite config here
26+
# paste config here
2727
```

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## Motivation/Description of the PR
2+
3+
Applicable helpers:
4+
5+
- [ ] Webdriver
6+
- [ ] Puppeteer
7+
- [ ] Nightmare
8+
- [ ] REST
9+
- [ ] Appium
10+
- [ ] Protractor
11+
- [ ] TestCafe
12+
13+
- Description of this PR, which problem it solves
14+
- A link to the corresponding issue (if applicable).
15+
16+
## Type of change
17+
18+
- [ ] Breaking changes
19+
- [ ] New functionality
20+
- [ ] Bug fix
21+
- [ ] Documentation changes/updates
22+
- [ ] Hot fix
23+
- [ ] Markdown files fix - not related to source code
24+
25+
## Checklist:
26+
27+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
28+
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
29+
- [ ] Tests have been added
30+
- [ ] Documentation has been added (Run `npm run docs`)
31+
- [ ] Lint checking (Run `npm run lint`)
32+
- [ ] Local tests are passed (Run `npm test`)

.github/workflows/main.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
on: [push]
2+
3+
jobs:
4+
test:
5+
runs-on: ubuntu-latest
6+
name: Check Tests
7+
steps:
8+
- uses: actions/checkout@v2
9+
with:
10+
fetch-depth: 0
11+
- uses: testomatio/check-tests@master
12+
with:
13+
framework: mocha
14+
tests: "./test/**/*_test.js"
15+
token: ${{ secrets.GITHUB_TOKEN }}
16+
has-tests-label: true

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ coverage
33
.vscode
44
coverage
55
site
6-
website/build
7-
website/wiki
6+
docs/.vuepress/dist
7+
docs/node_modules
8+
docs/wiki
9+
website
810
.idea
911
docs/build
1012
test/data/output

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
## 2.3.6
2+
3+
* Create better Typescript definition file through JSDoc. By @lemnis
4+
* `run-workers` now can use glob pattern. By @Ilrilan
5+
```js
6+
// Example:
7+
exports.config = {
8+
tests: '{./workers/base_test.workers.js,./workers/test_grep.workers.js}',
9+
}
10+
```
11+
* Added new command `npx codeceptjs info` which print information about your environment and CodeceptJS configs. By @jamesgeorge007
12+
* Fixed some typos in documantation. By @pablopaul @atomicpages @EricTendian
13+
* Added PULL_REQUEST template.
14+
* [Puppeteer][WebDriver] Added `waitForClickable` for waiting clickable element on page.
15+
* [TestCafe] Added support for remote connection. By @jvdieten
16+
* [Puppeteer] Fixed `waitForText` XPath context now works correctly. By @Heavik
17+
* [TestCafe] Fixed `clearField` clear field now awaits TestCafe's promise. By @orihomie
18+
* [Puppeteer] Fixed fails when executing localStorage on services pages. See #2026
19+
* Fixed empty tags in test name. See #2038
20+
121
## 2.3.5
222

323
* Set "parse-function" dependency to "5.2.11" to avoid further installation errors.

README.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
# CodeceptJS [![NPM version][npm-image]][npm-url] [![Build Status](https://travis-ci.org/Codeception/CodeceptJS.svg?branch=master)](https://travis-ci.org/Codeception/CodeceptJS) [![Join the chat at https://gitter.im/Codeception/CodeceptJS](https://badges.gitter.im/Codeception/CodeceptJS.svg)](https://gitter.im/Codeception/CodeceptJS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/1823c38c74e44724b5555e3641f72621)](https://www.codacy.com/app/DavertMik/CodeceptJS?utm_source=github.com&utm_medium=referral&utm_content=Codeception/CodeceptJS&utm_campaign=badger) [![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com)
1+
[<img src="https://img.shields.io/badge/slack-@codeceptjs-purple.svg?logo=slack">](https://join.slack.com/t/codeceptjs/shared_invite/enQtMzA5OTM4NDM2MzA4LWE4MThhN2NmYTgxNTU5MTc4YzAyYWMwY2JkMmZlYWI5MWQ2MDM5MmRmYzZmYmNiNmY5NTAzM2EwMGIwOTNhOGQ) [<img src="https://img.shields.io/badge/discourse-codeceptjs-purple">](https://codecept.discourse.group) [![NPM version][npm-image]][npm-url] [![Build Status](https://travis-ci.org/Codeception/CodeceptJS.svg?branch=master)](https://travis-ci.org/Codeception/CodeceptJS) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/1823c38c74e44724b5555e3641f72621)](https://www.codacy.com/app/DavertMik/CodeceptJS?utm_source=github.com&utm_medium=referral&utm_content=Codeception/CodeceptJS&utm_campaign=badger) [![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com)
22

3+
# CodeceptJS
34

45
Reference: [Helpers API](https://github.com/Codeception/CodeceptJS/blob/master/docs) | [Demo](https://github.com/Codeception/codeceptjs-demo)
56

6-
## Supercharged End 2 End Testing
7+
## Supercharged E2E Testing
78

89
CodeceptJS is a new testing framework for end-to-end testing with WebDriver (or others).
9-
It abstracts browser interaction to simple steps which is written from a user perspective.
10+
It abstracts browser interaction to simple steps that are written from a user perspective.
1011
A simple test that verifies the "Welcome" text is present on a main page of a site will look like:
1112

1213
```js
@@ -64,8 +65,7 @@ Move to directory where you'd like to have your tests (and codeceptjs config) st
6465
npx codeceptjs init
6566
```
6667

67-
to create and configure test environment. It is recommended to select WebDriverIO from the list of helpers,
68-
if you need to write Selenium WebDriver tests.
68+
to create and configure test environment. It is recommended to select WebDriverIO from the list of helpers, if you need to write Selenium WebDriver tests.
6969

7070
After that create your first test by executing:
7171

@@ -87,7 +87,7 @@ npx codeceptjs def .
8787

8888
Later you can even automagically update Type Definitions to include your own custom [helpers methods](docs/helpers.md).
8989

90-
Note that CodeceptJS requires Node.js version 6.11 or later.
90+
Note that CodeceptJS requires Node.js version `8.9.1+` or later.
9191

9292
## Usage
9393

@@ -263,6 +263,28 @@ Scenario('test some forms', (I, docsPage) => {
263263
});
264264
```
265265

266+
When using typescript, replace `module.exports` with `export` for autocompletion.
267+
268+
269+
## Contributing
270+
271+
- ### [Contributing Guide](https://github.com/Codeception/CodeceptJS/blob/master/.github/CONTRIBUTING.md)
272+
- ### [Code of conduct](https://github.com/Codeception/CodeceptJS/blob/master/.github/CODE_OF_CONDUCT.md)
273+
274+
275+
## Contributors
276+
277+
Thanks all to those who are and will have contributing to this awesome project!
278+
279+
[//]: contributor-faces
280+
<a href="https://github.com/DavertMik"><img src="https://avatars0.githubusercontent.com/u/220264?v=4" title="DavertMik" width="80" height="80"></a><a href="https://github.com/PeterNgTr"><img src="https://avatars0.githubusercontent.com/u/7845001?v=4" title="PeterNgTr" width="80" height="80"></a><a href="https://github.com/APshenkin"><img src="https://avatars1.githubusercontent.com/u/14344430?v=4" title="APshenkin" width="80" height="80"></a><a href="https://github.com/reubenmiller"><img src="https://avatars0.githubusercontent.com/u/3029781?v=4" title="reubenmiller" width="80" height="80"></a><a href="https://github.com/fabioel"><img src="https://avatars1.githubusercontent.com/u/9824235?v=4" title="fabioel" width="80" height="80"></a><a href="https://github.com/Vorobeyko"><img src="https://avatars3.githubusercontent.com/u/11293201?v=4" title="Vorobeyko" width="80" height="80"></a><a href="https://github.com/pablopaul"><img src="https://avatars1.githubusercontent.com/u/635526?v=4" title="pablopaul" width="80" height="80"></a><a href="https://github.com/tsuemura"><img src="https://avatars1.githubusercontent.com/u/17092259?v=4" title="tsuemura" width="80" height="80"></a>
281+
<a href="https://github.com/VikalpP"><img src="https://avatars2.githubusercontent.com/u/11846339?v=4" title="VikalpP" width="80" height="80"></a><a href="https://github.com/MercifulCode"><img src="https://avatars2.githubusercontent.com/u/1740822?v=4" title="MercifulCode" width="80" height="80"></a><a href="https://github.com/elukoyanov"><img src="https://avatars3.githubusercontent.com/u/11647141?v=4" title="elukoyanov" width="80" height="80"></a><a href="https://github.com/hubidu"><img src="https://avatars2.githubusercontent.com/u/13134082?v=4" title="hubidu" width="80" height="80"></a><a href="https://github.com/BorisOsipov"><img src="https://avatars0.githubusercontent.com/u/6514276?v=4" title="BorisOsipov" width="80" height="80"></a><a href="https://github.com/jploskonka"><img src="https://avatars3.githubusercontent.com/u/669483?v=4" title="jploskonka" width="80" height="80"></a><a href="https://github.com/martomo"><img src="https://avatars2.githubusercontent.com/u/1850135?v=4" title="martomo" width="80" height="80"></a><a href="https://github.com/denis-sokolov"><img src="https://avatars0.githubusercontent.com/u/113721?v=4" title="denis-sokolov" width="80" height="80"></a>
282+
<a href="https://github.com/lennym"><img src="https://avatars3.githubusercontent.com/u/117398?v=4" title="lennym" width="80" height="80"></a><a href="https://github.com/petehouston"><img src="https://avatars0.githubusercontent.com/u/9006720?v=4" title="petehouston" width="80" height="80"></a><a href="https://github.com/Holorium"><img src="https://avatars1.githubusercontent.com/u/10815542?v=4" title="Holorium" width="80" height="80"></a><a href="https://github.com/johnyb"><img src="https://avatars2.githubusercontent.com/u/86358?v=4" title="johnyb" width="80" height="80"></a><a href="https://github.com/jamesgeorge007"><img src="https://avatars2.githubusercontent.com/u/25279263?v=4" title="jamesgeorge007" width="80" height="80"></a><a href="https://github.com/jinjorge"><img src="https://avatars3.githubusercontent.com/u/2208083?v=4" title="jinjorge" width="80" height="80"></a>
283+
<a href="https://github.com/galkin"><img src="https://avatars3.githubusercontent.com/u/5930544?v=4" title="galkin" width="80" height="80"></a><a href="https://github.com/radhey1851"><img src="https://avatars2.githubusercontent.com/u/22446528?v=4" title="radhey1851" width="80" height="80"></a>
284+
<a href="https://github.com/nitschSB"><img src="https://avatars0.githubusercontent.com/u/39341455?v=4" title="nitschSB" width="80" height="80"></a><a href="https://github.com/abner"><img src="https://avatars1.githubusercontent.com/u/42773?v=4" title="abner" width="80" height="80"></a><a href="https://github.com/Akxe"><img src="https://avatars3.githubusercontent.com/u/2001798?v=4" title="Akxe" width="80" height="80"></a><a href="https://github.com/Kalostrinho"><img src="https://avatars0.githubusercontent.com/u/19229249?v=4" title="Kalostrinho" width="80" height="80"></a><a href="https://github.com/asselin"><img src="https://avatars2.githubusercontent.com/u/911250?v=4" title="asselin" width="80" height="80"></a><a href="https://github.com/xt1"><img src="https://avatars2.githubusercontent.com/u/3820037?v=4" title="xt1" width="80" height="80"></a>
285+
286+
[//]: contributor-faces
287+
266288
## License
267289

268290
MIT © [CodeceptJS Team](http://codecept.io)

0 commit comments

Comments
 (0)