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

Commit 2bf1b46

Browse files
committed
wip update to 4.0.9
1 parent 7ad0a11 commit 2bf1b46

File tree

48 files changed

+125
-127
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+125
-127
lines changed

public/docs/_examples/_boilerplate/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"experimentalDecorators": true,
99
"removeComments": false,
1010
"noImplicitAny": true,
11-
"suppressImplicitAnyIndexErrors": true
11+
"suppressImplicitAnyIndexErrors": true,
12+
"types": []
1213
}
1314
}

public/docs/_examples/animations/e2e-spec.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict'; // necessary for es6 output in node
22

3-
import { browser, element, by } from 'protractor/globals';
4-
import { ElementFinder } from 'protractor';
3+
import { browser, element, by, ElementFinder } from 'protractor';
54

65
/**
76
* The tests here basically just checking that the end styles
@@ -335,14 +334,14 @@ describe('Animation Tests', () => {
335334
}
336335

337336
function getBoundingClientWidth(el: ElementFinder): Promise<number> {
338-
return browser.driver.executeScript(
337+
return browser.executeScript(
339338
'return arguments[0].getBoundingClientRect().width',
340339
el.getWebElement()
341340
);
342341
}
343342

344343
function getOffsetWidth(el: ElementFinder): Promise<number> {
345-
return browser.driver.executeScript(
344+
return browser.executeScript(
346345
'return arguments[0].offsetWidth',
347346
el.getWebElement()
348347
);

public/docs/_examples/architecture/e2e-spec.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict'; // necessary for es6 output in node
22

3-
import { protractor, browser, element, by } from 'protractor/globals';
4-
import { ElementFinder } from 'protractor';
3+
import { protractor, browser, element, by, ElementFinder } from 'protractor';
54

65
const nameSuffix = 'X';
76

@@ -45,7 +44,8 @@ function heroTests() {
4544
});
4645

4746
it('shows selected hero details', async () => {
48-
await element(by.cssContainingText('li', targetHero.name)).click();
47+
// await element(by.cssContainingText('li', targetHero.name)).click();
48+
await <Promise<void>>(<any>(element(by.cssContainingText('li', targetHero.name)).click()));
4949
let page = getPageElts();
5050
let hero = await heroFromDetail(page.heroDetail);
5151
expect(hero.id).toEqual(targetHero.id);
@@ -91,9 +91,11 @@ function getPageElts() {
9191

9292
async function heroFromDetail(detail: ElementFinder): Promise<Hero> {
9393
// Get hero id from the first <div>
94-
let _id = await detail.all(by.css('div')).first().getText();
94+
// let _id = await detail.all(by.css('div')).first().getText();
95+
let _id = await <Promise<string>>(<any>(detail.all(by.css('div')).first().getText()));
9596
// Get name from the h2
96-
let _name = await detail.element(by.css('h4')).getText();
97+
// let _name = await detail.element(by.css('h4')).getText();
98+
let _name = await <Promise<string>>(<any>( detail.element(by.css('h4')).getText()));
9799
return {
98100
id: +_id.substr(_id.indexOf(' ') + 1),
99101
name: _name.substr(0, _name.lastIndexOf(' '))

public/docs/_examples/attribute-directives/e2e-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'; // necessary for es6 output in node
22

3-
import { browser, element, by } from 'protractor/globals';
3+
import { browser, element, by } from 'protractor';
44

55
describe('Attribute directives', function () {
66

public/docs/_examples/cb-a1-a2-quick-reference/e2e-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'; // necessary for es6 output in node
22

3-
import { browser, element, by } from 'protractor/globals';
3+
import { browser, element, by } from 'protractor';
44

55
describe('Angular 1 to 2 Quick Reference Tests', function () {
66

public/docs/_examples/cb-component-communication/e2e-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'; // necessary for es6 output in node
22

3-
import { browser, element, by } from 'protractor/globals';
3+
import { browser, element, by } from 'protractor';
44

55
describe('Component Communication Cookbook Tests', function () {
66

public/docs/_examples/cb-component-relative-paths/e2e-spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict'; // necessary for es6 output in node
22

3-
import { browser, element, by } from 'protractor/globals';
4-
import { ElementFinder } from 'protractor';
3+
import { browser, element, by, ElementFinder } from 'protractor';
54

65
describe('Cookbook: component-relative paths', function () {
76

public/docs/_examples/cb-dependency-injection/e2e-spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict'; // necessary for es6 output in node
22

3-
import { browser, element, by } from 'protractor/globals';
4-
import { webdriver } from '../protractor-helpers';
3+
import { browser, element, by } from 'protractor';
54

65
describe('Dependency Injection Cookbook', function () {
76

@@ -74,7 +73,7 @@ describe('Dependency Injection Cookbook', function () {
7473
let yellow = 'rgba(255, 255, 0, 1)';
7574

7675
expect(target.getCssValue('background-color')).not.toEqual(yellow);
77-
browser.actions().mouseMove(target as any as webdriver.WebElement).perform();
76+
browser.actions().mouseMove(target.getWebElement()).perform();
7877
expect(target.getCssValue('background-color')).toEqual(yellow);
7978
});
8079

public/docs/_examples/cb-dynamic-form-deprecated/e2e-spec.ts.disabled

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'; // necessary for es6 output in node
22

3-
import { browser, element, by } from 'protractor/globals';
3+
import { browser, element, by } from 'protractor';
44

55
/* tslint:disable:quotemark */
66
describe('Dynamic Form Deprecated', function () {

public/docs/_examples/cb-dynamic-form/e2e-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'; // necessary for es6 output in node
22

3-
import { browser, element, by } from 'protractor/globals';
3+
import { browser, element, by } from 'protractor';
44

55
/* tslint:disable:quotemark */
66
describe('Dynamic Form', function () {

0 commit comments

Comments
 (0)