chore(protractor): enable testing ng-app-included examples

/cc @petebacondarwin / @juliemr please review :>

Blocks #8673
Closes #8677
This commit is contained in:
Caitlin Potter
2014-08-19 16:11:42 -04:00
parent 787c5a76dc
commit b674003f41
2 changed files with 6 additions and 2 deletions

View File

@@ -33,7 +33,8 @@ module.exports = {
innerTest: file.fileContents,
pathPrefix: '.', // Hold for if we test with full jQuery
exampleId: example.id,
description: example.doc.id
description: example.doc.id,
'ng-app-included': example['ng-app-included']
};
if (env === 'jquery') {

View File

@@ -1,7 +1,10 @@
describe("{$ doc.description $}", function() {
var rootEl;
beforeEach(function() {
rootEl = browser.rootEl;{% if doc['ng-app-included'] %}
browser.rootEl = '[ng-app]';{% endif %}
browser.get("{$ doc.pathPrefix $}/{$ doc.examplePath $}");
});
{% if doc['ng-app-included'] %}afterEach(function() { browser.rootEl = rootEl; });{% endif %}
{$ doc.innerTest $}
});