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:
@ -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', () => {
|
||||
|
@ -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()); }
|
||||
|
||||
|
Reference in New Issue
Block a user