Merge pull request #26899 from yashoswalyo/catalog-feat-26898
feat(catalog): Implement breadcrumbs for entity navigation
This commit is contained in:
@@ -13,12 +13,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { EntityLayout, catalogPlugin } from '@backstage/plugin-catalog';
|
||||
import {
|
||||
EntityProvider,
|
||||
starredEntitiesApiRef,
|
||||
MockStarredEntitiesApi,
|
||||
catalogApiRef,
|
||||
} from '@backstage/plugin-catalog-react';
|
||||
import { permissionApiRef } from '@backstage/plugin-permission-react';
|
||||
import {
|
||||
@@ -28,6 +28,7 @@ import {
|
||||
} from '@backstage/test-utils';
|
||||
import React from 'react';
|
||||
import { cicdContent } from './EntityPage';
|
||||
import { catalogApiMock } from '@backstage/plugin-catalog-react/testUtils';
|
||||
|
||||
describe('EntityPage Test', () => {
|
||||
const entity = {
|
||||
@@ -55,6 +56,7 @@ describe('EntityPage Test', () => {
|
||||
apis={[
|
||||
[starredEntitiesApiRef, new MockStarredEntitiesApi()],
|
||||
[permissionApiRef, mockApis.permission()],
|
||||
[catalogApiRef, catalogApiMock()],
|
||||
]}
|
||||
>
|
||||
<EntityProvider entity={entity}>
|
||||
|
||||
@@ -85,15 +85,14 @@ const customEntityFilterKind = ['Component', 'API', 'System'];
|
||||
|
||||
const EntityLayoutWrapper = (props: { children?: ReactNode }) => {
|
||||
return (
|
||||
<>
|
||||
<EntityLayout
|
||||
UNSTABLE_contextMenuOptions={{
|
||||
disableUnregister: 'visible',
|
||||
}}
|
||||
>
|
||||
{props.children}
|
||||
</EntityLayout>
|
||||
</>
|
||||
<EntityLayout
|
||||
parentEntityRelations={['partOf', 'memberOf', 'childOf']}
|
||||
UNSTABLE_contextMenuOptions={{
|
||||
disableUnregister: 'visible',
|
||||
}}
|
||||
>
|
||||
{props.children}
|
||||
</EntityLayout>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user