diff --git a/plugins/org/src/components/Cards/Group/GroupProfile/GroupProfileCard.stories.tsx b/plugins/org/src/components/Cards/Group/GroupProfile/GroupProfileCard.stories.tsx
index a10f1b932a..39d30d8165 100644
--- a/plugins/org/src/components/Cards/Group/GroupProfile/GroupProfileCard.stories.tsx
+++ b/plugins/org/src/components/Cards/Group/GroupProfile/GroupProfileCard.stories.tsx
@@ -35,6 +35,7 @@ const dummyDepartment = {
};
const defaultEntity: GroupEntity = {
+ apiVersion: 'backstage.io/v1alpha1',
kind: 'Group',
metadata: {
name: 'team-a',
@@ -47,6 +48,8 @@ const defaultEntity: GroupEntity = {
picture:
'https://avatars.dicebear.com/api/identicon/team-a@example.com.svg?background=%23fff&margin=25',
},
+ type: 'group',
+ children: [],
},
relations: [dummyDepartment],
};
@@ -56,7 +59,7 @@ export const Default = () => (
-
+
diff --git a/plugins/org/src/components/Cards/Group/MembersList/MembersListCard.stories.tsx b/plugins/org/src/components/Cards/Group/MembersList/MembersListCard.stories.tsx
index 63259aedfa..20fb3a10ec 100644
--- a/plugins/org/src/components/Cards/Group/MembersList/MembersListCard.stories.tsx
+++ b/plugins/org/src/components/Cards/Group/MembersList/MembersListCard.stories.tsx
@@ -16,12 +16,8 @@
import { Grid } from '@material-ui/core';
import React from 'react';
import { MemoryRouter } from 'react-router';
-import { GroupEntity, UserEntity } from '@backstage/catalog-model';
-import {
- EntityContext,
- CatalogApi,
- catalogApiRef,
-} from '@backstage/plugin-catalog-react';
+import { Entity, GroupEntity } from '@backstage/catalog-model';
+import { EntityContext, catalogApiRef } from '@backstage/plugin-catalog-react';
import { ApiProvider, ApiRegistry } from '@backstage/core-api';
import { MembersListCard } from '.';
@@ -31,7 +27,18 @@ export default {
component: MembersListCard,
};
-const makeUser = ({ name, uid, displayName, email }) => ({
+const makeUser = ({
+ name,
+ uid,
+ displayName,
+ email,
+}: {
+ name: string;
+ uid: string;
+ displayName: string;
+ email: string;
+}) => ({
+ apiVersion: 'backstage.io/v1alpha1',
kind: 'User',
metadata: {
name,
@@ -57,6 +64,7 @@ const makeUser = ({ name, uid, displayName, email }) => ({
});
const defaultEntity: GroupEntity = {
+ apiVersion: 'backstage.io/v1alpha1',
kind: 'Group',
metadata: {
name: 'team-a',
@@ -69,6 +77,8 @@ const defaultEntity: GroupEntity = {
picture:
'https://avatars.dicebear.com/api/identicon/team-a@example.com.svg?background=%23fff&margin=25',
},
+ type: 'group',
+ children: [],
},
};
@@ -85,11 +95,11 @@ const bob = makeUser({
email: 'bob@example.com',
});
-const catalogApi = items => ({
+const catalogApi = (items: Entity[]) => ({
getEntities: () => Promise.resolve({ items }),
});
-const apiRegistry = items =>
+const apiRegistry = (items: Entity[]) =>
ApiRegistry.from([[catalogApiRef, catalogApi(items)]]);
export const Default = () => (
diff --git a/plugins/org/src/components/Cards/OwnershipCard/OwnershipCard.stories.tsx b/plugins/org/src/components/Cards/OwnershipCard/OwnershipCard.stories.tsx
index 5d4bd0770c..af42ef6759 100644
--- a/plugins/org/src/components/Cards/OwnershipCard/OwnershipCard.stories.tsx
+++ b/plugins/org/src/components/Cards/OwnershipCard/OwnershipCard.stories.tsx
@@ -16,7 +16,7 @@
import { Grid } from '@material-ui/core';
import React from 'react';
import { MemoryRouter } from 'react-router';
-import { GroupEntity, UserEntity } from '@backstage/catalog-model';
+import { GroupEntity } from '@backstage/catalog-model';
import {
EntityContext,
CatalogApi,
@@ -32,6 +32,7 @@ export default {
};
const defaultEntity: GroupEntity = {
+ apiVersion: 'backstage.io/v1alpha1',
kind: 'Group',
metadata: {
name: 'team-a',
@@ -44,10 +45,13 @@ const defaultEntity: GroupEntity = {
picture:
'https://avatars.dicebear.com/api/identicon/team-a@example.com.svg?background=%23fff&margin=25',
},
+ type: 'group',
+ children: [],
},
};
const makeComponent = ({ type, name }: { type: string; name: string }) => ({
+ apiVersion: 'backstage.io/v1alpha1',
kind: 'Component',
metadata: {
name,
@@ -83,7 +87,7 @@ export const Default = () => (
-
+
diff --git a/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.stories.tsx b/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.stories.tsx
index 878de91aba..b30427e923 100644
--- a/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.stories.tsx
+++ b/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.stories.tsx
@@ -35,6 +35,7 @@ const dummyGroup = {
};
const defaultEntity: UserEntity = {
+ apiVersion: 'backstage.io/v1alpha1',
kind: 'User',
metadata: {
name: 'guest',
@@ -46,6 +47,7 @@ const defaultEntity: UserEntity = {
picture:
'https://avatars.dicebear.com/api/avataaars/guest@example.com.svg?background=%23fff',
},
+ memberOf: ['team-a'],
},
relations: [dummyGroup],
};
@@ -55,7 +57,7 @@ export const Default = () => (
-
+
@@ -63,7 +65,8 @@ export const Default = () => (
);
const noImageEntity: UserEntity = {
- kind: 'user',
+ apiVersion: 'backstage.io/v1alpha1',
+ kind: 'User',
metadata: {
name: 'guest',
},
@@ -72,6 +75,7 @@ const noImageEntity: UserEntity = {
displayName: 'Guest User',
email: 'guest@example.com',
},
+ memberOf: ['team-a'],
},
relations: [dummyGroup],
};
@@ -81,7 +85,7 @@ export const NoImage = () => (
-
+