"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "aio/tests/e2e/src/api-pages.e2e-spec.ts" between
angular-11.0.1.tar.gz and angular-11.0.2.tar.gz

About: Angular is a development platform for building mobile and desktop web applications using Typescript/JavaScript.

api-pages.e2e-spec.ts  (angular-11.0.1):api-pages.e2e-spec.ts  (angular-11.0.2)
import { ApiPage } from './api.po'; import { ApiPage } from './api.po';
describe('Api pages', () => { describe('Api pages', () => {
it('should show direct subclasses of a class', () => { let page: ApiPage;
const page = new ApiPage('api/forms/AbstractControlDirective');
expect(page.getDescendants('class', true)).toEqual(['ControlContainer', 'NgC beforeEach(() => page = new ApiPage());
ontrol']);
it('should show direct subclasses of a class', async () => {
await page.navigateTo('api/forms/AbstractControlDirective');
expect(await page.getDescendants('class', true)).toEqual(['ControlContainer'
, 'NgControl']);
}); });
it('should show direct and indirect subclasses of a class', () => { it('should show direct and indirect subclasses of a class', async () => {
const page = new ApiPage('api/forms/AbstractControlDirective'); await page.navigateTo('api/forms/AbstractControlDirective');
expect(page.getDescendants('class')).toEqual([ expect(await page.getDescendants('class')).toEqual([
'ControlContainer', 'ControlContainer',
'AbstractFormGroupDirective', 'AbstractFormGroupDirective',
'NgModelGroup', 'NgModelGroup',
'FormGroupName', 'FormGroupName',
'NgForm', 'NgForm',
'FormGroupDirective', 'FormGroupDirective',
'FormArrayName', 'FormArrayName',
'NgControl', 'NgControl',
'NgModel', 'NgModel',
'FormControlDirective', 'FormControlDirective',
'FormControlName' 'FormControlName'
]); ]);
}); });
it('should show child interfaces that extend an interface', () => { it('should show child interfaces that extend an interface', async () => {
const page = new ApiPage('api/forms/Validator'); await page.navigateTo('api/forms/Validator');
expect(page.getDescendants('interface')).toEqual(['AsyncValidator']); expect(await page.getDescendants('interface')).toEqual(['AsyncValidator']);
}); });
it('should show classes that implement an interface', () => { it('should show classes that implement an interface', async () => {
const page = new ApiPage('api/animations/AnimationPlayer'); await page.navigateTo('api/animations/AnimationPlayer');
expect(page.getDescendants('class')).toEqual(['NoopAnimationPlayer', 'MockAn expect(await page.getDescendants('class')).toEqual(['NoopAnimationPlayer', '
imationPlayer']); MockAnimationPlayer']);
}); });
it('should show type params of type-aliases', () => { it('should show type params of type-aliases', async () => {
const page = new ApiPage('api/common/http/HttpEvent'); await page.navigateTo('api/common/http/HttpEvent');
expect(page.getOverview('type-alias').getText()).toContain('type HttpEvent<T expect(await page.getOverview('type-alias').getText()).toContain('type HttpE
>'); vent<T>');
}); });
it('should not show parenthesis for getters', () => { it('should not show parenthesis for getters', async () => {
const page = new ApiPage('api/core/NgModuleRef'); await page.navigateTo('api/core/NgModuleRef');
expect(page.getOverview('class').getText()).toContain('injector: Injector'); expect(await page.getOverview('class').getText()).toContain('injector: Injec
tor');
}); });
it('should show both type and initializer if set', () => { it('should show both type and initializer if set', async () => {
const page = new ApiPage('api/common/HashLocationStrategy'); await page.navigateTo('api/common/HashLocationStrategy');
expect(page.getOverview('class').getText()).toContain('path(includeHash: boo expect(await page.getOverview('class').getText()).toContain('path(includeHas
lean = false): string'); h: boolean = false): string');
}); });
it('should show a "Properties" section if there are public properties', () => it('should show a "Properties" section if there are public properties', async
{ () => {
const page = new ApiPage('api/core/ViewContainerRef'); await page.navigateTo('api/core/ViewContainerRef');
expect(page.getSection('instance-properties').isPresent()).toBe(true); expect(await page.getSection('instance-properties').isPresent()).toBe(true);
}); });
it('should not show a "Properties" section if there are only internal properti it('should not show a "Properties" section if there are only internal properti
es', () => { es', async () => {
const page = new ApiPage('api/forms/FormControl'); await page.navigateTo('api/forms/FormControl');
expect(page.getSection('instance-properties').isPresent()).toBe(false); expect(await page.getSection('instance-properties').isPresent()).toBe(false)
;
}); });
it('should show "impure" badge if pipe is not pure', () => { it('should show "impure" badge if pipe is not pure', async () => {
const page = new ApiPage('api/common/AsyncPipe'); await page.navigateTo('api/common/AsyncPipe');
const impureBadge = page.getBadge('impure-pipe'); expect(await page.getBadge('impure-pipe').isPresent()).toBe(true);
expect(impureBadge.isPresent()).toBe(true);
}); });
it('should show links to github', () => { it('should show links to github', async () => {
const page = new ApiPage('api/core/EventEmitter'); await page.navigateTo('api/core/EventEmitter');
/* tslint:disable:max-line-length */ /* tslint:disable:max-line-length */
expect(page.ghLinks.get(0).getAttribute('href')) expect(await page.ghLinks.get(0).getAttribute('href'))
.toMatch(/https:\/\/github\.com\/angular\/angular\/edit\/master\/packages\ /core\/src\/event_emitter\.ts\?message=docs\(core\)%3A%20describe%20your%20chang e\.\.\.#L\d+-L\d+/); .toMatch(/https:\/\/github\.com\/angular\/angular\/edit\/master\/packages\ /core\/src\/event_emitter\.ts\?message=docs\(core\)%3A%20describe%20your%20chang e\.\.\.#L\d+-L\d+/);
expect(page.ghLinks.get(1).getAttribute('href')) expect(await page.ghLinks.get(1).getAttribute('href'))
.toMatch(/https:\/\/github\.com\/angular\/angular\/tree\/[^/]+\/packages\/ core\/src\/event_emitter\.ts#L\d+-L\d+/); .toMatch(/https:\/\/github\.com\/angular\/angular\/tree\/[^/]+\/packages\/ core\/src\/event_emitter\.ts#L\d+-L\d+/);
/* tslint:enable:max-line-length */ /* tslint:enable:max-line-length */
}); });
}); });
 End of changes. 13 change blocks. 
41 lines changed or deleted 46 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)