Skip to content

Commit 801b515

Browse files
committed
Added the e2e-test for protractor as well.
1 parent e313321 commit 801b515

File tree

4 files changed

+41
-11
lines changed

4 files changed

+41
-11
lines changed

.jshintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"module": false,
1111
"inject": false,
1212
"require": false,
13-
"console": false
13+
"console": false,
14+
"exports": false
1415
}
1516
}

README.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,15 @@ app/ --> all of the source files for the application
6868
version-directive_test.js --> version directive tests
6969
interpolate-filter.js --> custom interpolation filter
7070
interpolate-filter_test.js --> interpolate filter tests
71-
view1/ --> the view1 view template and logic
72-
view1.html --> the partial template
73-
view1.js --> the controller logic
74-
view1_test.js --> tests of the controller
75-
view2/ --> the view2 view template and logic
76-
view2.html --> the partial template
77-
view2.js --> the controller logic
78-
view2_test.js --> tests of the controller
71+
views/ --> all views go here
72+
view1/ --> the view1 view template and logic
73+
view1.html --> the partial template
74+
view1.js --> the controller logic
75+
view1_test.js --> tests of the controller
76+
view2/ --> the view2 view template and logic
77+
view2.html --> the partial template
78+
view2.js --> the controller logic
79+
view2_test.js --> tests of the controller
7980
app.js --> main application module
8081
index.html --> app layout file (the main html template file of the app)
8182
index-async.html --> just like index.html, but loads js files asynchronously
@@ -182,7 +183,13 @@ and gulp will be installed globally and you can run it from the command line.
182183

183184
In `gulpfile.js`, change the parameter moduleName if the main module has another name.
184185

185-
Then just run `gulp` to prepare for production. The result is in the `dist` directory.
186+
Then just run `gulp` to prepare for production. The result is in the `dist/` directory.
187+
188+
To test the production code, run:
189+
190+
```
191+
npm run protractor-dist
192+
```
186193

187194

188195
## Contact

e2e-tests/protractor-dist.conf.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
'use strict';
2+
3+
exports.config = {
4+
allScriptsTimeout: 11000,
5+
6+
specs: [
7+
'*.js'
8+
],
9+
10+
capabilities: {
11+
'browserName': 'chrome'
12+
},
13+
14+
baseUrl: 'http://localhost:8000/dist/',
15+
16+
framework: 'jasmine',
17+
18+
jasmineNodeOpts: {
19+
defaultTimeoutInterval: 30000
20+
}
21+
};

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"preupdate-webdriver": "npm install",
3636
"update-webdriver": "webdriver-manager update",
3737
"preprotractor": "npm run update-webdriver",
38-
"protractor": "protractor e2e-tests/protractor.conf.js"
38+
"protractor": "protractor e2e-tests/protractor.conf.js",
39+
"protractor-dist": "protractor e2e-tests/protractor-dist.conf.js"
3940
}
4041
}

0 commit comments

Comments
 (0)