build(aio): improve the API Pipe pages (#22702)

This change adds:

* an impure badge for Pipes that are marked as  `pure: false`
* a pipe specific overview that shows the syntax for using a pipe in a template.
* an "input value" section describing the type of the value that the pipe expects.
* a "pipe params" section describing any additional params that a pipe expects.

PR Close #22702
This commit is contained in:
Pete Bacon Darwin
2018-03-11 09:42:49 +00:00
committed by Kara Erickson
parent cd2ebd22fd
commit d509bd6849
10 changed files with 123 additions and 2 deletions

View File

@ -51,6 +51,12 @@ describe('Api pages', function() {
expect(page.getSection('instance-properties').isPresent()).toBe(false);
});
it('should show "impure" badge if pipe is not pure', () => {
const page = new ApiPage('api/common/AsyncPipe');
const impureBadge = page.getBadge('impure-pipe');
expect(impureBadge.isPresent()).toBe(true);
});
it('should show links to github', () => {
const page = new ApiPage('api/core/EventEmitter');
/* tslint:disable:max-line-length */

View File

@ -35,4 +35,8 @@ export class ApiPage extends SitePage {
getSection(cls) {
return element(by.css(`section.${cls}`));
}
getBadge(cls) {
return element(by.css('.api-status-label.' + cls));
}
}