From b6207ead81b19e82f830b25762b2e79a84233c0c Mon Sep 17 00:00:00 2001 From: Julie Ralph Date: Mon, 30 Jan 2017 22:27:37 -0800 Subject: [PATCH] docs(website): fix up some old information about AngularJS vs Angular (#4038) --- docs/debugging.md | 18 ++++++++++-------- docs/faq.md | 6 ++++-- docs/locators.md | 2 ++ lib/browser.ts | 2 +- spec/angular2Conf.js | 11 +---------- website/partials/home.html | 4 ++-- 6 files changed, 20 insertions(+), 23 deletions(-) diff --git a/docs/debugging.md b/docs/debugging.md index 93165aa83..7a833759d 100644 --- a/docs/debugging.md +++ b/docs/debugging.md @@ -76,7 +76,16 @@ wd-debug> ``` Enter `c` to move the test forward by one task. -Enter `repl` to enter interactive mode. In interactive mode, you can send + +While the test is paused you may also interact with the browser. Note that +if you open the Chrome Dev Tools, you must close them before continuing +the test because ChromeDriver cannot operate when the Dev Tools are open. + +When you finish debugging, exit by pressing `Ctrl-C`. Your tests will continue +where they left off, using the same browser. + +You can also use `browser.explore()` in your test script to pause and enter +an interactive repl loop. In this interactive mode, you can send WebDriver commands to your browser. The resulting value or error will be reported to the terminal. @@ -88,13 +97,6 @@ NoSuchElementError: No element found using locator: by.binding("nopenopenope") 'Anon' ``` -While the test is paused you may also interact with the browser. Note that -if you open the Chrome Dev Tools, you must close them before continuing -the test because ChromeDriver cannot operate when the Dev Tools are open. - -When you finish debugging, exit by pressing `Ctrl-C`. Your tests will continue -where they left off, using the same browser. - **Note:** Since these are asynchronous tasks, you would have to increase the default timeout of your specs else default timeout exception would be thrown! **Using debugger** diff --git a/docs/faq.md b/docs/faq.md index 97feb661d..20636c496 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -25,9 +25,11 @@ with more info. Angular can't be found on my page --------------------------------- -Protractor supports angular 1.0.6/1.1.4 and higher - check that your version of Angular is upgraded. +Protractor supports Angular and AngularJS 1.0.6/1.1.4 and higher - check that your version of Angular is upgraded. -The `angular` variable is expected to be available in the global context. Try opening chrome devtools or firefox and see if `angular` is defined. +For AngularJS apps, the `angular` variable is expected to be available in the global context. Try opening chrome devtools or firefox and see if `angular` is defined. + +For Angular apps, you should see a global method `getAllAngularTestabilities`. How do I deal with my log-in page? ---------------------------------- diff --git a/docs/locators.md b/docs/locators.md index 2dae3eabb..069eb7d4c 100644 --- a/docs/locators.md +++ b/docs/locators.md @@ -25,9 +25,11 @@ by.css('.myclass') by.id('myid') // Find an element with a certain ng-model. +// Note that at the moment, this is only supported for AngularJS apps. by.model('name') // Find an element bound to the given variable. +// Note that at the moment, this is only supported for AngularJS apps. by.binding('bindingname') ``` diff --git a/lib/browser.ts b/lib/browser.ts index 02d2c868b..68dc551d3 100644 --- a/lib/browser.ts +++ b/lib/browser.ts @@ -967,7 +967,7 @@ export class ProtractorBrowser extends AbstractExtendedWebDriver { // TODO: support mock modules in Angular2. For now, error if someone // has tried to use one. if (this.mockModules_.length > 1) { - throw 'Trying to load mock modules on an Angular2 app is not yet supported.'; + throw 'Trying to load mock modules on an Angular v2+ app is not yet supported.'; } } }) diff --git a/spec/angular2Conf.js b/spec/angular2Conf.js index 47b430b60..d91d85eec 100644 --- a/spec/angular2Conf.js +++ b/spec/angular2Conf.js @@ -1,15 +1,6 @@ var env = require('./environment'); -// This is the configuration for a smoke test for an Angular2 application. -// -// *** NOTE *** -// As Angular2 is in rapid development, the test application that ships with -// the Protractor repository does not yet contain an Angular2 section. This -// configuration assumes that you are serving the examples from the -// angular/angular repository at localhost:8000. -// See https://github.com/angular/angular/blob/master/DEVELOPER.md for -// setup instructions. -// +// This is the configuration for a smoke test for an Angular TypeScript application. exports.config = { seleniumAddress: env.seleniumAddress, diff --git a/website/partials/home.html b/website/partials/home.html index e48137f80..41c1a0fb9 100644 --- a/website/partials/home.html +++ b/website/partials/home.html @@ -12,7 +12,7 @@

- Protractor is an end-to-end test framework for AngularJS applications. + Protractor is an end-to-end test framework for Angular and AngularJS applications. Protractor runs tests against your application running in a real browser, interacting with it as a user would.

@@ -25,7 +25,7 @@

Test Like a User

would.
-

For AngularJS Apps

+

For Angular Apps

Protractor supports Angular-specific locator strategies, which allows you to test Angular-specific elements without any setup effort on your part.