@@ -96,20 +96,6 @@ cd angular-phonecat
96
96
The tutorial instructions, from now on, assume you are running all commands from within the
97
97
`angular-phonecat` directory.
98
98
99
- <div class="alert alert-warning">
100
- <p>**Firewall/Proxy Issues?**</p>
101
- <p>
102
- `git` and other tools (for example `bower` - see below), often use the `git:` protocol for
103
- accessing files in remote repositories. Some firewall configurations are blocking `git://` URLs,
104
- which leads to errors when trying to clone repositories or download dependencies. (For example
105
- corporate firewalls are "notorious" for blocking `git:`.)
106
- </p>
107
- <p>
108
- If you run into this issue, you can force the use of `https:` instead, by running the following
109
- command: `git config --global url."https://".insteadOf git://`
110
- </p>
111
- </div>
112
-
113
99
114
100
### Install Node.js
115
101
@@ -213,7 +199,8 @@ You can now browse to the application at http://localhost:8000/index.html.
213
199
214
200
<div class="alert alert-info">
215
201
To serve the web app on a different IP address or port, edit the "start" script within
216
- `package.json`. You can use `-a` to set the address and `-p` to set the port.
202
+ `package.json`. You can use `-a` to set the address and `-p` to set the port. You also need to
203
+ update the `baseUrl` configuration property in `e2e-test/protractor.conf.js`.
217
204
</div>
218
205
219
206
@@ -235,8 +222,8 @@ npm test
235
222
This will start the Karma unit test runner. Karma will read the configuration file `karma.conf.js`,
236
223
located at the root of the project directory. This configuration file tells Karma to:
237
224
238
- * Open up a Chrome browser and connect it to Karma.
239
- * Execute all the unit tests in this browser .
225
+ * Open up instances of the Chrome and Firefox browsers and connect them to Karma.
226
+ * Execute all the unit tests in these browsers .
240
227
* Report the results of these tests in the terminal/command line window.
241
228
* Watch all the project's JavaScript files and re-run the tests whenever any of these change.
242
229
@@ -266,28 +253,6 @@ npm run update-webdriver
266
253
automatically executed as part of the command that runs the E2E tests.
267
254
</div>
268
255
269
- <div class="alert alert-warning">
270
- <p>
271
- Running `update-webdriver` for the first time may take from several seconds up to a few minutes
272
- (depending on your hardware and network connection). If you cancel the operation (e.g. using
273
- `Ctrl+C`), you might get errors, when trying to run Protractor later.
274
- </p>
275
- <p>
276
- In that case, you can delete the `node_modules/` directory and run `npm install` again.
277
- </p>
278
- </div>
279
-
280
- <div class="alert alert-warning">
281
- <p>
282
- Under the hood, Protractor uses the [Selenium Stadalone Server][selenium], which in turn
283
- requires the [Java Development Kit (JDK)][jdk] to be installed on your local machine. Check this
284
- by running `java -version` from the command line.
285
- </p>
286
- <p>
287
- If JDK is not already installed, you can download it [here][jdk-download].
288
- </p>
289
- </div>
290
-
291
256
Since Protractor works by interacting with a running application, we need to start our web server:
292
257
293
258
```
@@ -301,7 +266,7 @@ the application by running:
301
266
npm run protractor
302
267
```
303
268
304
- Protractor will read the configuration file at `e2e-tests/protractor- conf.js`. This configuration
269
+ Protractor will read the configuration file at `e2e-tests/protractor. conf.js`. This configuration
305
270
file tells Protractor to:
306
271
307
272
* Open up a Chrome browser and connect it to the application.
@@ -314,6 +279,46 @@ the application as a whole is executing correctly. It is very common to run E2E
314
279
a new commit of changes to a remote repository.
315
280
316
281
282
+ ### Common Issues
283
+
284
+ <br />
285
+ **Firewall / Proxy issues**
286
+
287
+ Git and other tools, often use the `git:` protocol for accessing files in remote repositories.
288
+ Some firewall configurations are blocking `git://` URLs, which leads to errors when trying to clone
289
+ repositories or download dependencies. (For example corporate firewalls are "notorious" for blocking
290
+ `git:`.)
291
+
292
+ If you run into this issue, you can force the use of `https:` instead, by running the following
293
+ command: `git config --global url."https://".insteadOf git://`
294
+
295
+ <br />
296
+ **Updating WebDriver takes too long**
297
+
298
+ Running `update-webdriver` for the first time may take from several seconds up to a few minutes
299
+ (depending on your hardware and network connection). If you cancel the operation (e.g. using
300
+ `Ctrl+C`), you might get errors, when trying to run Protractor later.
301
+
302
+ In that case, you can delete the `node_modules/` directory and run `npm install` again.
303
+
304
+ <br />
305
+ **Protractor dependencies**
306
+
307
+ Under the hood, Protractor uses the [Selenium Stadalone Server][selenium], which in turn requires
308
+ the [Java Development Kit (JDK)][jdk] to be installed on your local machine. Check this by running
309
+ `java -version` from the command line.
310
+
311
+ If JDK is not already installed, you can download it [here][jdk-download].
312
+
313
+ <br />
314
+ **Error running the web server**
315
+
316
+ The web server is configured to use port 8000. If the port is already in use (for example by another
317
+ instance of a running web server) you will get an `EADDRINUSE` error. Make sure the port is
318
+ available, before running `npm start`.
319
+
320
+ <hr />
321
+
317
322
Now that you have set up your local machine, let's get started with the tutorial:
318
323
{@link step_00 Step 0 - Bootstrapping}
319
324
0 commit comments