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

Commit

Permalink
docs(bootstrap): Note that ngScenario requires ngApp
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bshepherdson authored and petebacondarwin committed Jul 23, 2013
1 parent 2f3bd9d commit d26bffb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/content/guide/dev_guide.e2e-testing.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,7 @@ element('.btn-danger').click();
element('table tbody a');
element('.btn-danger').click();
</pre>

# Caveats

ngScenario does not work with apps that manually bootstrap using angular.bootstrap. You must use the ng-app directive.
3 changes: 3 additions & 0 deletions src/Angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,9 @@ function angularInit(element, bootstrap) {
*
* See: {@link guide/bootstrap Bootstrap}
*
* Note that ngScenario-based end-to-end tests cannot use this function to bootstrap manually.
* They must use {@link api/ng.directive:ngApp ngApp}.
*
* @param {Element} element DOM element which is the root of angular application.
* @param {Array<String|Function>=} modules an array of module declarations. See: {@link angular.module modules}
* @returns {AUTO.$injector} Returns the newly created injector for this app.
Expand Down

0 comments on commit d26bffb

Please sign in to comment.