You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/CONTRIBUTING.md
+20-10Lines changed: 20 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ To start you need:
8
8
2. Run `npm install` to install all required libraries
9
9
3. Do the changes.
10
10
4. Add/Update Test (if possible)
11
-
5. Update documentation
11
+
5.Update documentation
12
12
6. Commit and Push to your fork
13
13
7. Make Pull Request
14
14
@@ -20,7 +20,6 @@ node bin/codecept.js
20
20
21
21
To run examples:
22
22
23
-
24
23
```
25
24
node bin/codecept.js run -c examples
26
25
```
@@ -30,9 +29,9 @@ Depending on a type of a change you should do the following.
30
29
31
30
## Helpers
32
31
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.
34
33
35
-
### Updating a WebDriverIO | SeleniumWebdriver | Nightmare
34
+
### Updating a WebDriverIO | Nightmare
36
35
37
36
*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! *
*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! *
77
76
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)
79
78
80
79
In case you do Protractor-specific change, please add a test:To run the test suite you need:
81
80
@@ -115,15 +114,16 @@ Please try to add corresponding testcase to runner or unit.
115
114
Documentation is stored in `/docs` directory in markdown format.
116
115
117
116
**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.
119
117
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:
121
121
122
122
```
123
-
robo docs:helpers
123
+
npm run docs
124
124
```
125
125
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:
127
127
128
128
```js
129
129
/**
@@ -134,6 +134,16 @@ To update markdown documentation. Shared documentation for helpers are located i
134
134
}
135
135
```
136
136
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
+
137
147
## Testing
138
148
139
149
Whenever you implemented a feature/bugfix
@@ -191,7 +201,7 @@ docker-compose run --rm test-acceptance.protractor
191
201
192
202
#### Running against specific Node version
193
203
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
195
205
specific version as long as there is Docker container available for such
196
206
version. To do that you need to build codecept's Docker image prior to running
Copy file name to clipboardExpand all lines: README.md
+28-6Lines changed: 28 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,13 @@
1
-
# CodeceptJS [![NPM version][npm-image]][npm-url][](https://travis-ci.org/Codeception/CodeceptJS)[](https://gitter.im/Codeception/CodeceptJS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)[](https://www.codacy.com/app/DavertMik/CodeceptJS?utm_source=github.com&utm_medium=referral&utm_content=Codeception/CodeceptJS&utm_campaign=badger)[](https://houndci.com)
1
+
[<imgsrc="https://img.shields.io/badge/slack-@codeceptjs-purple.svg?logo=slack">](https://join.slack.com/t/codeceptjs/shared_invite/enQtMzA5OTM4NDM2MzA4LWE4MThhN2NmYTgxNTU5MTc4YzAyYWMwY2JkMmZlYWI5MWQ2MDM5MmRmYzZmYmNiNmY5NTAzM2EwMGIwOTNhOGQ)[<imgsrc="https://img.shields.io/badge/discourse-codeceptjs-purple">](https://codecept.discourse.group)[![NPM version][npm-image]][npm-url][](https://travis-ci.org/Codeception/CodeceptJS)[](https://www.codacy.com/app/DavertMik/CodeceptJS?utm_source=github.com&utm_medium=referral&utm_content=Codeception/CodeceptJS&utm_campaign=badger)[](https://houndci.com)
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.
10
11
A simple test that verifies the "Welcome" text is present on a main page of a site will look like:
11
12
12
13
```js
@@ -64,8 +65,7 @@ Move to directory where you'd like to have your tests (and codeceptjs config) st
64
65
npx codeceptjs init
65
66
```
66
67
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.
69
69
70
70
After that create your first test by executing:
71
71
@@ -87,7 +87,7 @@ npx codeceptjs def .
87
87
88
88
Later you can even automagically update Type Definitions to include your own custom [helpers methods](docs/helpers.md).
89
89
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.
0 commit comments