Skip to content

Commit 0ff3abe

Browse files
committed
Fix(grunt): protractor fixed to work again, grunt options in readme
1 parent f82c65b commit 0ff3abe

File tree

5 files changed

+18
-6
lines changed

5 files changed

+18
-6
lines changed

DEVELOPER.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ http://localhost:9003/docs/#/tutorial to browse each tutorial.
1818
<br/>options
1919
<br/> no-e2e - eliminate protractor tests
2020
<br/> angular=n.n.n - specify a specify angular version to run unit tests against
21+
<br/> core - run only the tests for the core code, skip features
22+
<br/> fast - alias for --no-e2e --core --angular=1.3.7
2123

2224
```
23-
grunt dev --no-e2e --angular=1.2.16
25+
grunt dev --no-e2e --angular=1.3.7
2426
```
2527

2628
# Code Structure

FIRST_TIMER.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,9 @@ Check that the tutorials are working fine on your local install.
145145

146146
__Pro-tip:__ Running grunt dev can be slow, as it automatically runs all e2e tests and
147147
unit tests on each change. You can just skip the testing by running instead `grunt dev --no-e2e`, which
148-
makes it faster, but gives you less information about where you may have broken things.
148+
makes it faster, but gives you less information about where you may have broken things. You
149+
can also use `grunt dev --fast`, which runs only the core unit tests, skips e2e testing, and runs
150+
unit tests against only the most recent angular version (it's an alias for `grunt dev --core --no-e2e --angular=1.3.7`).
149151
Or you can edit the tests to target only the specific tests for the area you're working on.
150152
Pick the tutorial that has e2e tests and is most relevant to the area you're working in,
151153
and edit the e2e test to have `ddescribe` rather than `describe`. This will ask jasmine

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,14 @@ You can also use the `--browsers` specify what browsers to test with (PhantomJS
8484
By default the `dev` tasks runs e2e tests with protractor. If you have problems with them running slow or hanging, you can disable them with the `--no-e2e` flag:
8585

8686
> grunt dev --no-e2e
87+
88+
The grunt task is getting slower as the body of tests gets larger. If you're only working on the core functionality you can disable the unit tests on the features with the `--core` flag:
89+
90+
> grunt dev --core
91+
92+
As a shortcut for options that the developers frequently use, there is also a `--fast` flag, which equates to `--core --no-e2e --angular=<latest>`:
93+
94+
> grunt dev --fast
8795

8896
## Karmangular
8997

grunt/watch.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module.exports = function( grunt, options ){
2222

2323
protractor: {
2424
files: ['.tmp/doc-scenarios/**/*.spec.js', 'test/e2e/**/*.spec.js'],
25-
tasks: ['ngdocs', 'protractor-watch:auto']
25+
tasks: ['protractor-watch:auto']
2626
},
2727

2828
less: {
@@ -51,7 +51,7 @@ module.exports = function( grunt, options ){
5151
}
5252
};
5353

54-
if (grunt.option('fast') || !grunt.option('e2e')){
54+
if (grunt.option('fast') || grunt.option('e2e') === false){
5555
config.protractor.tasks = ['ngdocs'];
5656
}
5757

misc/tutorial/105_footer.ngdoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ You can override the default grid footer template with gridOptions.footerTemplat
9696
it('grid should have footers with specific values', function () {
9797
gridTestUtils.expectFooterCellValueMatch( 'grid1', 0, '' );
9898
gridTestUtils.expectFooterCellValueMatch( 'grid1', 1, 'total: 281568' );
99-
gridTestUtils.expectFooterCellValueMatch( 'grid1', 2, '30.196' );
99+
gridTestUtils.expectFooterCellValueMatch( 'grid1', 2, '30.248' );
100100
gridTestUtils.expectFooterCellValueMatch( 'grid1', 3, 'min: 20' );
101-
gridTestUtils.expectFooterCellValueMatch( 'grid1', 4, 'max: 40' );
101+
gridTestUtils.expectFooterCellValueMatch( 'grid1', 4, 'max: 49' );
102102
gridTestUtils.expectFooterCellValueMatch( 'grid1', 5, 'custom template' );
103103
// gridTestUtils.expectFooterCellValueMatch( 'grid1', 6, 'max: ' + getMaxDateString() );
104104
// TODO: need to check item count, not done

0 commit comments

Comments
 (0)