mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build(aio): add API static members to search index (#21988)
Previously searching for `compose` did not include `Validators` in the search results because we were not including all the `static` members of API docs in the index. PR Close #21988
This commit is contained in:
committed by
Alex Rickabaugh
parent
b155ae116b
commit
664f7fa477
@@ -115,18 +115,6 @@ describe('site App', function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe('search', () => {
|
||||
it('should find pages when searching by a partial word in the title', () => {
|
||||
page.navigateTo('');
|
||||
|
||||
page.enterSearch('ngCont');
|
||||
expect(page.getSearchResults()).toContain('NgControl');
|
||||
|
||||
page.enterSearch('accessor');
|
||||
expect(page.getSearchResults()).toContain('ControlValueAccessor');
|
||||
});
|
||||
});
|
||||
|
||||
describe('404 page', () => {
|
||||
it('should add or remove the "noindex" meta tag depending upon the validity of the page', () => {
|
||||
page.navigateTo('');
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import { SitePage } from './app.po';
|
||||
|
||||
describe('site search', () => {
|
||||
let page;
|
||||
|
||||
beforeEach(() => {
|
||||
page = new SitePage();
|
||||
page.navigateTo('');
|
||||
});
|
||||
|
||||
it('should find pages when searching by a partial word in the title', () => {
|
||||
page.enterSearch('ngCont');
|
||||
expect(page.getSearchResults()).toContain('NgControl');
|
||||
|
||||
page.enterSearch('accessor');
|
||||
expect(page.getSearchResults()).toContain('ControlValueAccessor');
|
||||
});
|
||||
|
||||
it('should find API docs whose instance member name matches the search query', () => {
|
||||
page.enterSearch('decode');
|
||||
expect(page.getSearchResults()).toContain('HttpParameterCodec');
|
||||
});
|
||||
|
||||
it('should find API docs whose static method name matches the search query', () => {
|
||||
page.enterSearch('compose');
|
||||
expect(page.getSearchResults()).toContain('Validators');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user