Make paths searchable

This commit is contained in:
Bhavin Patel 2022-08-29 18:02:01 -04:00
parent acb72d5ec0
commit 4fe22ca9d6
2 changed files with 7 additions and 1 deletions

View File

@ -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');
});

View File

@ -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);
});