File tree 4 files changed +40
-4
lines changed
addon/ng2/blueprints/ng2/files
4 files changed +40
-4
lines changed Original file line number Diff line number Diff line change @@ -64,17 +64,22 @@ The build artifacts will be stored in the `dist/` directory.
64
64
65
65
### Running tests
66
66
67
- Before running the tests make sure that the project is built. To build the
67
+ Before running the tests make sure that the project is built. To build the
68
68
project once you can use:
69
69
70
70
```bash
71
71
ng build
72
72
```
73
73
74
- With the project built in the `dist/` folder you can just run: `karma start`.
74
+ With the project built in the `dist/` folder you can just run: `karma start`.
75
75
Karma will run the tests and keep the browser open waiting to run again.
76
76
77
- This will be easier when the command
77
+ To run the end-to-end protractor tests you first need to update selenium drivers
78
+ once via `$(npm bin)/webdriver-manager update`.
79
+ Afterwards you only need to run `$(npm bin)/protractor` while serving via
80
+ `ng serve`.
81
+
82
+ This will be easier when the command
78
83
[ng test](https://github.com/angular/angular-cli/issues/70) is implemented.
79
84
80
85
Original file line number Diff line number Diff line change 13
13
"jasmine-core": "^2.3.4",
14
14
"karma": "^0.13.15",
15
15
"karma-chrome-launcher": "^0.2.1",
16
- "karma-jasmine": "^0.3.6"
16
+ "karma-jasmine": "^0.3.6",
17
+ "protractor": "^3.0.0"
17
18
}
18
19
}
Original file line number Diff line number Diff line change
1
+ exports.config = {
2
+ allScriptsTimeout: 11000,
3
+
4
+ specs: [
5
+ 'dist/**/*.e2e.js'
6
+ ],
7
+
8
+ capabilities: {
9
+ 'browserName': 'chrome'
10
+ },
11
+
12
+ directConnect: true,
13
+
14
+ baseUrl: 'http://localhost:4200/',
15
+
16
+ framework: 'jasmine',
17
+
18
+ jasmineNodeOpts: {
19
+ defaultTimeoutInterval: 30000
20
+ },
21
+
22
+ useAllAngular2AppRoots: true
23
+ };
Original file line number Diff line number Diff line change
1
+ describe('<%= jsComponentName %> App', function() {
2
+ it('should display message saying app works', function() {
3
+ browser.get('/');
4
+ expect(element(by.css('<%= htmlComponentName %>-app p')).getText())
5
+ .toEqual('<%= htmlComponentName %> Works!');
6
+ });
7
+ });
You can’t perform that action at this time.
0 commit comments