dgeni-packages
Advanced tools
+8
-0
| # Changelog | ||
| ## v0.10.0-rc.2 10th September 2014 | ||
| Bug fix | ||
| * fix(examples/generateProtractorTestsProcessor): enable testing 'ng-app-included' examples 46a0c516 | ||
| ## v0.10.0-rc.1 10th September 2014 | ||
@@ -4,0 +12,0 @@ |
@@ -46,4 +46,5 @@ "use strict"; | ||
| template: 'protractorTests.template.js', | ||
| innerTest: file.fileContents | ||
| innerTest: file.fileContents, | ||
| 'ng-app-included': example['ng-app-included'] | ||
| }; | ||
| } |
@@ -8,8 +8,10 @@ var mockPackage = require('../mocks/mockPackage'); | ||
| it("should add a protractor doc for each deployment in the example", function() { | ||
| var processor, exampleMap; | ||
| beforeEach(function() { | ||
| var dgeni = new Dgeni([mockPackage()]); | ||
| var injector = dgeni.configureInjector(); | ||
| var processor = injector.get('generateProtractorTestsProcessor'); | ||
| processor = injector.get('generateProtractorTestsProcessor'); | ||
| processor.templateFolder = 'examples'; | ||
@@ -27,22 +29,37 @@ processor.deployments = [ | ||
| exampleMap = injector.get('exampleMap'); | ||
| }); | ||
| docs = [{ file: 'a.b.js' }]; | ||
| files = {}; | ||
| it("should add a protractor doc for each example-deployment pair in the example", function() { | ||
| files['index.html'] = { type: 'html', name: 'index.html', fileContents: 'index.html content' }; | ||
| files['app.js'] = { type: 'js', name: 'app.js', fileContents: 'app.js content' }; | ||
| files['app.css'] = { type: 'css', name: 'app.css', fileContents: 'app.css content' }; | ||
| files['app.scenario.js'] = { type: 'protractor', name: 'app.scenario.js', fileContents: 'app.scenario.js content' }; | ||
| docs = [ | ||
| { file: 'a.b.c.js' }, | ||
| { file: 'x.y.z.js' } | ||
| ]; | ||
| var exampleMap = injector.get('exampleMap'); | ||
| exampleMap.set('a.b.c', { | ||
| id: 'a.b.c', | ||
| doc: docs[0], | ||
| outputFolder: 'examples', | ||
| deps: 'dep1.js;dep2.js', | ||
| files: files, | ||
| // outputFolder: 'examples', | ||
| // deps: 'dep1.js;dep2.js', | ||
| files: { | ||
| 'index.html': { type: 'html', name: 'index.html', fileContents: 'index.html content' }, | ||
| 'app.scenario.js': { type: 'protractor', name: 'app.scenario.js', fileContents: 'app.scenario.js content' } | ||
| }, | ||
| deployments: {} | ||
| }); | ||
| exampleMap.set('x.y.z', { | ||
| id: 'x.y.z', | ||
| doc: docs[1], | ||
| // outputFolder: 'examples', | ||
| // deps: 'dep1.js;dep2.js', | ||
| files: { | ||
| 'index.html': { type: 'html', name: 'index.html', fileContents: 'index.html content' }, | ||
| 'app.scenario.js': { type: 'protractor', name: 'app.scenario.js', fileContents: 'app.scenario.js content' } | ||
| }, | ||
| deployments: {}, | ||
| 'ng-app-included': true | ||
| }); | ||
@@ -68,5 +85,22 @@ processor.$process(docs); | ||
| }), | ||
| jasmine.objectContaining({ | ||
| docType: 'e2e-test', | ||
| id: 'protractorTest-x.y.z-' + processor.deployments[0].name, | ||
| example: exampleMap.get('x.y.z'), | ||
| deployment: processor.deployments[0], | ||
| template: 'protractorTests.template.js', | ||
| innerTest: 'app.scenario.js content', | ||
| 'ng-app-included': true | ||
| }), | ||
| jasmine.objectContaining({ | ||
| docType: 'e2e-test', | ||
| id: 'protractorTest-x.y.z-' + processor.deployments[1].name, | ||
| example: exampleMap.get('x.y.z'), | ||
| deployment: processor.deployments[1], | ||
| template: 'protractorTests.template.js', | ||
| innerTest: 'app.scenario.js content', | ||
| 'ng-app-included': true | ||
| }) | ||
| ]); | ||
| }); | ||
| }); |
@@ -1,7 +0,10 @@ | ||
| describe("{$ doc.example.id $}", function() { | ||
| describe("{$ doc.description $}", function() { | ||
| var rootEl; | ||
| beforeEach(function() { | ||
| rootEl = browser.rootEl;{% if doc['ng-app-included'] %} | ||
| browser.rootEl = '[ng-app]';{% endif %} | ||
| browser.get("{$ doc.example.deployments[doc.deployment.name].outputPath $}"); | ||
| }); | ||
| {% if doc['ng-app-included'] %}afterEach(function() { browser.rootEl = rootEl; });{% endif %} | ||
| {$ doc.innerTest $} | ||
| }); | ||
| }); |
+1
-1
| { | ||
| "name": "dgeni-packages", | ||
| "version": "0.10.0-rc.1", | ||
| "version": "0.10.0-rc.2", | ||
| "description": "A collection of dgeni packages for generating documentation from source code", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
290682
0.51%5595
0.68%