Skip to content

Commit e1f9a61

Browse files
docs(e2e-webdriverio): add WebdriverIO docs
1 parent d35c15e commit e1f9a61

File tree

4 files changed

+71
-1
lines changed

4 files changed

+71
-1
lines changed

docs/.vuepress/config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@ module.exports = {
184184
'/core-plugins/unit-jest.md',
185185
'/core-plugins/unit-mocha.md',
186186
'/core-plugins/e2e-cypress.md',
187-
'/core-plugins/e2e-nightwatch.md'
187+
'/core-plugins/e2e-nightwatch.md',
188+
'/core-plugins/e2e-webdriverio.md'
188189
]
189190
}],
190191

docs/config/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -446,3 +446,7 @@ See [@vue/cli-plugin-e2e-cypress](https://github.com/vuejs/vue-cli/tree/dev/pack
446446
### Nightwatch
447447

448448
See [@vue/cli-plugin-e2e-nightwatch](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-e2e-nightwatch) for more details.
449+
450+
### WebdriverIO
451+
452+
See [@vue/cli-plugin-e2e-webdriverio](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-e2e-webdriverio) for more details.

docs/core-plugins/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ This section contains documentation for core Vue CLI plugins:
1212
- [Mocha](unit-mocha.md)
1313
- [Cypress](e2e-cypress.md)
1414
- [Nightwatch](e2e-nightwatch.md)
15+
- [WebdriverIO](e2e-webdriverio.md)

docs/core-plugins/e2e-webdriverio.md

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# @vue/cli-plugin-e2e-nightwatch
2+
3+
> e2e-webdriverio plugin for vue-cli
4+
5+
## Injected Commands
6+
7+
- **`vue-cli-service test:e2e`**
8+
9+
Run end-to-end tests with [WebdriverIO](https://webdriver.io/).
10+
11+
Options:
12+
13+
```
14+
--url run the tests against given url instead of auto-starting dev server
15+
--headless use chrome or firefox in headless mode
16+
--remote run e2e tests on a cloud provider
17+
```
18+
19+
Additionally, all [WebdriverIO CLI options](https://webdriver.io/docs/clioptions.html) are also supported.
20+
E.g.: `--spec`, `--watch` etc.
21+
22+
23+
## Project Structure
24+
25+
The following structure will be generated when installing this plugin. It includes a spec file a page object definition for the Vue.js app as example.
26+
27+
```
28+
tests/e2e/
29+
├── pageobjects/
30+
| └── app.page.js
31+
├── specs/
32+
| ├── app.spec.js
33+
└── .eslintrc.js
34+
```
35+
36+
#### `pageobjects`
37+
Working with page objects is a popular methodology in end-to-end UI testing. See [working with page objects](https://webdriver.io/docs/pageobjects.html) section for details.
38+
39+
#### `specs`
40+
The main location where tests are located. You can specify specific tests or define suites to run various subsets of these tests. [More info](https://webdriver.io/docs/organizingsuites.html).
41+
42+
## Installing in an Already Created Project
43+
44+
``` sh
45+
vue add e2e-webdriverio
46+
```
47+
48+
## Running Tests
49+
50+
By default, all tests inside the `specs` folder will be run using Chrome. If you'd like to run end-to-end tests against Chrome (or Firefox) in headless mode, simply pass the `--headless` argument.
51+
52+
```sh
53+
$ vue-cli-service test:e2e
54+
```
55+
56+
This will run the tests automatically in parallel on Firefox and Chrome.
57+
58+
**Running a single test**
59+
60+
To run a single test supply the filename path. E.g.:
61+
62+
```sh
63+
$ vue-cli-service test:e2e --spec tests/e2e/specs/test.js
64+
```

0 commit comments

Comments
 (0)