diff --git a/modules/playground/e2e_test/upgrade/upgrade_spec.ts b/modules/playground/e2e_test/upgrade/upgrade_spec.ts index eb5a86520d..0a568a1a30 100644 --- a/modules/playground/e2e_test/upgrade/upgrade_spec.ts +++ b/modules/playground/e2e_test/upgrade/upgrade_spec.ts @@ -6,23 +6,20 @@ * found in the LICENSE file at https://angular.io/license */ -import {verifyNoBrowserErrors} from 'e2e_util/e2e_util'; import {browser, by, element} from 'protractor'; -// TODO(i): re-enable once we are using a version of protractor containing the -// change in https://github.com/angular/protractor/pull/3403 -xdescribe('ngUpgrade', function() { - const URL = 'all/playground/src/upgrade/index.html'; +import {verifyNoBrowserErrors} from '../../../e2e_util/e2e_util'; + +describe('ngUpgrade', function() { + const URL = '/'; beforeEach(function() { browser.rootEl = 'body'; - (browser).ng12Hybrid = true; browser.get(URL); }); afterEach(function() { - (browser).useAllAngular2AppRoots(); - (browser).ng12Hybrid = false; + browser.useAllAngular2AppRoots(); verifyNoBrowserErrors(); }); @@ -30,7 +27,10 @@ xdescribe('ngUpgrade', function() { const ng1NameInput = element(by.css('input[ng-model="name"]')); expect(ng1NameInput.getAttribute('value')).toEqual('World'); - const userSpan = element(by.css('user span')); - expect(userSpan.getText()).toMatch(/World$/); + const projectedGreetingEl = element(by.css('.projected-content .greeting')); + const upgradedNg1ComponentEl = element(by.css('ng1-user')); + + expect(projectedGreetingEl.getText()).toMatch(/World!$/); + expect(upgradedNg1ComponentEl.getText()).toMatch(/^User: World/); }); }); diff --git a/modules/playground/src/upgrade/index.ts b/modules/playground/src/upgrade/index.ts index 809d004a88..7b737ebeab 100644 --- a/modules/playground/src/upgrade/index.ts +++ b/modules/playground/src/upgrade/index.ts @@ -61,7 +61,7 @@ export class Pane { - +