build(aio): use correct types for e2e tests

This commit is contained in:
George Kalpakas
2017-11-02 21:31:31 +02:00
committed by Victor Berchet
parent faa621218e
commit 196ce6d475
4 changed files with 18 additions and 6 deletions

View File

@ -3,23 +3,22 @@ import { ApiPage } from './api.po';
describe('Api pages', function() {
it('should show direct subclasses of a class', () => {
const page = new ApiPage('api/forms/AbstractControlDirective');
// We must use `as any` (here and below) because of broken typings for jasmine
expect(page.getDescendants('class', true)).toEqual(['ControlContainer', 'NgControl'] as any);
expect(page.getDescendants('class', true)).toEqual(['ControlContainer', 'NgControl']);
});
it('should show direct and indirect subclasses of a class', () => {
const page = new ApiPage('api/forms/AbstractControlDirective');
expect(page.getDescendants('class')).toEqual(['ControlContainer', 'AbstractFormGroupDirective', 'NgControl'] as any);
expect(page.getDescendants('class')).toEqual(['ControlContainer', 'AbstractFormGroupDirective', 'NgControl']);
});
it('should show child interfaces that extend an interface', () => {
const page = new ApiPage('api/forms/Validator');
expect(page.getDescendants('interface')).toEqual(['AsyncValidator'] as any);
expect(page.getDescendants('interface')).toEqual(['AsyncValidator']);
});
it('should show classes that implement an interface', () => {
const page = new ApiPage('api/animations/AnimationPlayer');
expect(page.getDescendants('class')).toEqual(['NoopAnimationPlayer', 'MockAnimationPlayer'] as any);
expect(page.getDescendants('class')).toEqual(['NoopAnimationPlayer', 'MockAnimationPlayer']);
});
it('should show type params of type-aliases', () => {