frontend-test-utils: updates to work with new extension IDs

Co-authored-by: Camila Belo <camilaibs@gmail.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-11-22 14:20:56 +01:00
parent e3b55e280d
commit 818eea4925
8 changed files with 73 additions and 21 deletions
+3 -2
View File
@@ -44,7 +44,7 @@ describe('createSearchResultListItemExtension', () => {
const TechDocsSearchResultItemExtension =
createSearchResultListItemExtension({
attachTo: { id: 'plugin.search.page', input: 'items' },
namespace: 'techdocs',
configSchema: createSchemaFromZod(z =>
z
.object({
@@ -66,12 +66,13 @@ describe('createSearchResultListItemExtension', () => {
const ExploreSearchResultItemExtension =
createSearchResultListItemExtension({
attachTo: { id: 'plugin.search.page', input: 'items' },
namespace: 'explore',
predicate: result => result.type === 'explore',
component: async () => ExploreSearchResultItemComponent,
});
const SearchPageExtension = createPageExtension({
namespace: 'search',
defaultPath: '/',
inputs: {
items: createExtensionInput({