|
1 | 1 | # Developer guide: getting your environment set up
|
2 | 2 |
|
3 |
| -1. Make sure you have `node` installed with a version at _least_ 4.2.3. |
| 3 | +1. Make sure you have `node` installed with a version at _least_ 5.5.0. |
4 | 4 | 2. Run `npm install -g angular-cli` to install the Angular CLI.
|
5 | 5 | 3. Fork the `angular/material2` repo.
|
6 | 6 | 4. Clone your fork.
|
7 | 7 | Recommendation: name your git remotes `upstream` for `angular/material2`
|
8 | 8 | and `<your-username>` for your fork. Also see the [team git shortcuts](https://github.com/angular/material2/wiki/Team-git----bash-shortcuts).
|
9 | 9 | 5. From the root of the project, run `npm install`, then run `npm run typings` to install typescript definitions.
|
10 | 10 |
|
11 |
| - |
12 | 11 | To build the project, run `ng build`.
|
13 | 12 | To watch for changes and automatically rebuild, run `ng build --watch`
|
14 | 13 |
|
15 | 14 | To bring up a local server, run `ng serve`. This will automatically watch for changes and rebuild.
|
16 | 15 | After the changes rebuild, the browser currently needs to be manually refreshed.
|
17 | 16 |
|
18 |
| -To run unit tests, run `npm test`. |
19 |
| - |
20 |
| -###Running e2e tests: |
21 |
| - |
22 |
| -To prepare your environment, you'll need to install protractor and selenium. |
| 17 | +### Running unit tests |
23 | 18 |
|
24 |
| -1. Globally install protractor: |
| 19 | +To run unit tests, run `npm test` or use the CLI with `ng test`. |
25 | 20 |
|
26 |
| -``` |
27 |
| -npm install -g protractor |
28 |
| -``` |
| 21 | +### Running e2e tests |
29 | 22 |
|
30 |
| -2. Install the correct selenium version with webdriver-manager (this comes with protractor): |
| 23 | +To prepare your environment, you'll need to install protractor and selenium. |
31 | 24 |
|
| 25 | +```bash |
| 26 | +# 1. Install the correct selenium version with webdriver-manager (this comes with protractor): |
| 27 | +npm run webdriver-manager update |
32 | 28 | ```
|
33 |
| -webdriver-manager update |
34 |
| -``` |
35 |
| - |
36 |
| -When running the tests: |
37 | 29 |
|
38 |
| -1. Spin up a local server with `ng serve`. |
| 30 | +In order to run the tests: |
39 | 31 |
|
40 |
| -2. Run tests with: |
| 32 | +```bash |
| 33 | +# 1. Spin up a local server with |
| 34 | +MD_APP=e2e ng serve |
41 | 35 |
|
| 36 | +# 2. Run tests with: |
| 37 | +ng e2e |
42 | 38 | ```
|
43 |
| -protractor test/protractor.conf.js |
44 |
| -``` |
45 | 39 |
|
46 |
| -Running benchmarks: not yet implemented |
47 |
| -Running screenshot diff tests: not yet implemented |
| 40 | +### Running benchmarks |
| 41 | +Not yet implemented. |
| 42 | + |
| 43 | +### Running screenshot diff tests. |
| 44 | +Not yet implemented. |
0 commit comments