Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 4b7398e

Browse files
committed
chore(protractor): enable testing ng-app-included examples
/cc @petebacondarwin / @juliemr please review :> Blocks #8673 Closes #8677
1 parent 4e79dec commit 4b7398e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

docs/config/processors/protractor-generate.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ module.exports = {
3333
innerTest: file.fileContents,
3434
pathPrefix: '.', // Hold for if we test with full jQuery
3535
exampleId: example.id,
36-
description: example.doc.id
36+
description: example.doc.id,
37+
'ng-app-included': example['ng-app-included']
3738
};
3839

3940
if (env === 'jquery') {
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
describe("{$ doc.description $}", function() {
2+
var rootEl;
23
beforeEach(function() {
4+
rootEl = browser.rootEl;{% if doc['ng-app-included'] %}
5+
browser.rootEl = '[ng-app]';{% endif %}
36
browser.get("{$ doc.pathPrefix $}/{$ doc.examplePath $}");
47
});
5-
8+
{% if doc['ng-app-included'] %}afterEach(function() { browser.rootEl = rootEl; });{% endif %}
69
{$ doc.innerTest $}
710
});

0 commit comments

Comments
 (0)