Remove activityType and Id (#1179)
* Remove activityType and Id * Fix tests * Fix tests
This commit is contained in:
@ -3,7 +3,9 @@ import {
|
||||
ActivityTarget,
|
||||
ActivityType,
|
||||
Comment,
|
||||
CommentableType,
|
||||
Company,
|
||||
Person,
|
||||
User,
|
||||
} from '~/generated/graphql';
|
||||
|
||||
type MockedActivity = Pick<
|
||||
@ -33,7 +35,11 @@ type MockedActivity = Pick<
|
||||
lastName: string;
|
||||
displayName: string;
|
||||
};
|
||||
comments: Array<Pick<Comment, 'body' | 'id'>>;
|
||||
comments: Array<
|
||||
Pick<Comment, 'body' | 'id' | 'createdAt' | 'updatedAt'> & {
|
||||
author: Pick<User, 'id' | 'displayName' | 'avatarUrl'>;
|
||||
}
|
||||
>;
|
||||
activityTargets: Array<
|
||||
Pick<
|
||||
ActivityTarget,
|
||||
@ -42,9 +48,13 @@ type MockedActivity = Pick<
|
||||
| 'createdAt'
|
||||
| 'updatedAt'
|
||||
| 'activityId'
|
||||
| 'commentableId'
|
||||
| 'commentableType'
|
||||
> & { activity: Pick<Activity, 'id' | 'createdAt' | 'updatedAt'> }
|
||||
| 'personId'
|
||||
| 'companyId'
|
||||
> & {
|
||||
activity: Pick<Activity, 'id' | 'createdAt' | 'updatedAt'>;
|
||||
person?: Pick<Person, 'id' | 'displayName'>;
|
||||
company?: Pick<Company, 'id' | 'name' | 'domainName'>;
|
||||
}
|
||||
>;
|
||||
};
|
||||
|
||||
@ -106,8 +116,13 @@ export const mockedActivities: Array<MockedActivity> = [
|
||||
id: '89bb825c-171e-4bcc-9cf7-43448d6fb300',
|
||||
createdAt: '2023-04-26T10:12:42.33625+00:00',
|
||||
updatedAt: '2023-04-26T10:23:42.33625+00:00',
|
||||
commentableType: CommentableType.Company,
|
||||
commentableId: '89bb825c-171e-4bcc-9cf7-43448d6fb278', // airbnb
|
||||
personId: null,
|
||||
companyId: '89bb825c-171e-4bcc-9cf7-43448d6fb278',
|
||||
company: {
|
||||
id: '89bb825c-171e-4bcc-9cf7-43448d6fb278',
|
||||
name: 'Airbnb',
|
||||
domainName: 'airbnb.com',
|
||||
},
|
||||
activityId: '89bb825c-171e-4bcc-9cf7-43448d6fb230',
|
||||
activity: {
|
||||
id: '89bb825c-171e-4bcc-9cf7-43448d6fb230',
|
||||
@ -120,8 +135,13 @@ export const mockedActivities: Array<MockedActivity> = [
|
||||
id: '89bb825c-171e-4bcc-9cf7-43448d6fb301',
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
commentableType: CommentableType.Company,
|
||||
commentableId: 'b396e6b9-dc5c-4643-bcff-61b6cf7523ae', // aircall
|
||||
personId: null,
|
||||
companyId: 'b396e6b9-dc5c-4643-bcff-61b6cf7523ae',
|
||||
company: {
|
||||
id: '89bb825c-171e-4bcc-9cf7-43448d6fb278',
|
||||
name: 'Aircall',
|
||||
domainName: 'aircall.io',
|
||||
},
|
||||
activityId: '89bb825c-171e-4bcc-9cf7-43448d6fb231',
|
||||
activity: {
|
||||
id: '89bb825c-171e-4bcc-9cf7-43448d6fb231',
|
||||
@ -161,8 +181,12 @@ export const mockedActivities: Array<MockedActivity> = [
|
||||
id: '89bb825c-171e-4bcc-9cf7-43448d6fb278',
|
||||
createdAt: '2023-04-26T10:12:42.33625+00:00',
|
||||
updatedAt: '2023-04-26T10:23:42.33625+00:00',
|
||||
commentableType: CommentableType.Person,
|
||||
commentableId: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b', // Alexandre
|
||||
personId: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b', // Alexandre
|
||||
person: {
|
||||
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b',
|
||||
displayName: 'Alexandre Test',
|
||||
},
|
||||
companyId: null,
|
||||
activityId: '89bb825c-171e-4bcc-9cf7-43448d6fb278',
|
||||
activity: {
|
||||
id: '89bb825c-171e-4bcc-9cf7-43448d6fb278',
|
||||
@ -175,8 +199,8 @@ export const mockedActivities: Array<MockedActivity> = [
|
||||
id: '89bb825c-171e-4bcc-9cf7-43448d6fb278',
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
commentableType: CommentableType.Person,
|
||||
commentableId: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6d', // Jean d'Eau
|
||||
personId: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6d', // Jean d'Eau
|
||||
companyId: null,
|
||||
activityId: '89bb825c-171e-4bcc-9cf7-43448d6fb278',
|
||||
activity: {
|
||||
id: '89bb825c-171e-4bcc-9cf7-43448d6fb278',
|
||||
|
||||
Reference in New Issue
Block a user