2020-12-07 13:48:48 +00:00
|
|
|
import { EventJoinOptions, ParticipantRole } from "@/types/enums";
|
|
|
|
|
|
|
|
type DataMock = {
|
|
|
|
data: Record<string, unknown>;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const fetchEventBasicMock = {
|
|
|
|
data: {
|
|
|
|
event: {
|
|
|
|
__typename: "Event",
|
|
|
|
id: "1",
|
|
|
|
uuid: "f37910ea-fd5a-4756-9679-00971f3f4106",
|
|
|
|
joinOptions: EventJoinOptions.FREE,
|
|
|
|
participantStats: {
|
2021-04-08 07:53:46 +00:00
|
|
|
__typename: "ParticipantStats",
|
2020-12-07 13:48:48 +00:00
|
|
|
notApproved: 0,
|
|
|
|
notConfirmed: 0,
|
|
|
|
rejected: 0,
|
|
|
|
participant: 0,
|
|
|
|
creator: 1,
|
|
|
|
moderator: 0,
|
|
|
|
administrator: 0,
|
|
|
|
going: 1,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export const joinEventResponseMock = {
|
|
|
|
data: {
|
|
|
|
joinEvent: {
|
2021-04-08 07:53:46 +00:00
|
|
|
__typename: "Participant",
|
2020-12-07 13:48:48 +00:00
|
|
|
id: "5",
|
|
|
|
role: ParticipantRole.NOT_APPROVED,
|
|
|
|
insertedAt: "2020-12-07T09:33:41Z",
|
|
|
|
metadata: {
|
2021-04-08 07:53:46 +00:00
|
|
|
__typename: "ParticipantMetadata",
|
2020-12-07 13:48:48 +00:00
|
|
|
cancellationToken: "some token",
|
|
|
|
message: "a message long enough",
|
|
|
|
},
|
|
|
|
event: {
|
2021-04-08 07:53:46 +00:00
|
|
|
__typename: "Event",
|
2020-12-07 13:48:48 +00:00
|
|
|
id: "1",
|
|
|
|
uuid: "f37910ea-fd5a-4756-9679-00971f3f4106",
|
|
|
|
},
|
|
|
|
actor: {
|
2021-04-08 07:53:46 +00:00
|
|
|
__typename: "Person",
|
|
|
|
preferredUsername: "some_actor",
|
|
|
|
name: "Some actor",
|
|
|
|
avatar: null,
|
|
|
|
domain: null,
|
2020-12-07 13:48:48 +00:00
|
|
|
id: "1",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export const joinEventMock = {
|
|
|
|
eventId: "1",
|
|
|
|
actorId: "1",
|
|
|
|
email: "some@email.tld",
|
|
|
|
message: "a message long enough",
|
|
|
|
locale: "en_US",
|
|
|
|
};
|
|
|
|
|
2021-06-10 12:44:56 +00:00
|
|
|
export const eventNoCommentThreadsMock = {
|
|
|
|
data: {
|
|
|
|
event: {
|
|
|
|
__typename: "Event",
|
|
|
|
id: "1",
|
|
|
|
uuid: "f37910ea-fd5a-4756-9679-00971f3f4106",
|
|
|
|
comments: [],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2020-12-03 16:22:05 +00:00
|
|
|
export const eventCommentThreadsMock = {
|
|
|
|
data: {
|
|
|
|
event: {
|
|
|
|
__typename: "Event",
|
|
|
|
id: "1",
|
|
|
|
uuid: "f37910ea-fd5a-4756-9679-00971f3f4106",
|
|
|
|
comments: [
|
|
|
|
{
|
|
|
|
__typename: "Comment",
|
|
|
|
id: "2",
|
|
|
|
uuid: "e37910ea-fd5a-4756-9679-00971f3f4107",
|
2021-05-17 17:01:08 +00:00
|
|
|
url: "https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-00971f3f4107",
|
2020-12-03 16:22:05 +00:00
|
|
|
text: "my comment text",
|
|
|
|
local: true,
|
|
|
|
visibility: "PUBLIC",
|
|
|
|
totalReplies: 5,
|
|
|
|
updatedAt: "2020-12-03T09:02:00Z",
|
2021-06-04 18:24:43 +00:00
|
|
|
inReplyToComment: null,
|
|
|
|
originComment: null,
|
|
|
|
replies: [],
|
2020-12-03 16:22:05 +00:00
|
|
|
actor: {
|
2021-04-08 07:53:46 +00:00
|
|
|
__typename: "Person",
|
2020-12-03 16:22:05 +00:00
|
|
|
avatar: {
|
2021-04-08 07:53:46 +00:00
|
|
|
__typename: "Media",
|
2020-12-03 16:22:05 +00:00
|
|
|
id: "78",
|
|
|
|
url: "http://someavatar.url.me",
|
|
|
|
},
|
|
|
|
id: "89",
|
|
|
|
domain: null,
|
|
|
|
preferredUsername: "someauthor",
|
|
|
|
name: "Some author",
|
|
|
|
summary: "I am the senate",
|
|
|
|
},
|
|
|
|
deletedAt: null,
|
2021-06-04 18:24:43 +00:00
|
|
|
isAnnouncement: false,
|
2020-12-03 16:22:05 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
__typename: "Comment",
|
|
|
|
id: "29",
|
|
|
|
uuid: "e37910ea-fd5a-4756-9679-01171f3f4107",
|
2021-05-17 17:01:08 +00:00
|
|
|
url: "https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-01171f3f4107",
|
2020-12-03 16:22:05 +00:00
|
|
|
text: "a second comment",
|
|
|
|
local: true,
|
|
|
|
visibility: "PUBLIC",
|
|
|
|
totalReplies: 0,
|
|
|
|
updatedAt: "2020-12-03T11:02:00Z",
|
2021-06-04 18:24:43 +00:00
|
|
|
inReplyToComment: null,
|
|
|
|
originComment: null,
|
|
|
|
replies: [],
|
2020-12-03 16:22:05 +00:00
|
|
|
actor: {
|
2021-04-08 07:53:46 +00:00
|
|
|
__typename: "Person",
|
2020-12-03 16:22:05 +00:00
|
|
|
avatar: {
|
2021-04-08 07:53:46 +00:00
|
|
|
__typename: "Media",
|
2020-12-03 16:22:05 +00:00
|
|
|
id: "78",
|
|
|
|
url: "http://someavatar.url.me",
|
|
|
|
},
|
|
|
|
id: "89",
|
|
|
|
domain: null,
|
|
|
|
preferredUsername: "someauthor",
|
|
|
|
name: "Some author",
|
|
|
|
summary: "I am the senate",
|
|
|
|
},
|
|
|
|
deletedAt: null,
|
2021-06-04 18:24:43 +00:00
|
|
|
isAnnouncement: false,
|
2020-12-03 16:22:05 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export const newCommentForEventMock = {
|
|
|
|
eventId: "1",
|
|
|
|
text: "my new comment",
|
|
|
|
inReplyToCommentId: null,
|
2021-06-04 18:24:43 +00:00
|
|
|
isAnnouncement: false,
|
2020-12-03 16:22:05 +00:00
|
|
|
};
|
|
|
|
|
2020-12-07 13:48:48 +00:00
|
|
|
export const newCommentForEventResponse: DataMock = {
|
2020-12-03 16:22:05 +00:00
|
|
|
data: {
|
|
|
|
createComment: {
|
2021-04-08 07:53:46 +00:00
|
|
|
__typename: "Comment",
|
2020-12-03 16:22:05 +00:00
|
|
|
id: "79",
|
|
|
|
uuid: "e37910ea-fd5a-4756-9679-01171f3f4444",
|
2021-05-17 17:01:08 +00:00
|
|
|
url: "https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-01171f3f4444",
|
2020-12-03 16:22:05 +00:00
|
|
|
text: newCommentForEventMock.text,
|
|
|
|
local: true,
|
|
|
|
visibility: "PUBLIC",
|
|
|
|
totalReplies: 0,
|
|
|
|
updatedAt: "2020-12-03T13:02:00Z",
|
|
|
|
originComment: null,
|
|
|
|
inReplyToComment: null,
|
2021-04-08 07:53:46 +00:00
|
|
|
replies: [],
|
2020-12-03 16:22:05 +00:00
|
|
|
actor: {
|
2021-04-08 07:53:46 +00:00
|
|
|
__typename: "Person",
|
2020-12-03 16:22:05 +00:00
|
|
|
avatar: {
|
2021-04-08 07:53:46 +00:00
|
|
|
__typename: "Media",
|
2020-12-03 16:22:05 +00:00
|
|
|
id: "78",
|
|
|
|
url: "http://someavatar.url.me",
|
|
|
|
},
|
|
|
|
id: "89",
|
|
|
|
domain: null,
|
|
|
|
preferredUsername: "someauthor",
|
|
|
|
name: "Some author",
|
|
|
|
summary: "I am the senate",
|
|
|
|
},
|
|
|
|
deletedAt: null,
|
2021-06-04 18:24:43 +00:00
|
|
|
isAnnouncement: false,
|
2020-12-03 16:22:05 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|