build(examples): work around protractor typings issues and fix existing type errors

This works around the typings issues until we have a build of protractor with typings that don't
polute global types via ambient type definitions
This commit is contained in:
Igor Minar
2016-09-13 15:58:45 -07:00
parent 7105021c41
commit 4e6c41b3a1
17 changed files with 37 additions and 37 deletions

View File

@ -10,8 +10,8 @@ import {verifyNoBrowserErrors} from '../../../../_common/e2e_util';
describe('nestedFormArray example', () => {
afterEach(verifyNoBrowserErrors);
let inputs: ElementFinder;
let buttons: ElementFinder;
let inputs: protractor.ElementArrayFinder;
let buttons: protractor.ElementArrayFinder;
beforeEach(() => {
browser.get('/forms/ts/nestedFormArray/index.html');
@ -25,12 +25,12 @@ describe('nestedFormArray example', () => {
});
it('should add inputs programmatically', () => {
expect(browser.isElementPresent(inputs.get(2))).toBe(false);
expect(inputs.count()).toBe(2);
buttons.get(1).click();
inputs = element.all(by.css('input'));
expect(browser.isElementPresent(inputs.get(2))).toBe(true);
expect(inputs.count()).toBe(3);
});
it('should set the value programmatically', () => {

View File

@ -34,7 +34,7 @@ export class NestedFormArray {
]),
});
get cities(): FormArray { return this.form.get('cities'); }
get cities(): FormArray { return this.form.get('cities') as FormArray; }
addCity() { this.cities.push(new FormControl()); }