mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-05 04:40:19 +03:00
Make paths searchable
This commit is contained in:
parent
acb72d5ec0
commit
4fe22ca9d6
|
@ -20,6 +20,12 @@ describe('Search', () => {
|
|||
.first()
|
||||
.should('contain', 'Introduction');
|
||||
|
||||
getSearchInput().clear().type('uploadImage', { force: true });
|
||||
cy.get('[role=search] [role=menuitem]')
|
||||
.should('have.length', 1)
|
||||
.first()
|
||||
.should('contain', 'uploads an image');
|
||||
|
||||
getSearchInput().type('{esc}', { force: true });
|
||||
getSearchResults().should('not.exist');
|
||||
});
|
||||
|
|
|
@ -26,7 +26,7 @@ export class SearchStore<T> {
|
|||
const recurse = items => {
|
||||
items.forEach(group => {
|
||||
if (group.type !== 'group') {
|
||||
this.add(group.name, group.description || '', group.id);
|
||||
this.add(group.name, (group.description || '').concat(' ', group.path || ''), group.id);
|
||||
}
|
||||
recurse(group.items);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user