diff --git a/public/docs/_examples/protractor-helpers.ts b/public/docs/_examples/protractor-helpers.ts index 9eae89b886..0dfb235d96 100644 --- a/public/docs/_examples/protractor-helpers.ts +++ b/public/docs/_examples/protractor-helpers.ts @@ -23,25 +23,18 @@ export function itIf(cond: boolean, name: string, func: (done: DoneFn) => void): } } -// TODO Jesus - figure out what's needed here for the new upgrade chapters -// Allow changing bootstrap mode to NG1 for upgrade tests export function setProtractorToNg1Mode(): void { browser.rootEl = 'body'; - // let disableNgAnimate = function() { - // angular.module('disableNgAnimate', []).run(['$animate', function($animate: any) { - // $animate.enabled(false); - // }]); - // }; - - // browser.addMockModule('disableNgAnimate', disableNgAnimate); } // Protractor doesn't support the UpgradeAdapter's asynchronous // bootstrap with Angular 1 at the moment. Get around it by // waiting for an element to get `ng-scope` class. export function waitForNg1AsyncBootstrap() { - browser.ignoreSynchronization = true; + browser.ng12Hybrid = true; browser.driver.wait(function() { return element(by.css('.ng-scope')).isPresent(); }, 5000); + // Use this instead when upgrading to protractor > 4.0.10 + // browser.ng12Hybrid = true; } diff --git a/public/docs/_examples/upgrade-adapter/e2e-spec.ts b/public/docs/_examples/upgrade-adapter/e2e-spec.ts index e6f4d7138b..16d860bd2f 100644 --- a/public/docs/_examples/upgrade-adapter/e2e-spec.ts +++ b/public/docs/_examples/upgrade-adapter/e2e-spec.ts @@ -51,6 +51,7 @@ describe('Upgrade Tests', function () { beforeAll(function () { browser.get('/index-1-2-hybrid-shared-adapter-bootstrap.html'); setProtractorToNg1Mode(); + waitForNg1AsyncBootstrap(); }); it('bootstraps as expected', function () {