aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulie2014-02-06 11:03:17 -0800
committerIgor Minar2014-02-07 20:41:11 -0800
commitad275b226551e45b68dace46af5fcd8178e31a60 (patch)
treed5b692e8bc72de6de918771a28b4c4d7e928e74b
parent600e6218fedd03bffabf78a9f7d0d9b68515b9a3 (diff)
downloadangular.js-ad275b226551e45b68dace46af5fcd8178e31a60.tar.bz2
refactor(doc): separate end to end tests into jquery and jqlite files
-rwxr-xr-xdocs/src/gen-docs.js5
-rw-r--r--docs/src/ngdoc.js21
2 files changed, 9 insertions, 17 deletions
diff --git a/docs/src/gen-docs.js b/docs/src/gen-docs.js
index 9fc5f8db..ff8d8311 100755
--- a/docs/src/gen-docs.js
+++ b/docs/src/gen-docs.js
@@ -57,7 +57,10 @@ writer.makeDir('build/docs/', true).then(function() {
fileFutures.push(writer.output('partials/' + doc.section + '/' + id + '.html', doc.html()));
// If it has a sample Protractor test, output that as well.
if (doc.protractorTests.length) {
- fileFutures.push(writer.output('ptore2e/' + doc.section + '/' + id + '_test.js', ngdoc.writeProtractorTest(doc)));
+ fileFutures.push(writer.output('ptore2e/' + doc.section + '/' + id + '.jquery_test.js',
+ ngdoc.writeProtractorTest(doc, 'index-jq-nocache.html#!/')));
+ fileFutures.push(writer.output('ptore2e/' + doc.section + '/' + id + '.jqlite_test.js',
+ ngdoc.writeProtractorTest(doc, 'index-nocache.html#!/')));
}
});
diff --git a/docs/src/ngdoc.js b/docs/src/ngdoc.js
index 1e8896d0..78f968d9 100644
--- a/docs/src/ngdoc.js
+++ b/docs/src/ngdoc.js
@@ -1110,28 +1110,17 @@ function scenarios(docs){
}
}
-function writeProtractorTest(doc){
+function writeProtractorTest(doc, pathPrefix){
var lines = [];
lines.push('describe("' + doc.section + '/' + doc.id + '", function() {');
- lines.push(' describe("angular+jqLite", function() {')
- lines.push(' beforeEach(function() {');
- lines.push(' browser.get("index-nocache.html#!/' + doc.section + '/' + doc.id + '");');
- lines.push(' });');
- lines.push('');
- doc.protractorTests.forEach(function(test){
- lines.push(indentCode(trim(test), 4));
- lines.push('');
- });
+ lines.push(' beforeEach(function() {');
+ lines.push(' browser.get("' + pathPrefix + doc.section + '/' + doc.id + '");');
lines.push(' });');
- lines.push(' describe("angular+jQuery", function() {')
- lines.push(' beforeEach(function() {');
- lines.push(' browser.get("index-jq-nocache.html#!/' + doc.section + '/' + doc.id + '");');
- lines.push(' });');
+ lines.push('');
doc.protractorTests.forEach(function(test){
- lines.push(indentCode(trim(test), 4));
+ lines.push(indentCode(trim(test), 0));
lines.push('');
});
- lines.push(' });');
lines.push('});');
lines.push('');
return lines.join('\n');