feat(aio): add search to 404 page (#19682)

The 404 page will now run a search based on the given URL to offer
suggestions for the page that the user really wanted.

PR Close #19682
This commit is contained in:
Peter Bacon Darwin
2017-10-12 10:59:25 +01:00
committed by Tobias Bosch
parent 88c46feb20
commit 91fcfcb042
6 changed files with 102 additions and 1 deletions

View File

@ -100,4 +100,12 @@ describe('site App', function() {
expect(page.getSearchResults().map(link => link.getText())).toContain('ControlValueAccessor');
});
});
describe('404 page', () => {
it('should search the index for words found in the url', () => {
page.navigateTo('http/router');
expect(page.getSearchResults().map(link => link.getText())).toContain('Http');
expect(page.getSearchResults().map(link => link.getText())).toContain('Router');
});
});
});