From 59c9a6f3bccce352798b55ae8b527bc39528e45d Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sat, 12 Nov 2016 22:21:35 +0000 Subject: [PATCH] update e2e prose --- .../upgrade-phonecat-3-final/e2e-spec.ts | 8 ++------ public/docs/ts/latest/guide/upgrade.jade | 19 ++++++++++++++----- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/public/docs/_examples/upgrade-phonecat-3-final/e2e-spec.ts b/public/docs/_examples/upgrade-phonecat-3-final/e2e-spec.ts index 49f0ca75a9..6f47c54d02 100644 --- a/public/docs/_examples/upgrade-phonecat-3-final/e2e-spec.ts +++ b/public/docs/_examples/upgrade-phonecat-3-final/e2e-spec.ts @@ -1,4 +1,4 @@ -'use strict'; // necessary for es6 output in node +'use strict'; // necessary for es6 output in node import { browser, element, by } from 'protractor'; @@ -67,11 +67,7 @@ describe('PhoneCat Application', function() { // #docregion links it('should render phone specific links', function() { let query = element(by.css('input')); - // https://github.com/angular/protractor/issues/2019 - let str = 'nexus'; - for (let i = 0; i < str.length; i++) { - query.sendKeys(str.charAt(i)); - } + query.sendKeys('nexus'); element.all(by.css('.phones li a')).first().click(); browser.getCurrentUrl().then(function(url: string) { expect(url.endsWith('/phones/nexus-s')).toBe(true); diff --git a/public/docs/ts/latest/guide/upgrade.jade b/public/docs/ts/latest/guide/upgrade.jade index fe7e78a11a..4d15888a7b 100644 --- a/public/docs/ts/latest/guide/upgrade.jade +++ b/public/docs/ts/latest/guide/upgrade.jade @@ -1519,10 +1519,17 @@ code-example(format=""). we don't change how the application behaves from the user's point of view. During TypeScript conversion, there is nothing we have to do to keep E2E tests - working. It is only when we start to upgrade components and their template to Angular 2 - that we need to make some changes. This is because the E2E tests have matchers - that are specific to Angular 1. For PhoneCat we need to make the following changes - in order to make things work with Angular 2: + working. It is only when we change our bootstrap to that of an Hybrid app that we need to + make some changes. + + The following change is needed in `protractor-conf.js` to sync with hybrid apps: +code-example(format=""). + ng12Hybrid: true + +:marked + The next set of changes is when we start to upgrade components and their template to Angular 2. + This is because the E2E tests have matchers that are specific to Angular 1. + For PhoneCat we need to make the following changes in order to make things work with Angular 2: table tr @@ -1586,7 +1593,9 @@ table pure Angular 2, Angular 1 ceases to exist on the page completely. At this point we need to tell Protractor that it should not be looking for an Angular 1 app anymore, but instead it should find *Angular 2 apps* from - the page. The following change is then needed in `protractor-conf.js`: + the page. + + Replace the `ng12Hybrid` previously added with the following in `protractor-conf.js`: code-example(format=""). useAllAngular2AppRoots: true,