Skip to content

Commit d39d95c

Browse files
committed
chore: update webdriver.io docs
1 parent a79fe83 commit d39d95c

File tree

2 files changed

+30
-13
lines changed

2 files changed

+30
-13
lines changed
Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# @vue/cli-plugin-e2e-nightwatch
1+
# @vue/cli-plugin-e2e-webdriverio
22

33
> e2e-webdriverio plugin for vue-cli
44
@@ -11,18 +11,19 @@
1111
Options:
1212

1313
```
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
14+
--remote Run tests remotely on SauceLabs
15+
16+
All WebdriverIO CLI options are also supported.
17+
1718
```
1819

1920
Additionally, all [WebdriverIO CLI options](https://webdriver.io/docs/clioptions.html) are also supported.
20-
E.g.: `--spec`, `--watch` etc.
21+
E.g.: `--baseUrl`, `--bail` etc.
2122

2223

2324
## Project Structure
2425

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+
The following structure will be generated when installing this plugin:
2627

2728
```
2829
tests/e2e/
@@ -33,32 +34,48 @@ tests/e2e/
3334
└── .eslintrc.js
3435
```
3536

37+
In addition to that there will be 3 configuration files generated:
38+
39+
- `wdio.shared.conf.js`: a shared configuration with all options defined for all environments
40+
- `wdio.local.conf.js`: a local configuration for local testing
41+
- `wdio.sauce.conf.js`: a remote configuration for testing on a cloud provider like [Sauce Labs](https://saucelabs.com/)
42+
43+
The directories contain:
44+
3645
#### `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.
46+
Contains an example for an page object. Read more on using [PageObjects](https://webdriver.io/docs/pageobjects.html) with WebdriverIO.
3847

3948
#### `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).
49+
Your e2e tests.
4150

4251
## Installing in an Already Created Project
4352

4453
``` sh
4554
vue add e2e-webdriverio
4655
```
4756

57+
For users with older CLI versions you may need to run `vue add @vue/e2e-webdriverio`.
58+
4859
## Running Tests
4960

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.
61+
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. Tests will be automatically run in parallel when executed in the cloud.
5162

5263
```sh
5364
$ vue-cli-service test:e2e
5465
```
5566

56-
This will run the tests automatically in parallel on Firefox and Chrome.
57-
5867
**Running a single test**
5968

6069
To run a single test supply the filename path. E.g.:
6170

6271
```sh
6372
$ vue-cli-service test:e2e --spec tests/e2e/specs/test.js
6473
```
74+
75+
**Skip Dev server auto-start**
76+
77+
If the development server is already running and you want to skip starting it automatically, pass the `--url` argument:
78+
79+
```sh
80+
$ vue-cli-service test:e2e --baseUrl=http://localhost:8080/
81+
```

β€Žpackages/@vue/cli-plugin-e2e-webdriverio/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ The following structure will be generated when installing this plugin:
2828
```
2929
tests/e2e/
3030
β”œβ”€β”€ pageobjects/
31-
| └── app.js
31+
| └── app.page.js
3232
β”œβ”€β”€ specs/
3333
| β”œβ”€β”€ app.spec.js
34-
└── globals.js
34+
└── .eslintrc.js
3535
```
3636

3737
In addition to that there will be 3 configuration files generated:

0 commit comments

Comments
Β (0)