parent
b6deb00b97
commit
590b84fc1d
@ -126,8 +126,8 @@ jobs:
|
|||||||
key: my-project-{{ .Branch }}-{{ checksum "package-lock.json" }}
|
key: my-project-{{ .Branch }}-{{ checksum "package-lock.json" }}
|
||||||
paths:
|
paths:
|
||||||
- "node_modules"
|
- "node_modules"
|
||||||
- run: npm run test -- --single-run --no-progress --browser=ChromeHeadlessCI
|
- run: npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
|
||||||
- run: npm run e2e -- --no-progress --config=protractor-ci.conf.js
|
- run: npm run e2e -- --protractor-config=e2e/protractor-ci.conf.js
|
||||||
```
|
```
|
||||||
|
|
||||||
This configuration caches `node_modules/` and uses [`npm run`](https://docs.npmjs.com/cli/run-script) to run CLI commands, because `@angular/cli` is not installed globally.
|
This configuration caches `node_modules/` and uses [`npm run`](https://docs.npmjs.com/cli/run-script) to run CLI commands, because `@angular/cli` is not installed globally.
|
||||||
@ -167,8 +167,8 @@ install:
|
|||||||
- npm install
|
- npm install
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- npm run test -- --single-run --no-progress --browser=ChromeHeadlessCI
|
- npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
|
||||||
- npm run e2e -- --no-progress --config=protractor-ci.conf.js
|
- npm run e2e -- --protractor-config=e2e/protractor-ci.conf.js
|
||||||
```
|
```
|
||||||
|
|
||||||
This does the same things as the Circle CI configuration, except that Travis doesn't come with Chrome, so we use Chromium instead.
|
This does the same things as the Circle CI configuration, except that Travis doesn't come with Chrome, so we use Chromium instead.
|
||||||
@ -201,7 +201,7 @@ customLaunchers: {
|
|||||||
},
|
},
|
||||||
```
|
```
|
||||||
|
|
||||||
* Create a new file, `protractor-ci.conf.js`, in the root folder of your project, which extends the original `protractor.conf.js`:
|
* In the root folder of your e2e tests project, create a new file named `protractor-ci.conf.js`. This new file extends the original `protractor.conf.js`.
|
||||||
```
|
```
|
||||||
const config = require('./protractor.conf').config;
|
const config = require('./protractor.conf').config;
|
||||||
|
|
||||||
@ -218,8 +218,8 @@ exports.config = config;
|
|||||||
Now you can run the following commands to use the `--no-sandbox` flag:
|
Now you can run the following commands to use the `--no-sandbox` flag:
|
||||||
|
|
||||||
<code-example language="sh" class="code-shell">
|
<code-example language="sh" class="code-shell">
|
||||||
ng test --single-run --no-progress --browser=ChromeHeadlessCI
|
ng test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
|
||||||
ng e2e --no-progress --config=protractor-ci.conf.js
|
ng e2e -- --protractor-config=e2e/protractor-ci.conf.js
|
||||||
</code-example>
|
</code-example>
|
||||||
|
|
||||||
<div class="alert is-helpful">
|
<div class="alert is-helpful">
|
||||||
@ -238,7 +238,7 @@ Code coverage reports show you any parts of our code base that may not be prope
|
|||||||
To generate a coverage report run the following command in the root of your project.
|
To generate a coverage report run the following command in the root of your project.
|
||||||
|
|
||||||
<code-example language="sh" class="code-shell">
|
<code-example language="sh" class="code-shell">
|
||||||
ng test --watch=false --code-coverage
|
ng test --no-watch --code-coverage
|
||||||
</code-example>
|
</code-example>
|
||||||
|
|
||||||
When the tests are complete, the command creates a new `/coverage` folder in the project. Open the `index.html` file to see a report with your source code and code coverage values.
|
When the tests are complete, the command creates a new `/coverage` folder in the project. Open the `index.html` file to see a report with your source code and code coverage values.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user