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:

committed by
Kara Erickson

parent
cd2ebd22fd
commit
d509bd6849
@ -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 */
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user