Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 6e5b8a4

Browse files
committed
add hybrid toggle switch to helpers
1 parent cb3d3b3 commit 6e5b8a4

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

public/docs/_examples/protractor-helpers.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,18 @@ export function itIf(cond: boolean, name: string, func: (done: DoneFn) => void):
2323
}
2424
}
2525

26-
// TODO Jesus - figure out what's needed here for the new upgrade chapters
27-
// Allow changing bootstrap mode to NG1 for upgrade tests
2826
export function setProtractorToNg1Mode(): void {
2927
browser.rootEl = 'body';
30-
// let disableNgAnimate = function() {
31-
// angular.module('disableNgAnimate', []).run(['$animate', function($animate: any) {
32-
// $animate.enabled(false);
33-
// }]);
34-
// };
35-
36-
// browser.addMockModule('disableNgAnimate', disableNgAnimate);
3728
}
3829

3930
// Protractor doesn't support the UpgradeAdapter's asynchronous
4031
// bootstrap with Angular 1 at the moment. Get around it by
4132
// waiting for an element to get `ng-scope` class.
4233
export function waitForNg1AsyncBootstrap() {
43-
browser.ignoreSynchronization = true;
34+
browser.ng12Hybrid = true;
4435
browser.driver.wait(function() {
4536
return element(by.css('.ng-scope')).isPresent();
4637
}, 5000);
38+
// Use this instead when upgrading to protractor > 4.0.10
39+
// browser.ng12Hybrid = true;
4740
}

public/docs/_examples/upgrade-adapter/e2e-spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ describe('Upgrade Tests', function () {
5151
beforeAll(function () {
5252
browser.get('/index-1-2-hybrid-shared-adapter-bootstrap.html');
5353
setProtractorToNg1Mode();
54+
waitForNg1AsyncBootstrap();
5455
});
5556

5657
it('bootstraps as expected', function () {

0 commit comments

Comments
 (0)