mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
add getVisibleTypes API to SO type registry (#70559)
* add getVisibleTypes API * doc nit * fix mocking in tests
This commit is contained in:
parent
a8347fad1c
commit
1cfc9356bd
10 changed files with 70 additions and 16 deletions
|
@ -10,19 +10,13 @@ const initContext = coreMock.createPluginInitializerContext();
|
|||
const coreSetup = coreMock.createSetup();
|
||||
const coreStart = coreMock.createStart();
|
||||
const typeRegistry = savedObjectsServiceMock.createTypeRegistryMock();
|
||||
typeRegistry.getAllTypes.mockReturnValue([
|
||||
typeRegistry.getVisibleTypes.mockReturnValue([
|
||||
{
|
||||
name: 'foo',
|
||||
hidden: false,
|
||||
mappings: { properties: {} },
|
||||
namespaceType: 'single' as 'single',
|
||||
},
|
||||
{
|
||||
name: 'bar',
|
||||
hidden: true,
|
||||
mappings: { properties: {} },
|
||||
namespaceType: 'agnostic' as 'agnostic',
|
||||
},
|
||||
]);
|
||||
coreStart.savedObjects.getTypeRegistry.mockReturnValue(typeRegistry);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue