Skip to content

Commit dfa8347

Browse files
bshepherdsonpetebacondarwin
authored andcommitted
docs(bootstrap): Note that ngScenario requires ngApp
ngScenario expects an ngApp directive to be used, and doesn't work for manually bootstrapped apps. The failure mode is to hang on navigation. Trying to make this wont-fix bug less obscure by documenting it. Eventually Protractor will replace ngScenario and fix this.
1 parent 6476aed commit dfa8347

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

docs/content/guide/dev_guide.e2e-testing.ngdoc

+4
Original file line numberDiff line numberDiff line change
@@ -302,3 +302,7 @@ element('.btn-danger').click();
302302
element('table tbody a');
303303
element('.btn-danger').click();
304304
</pre>
305+
306+
# Caveats
307+
308+
ngScenario does not work with apps that manually bootstrap using angular.bootstrap. You must use the ng-app directive.

src/Angular.js

+3
Original file line numberDiff line numberDiff line change
@@ -1036,6 +1036,9 @@ function angularInit(element, bootstrap) {
10361036
*
10371037
* See: {@link guide/bootstrap Bootstrap}
10381038
*
1039+
* Note that ngScenario-based end-to-end tests cannot use this function to bootstrap manually.
1040+
* They must use {@link api/ng.directive:ngApp ngApp}.
1041+
*
10391042
* @param {Element} element DOM element which is the root of angular application.
10401043
* @param {Array<String|Function>=} modules an array of module declarations. See: {@link angular.module modules}
10411044
* @returns {AUTO.$injector} Returns the newly created injector for this app.

0 commit comments

Comments
 (0)