Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/issues/show/components/incidents/mock_data.js')
-rw-r--r--spec/frontend/issues/show/components/incidents/mock_data.js37
1 files changed, 23 insertions, 14 deletions
diff --git a/spec/frontend/issues/show/components/incidents/mock_data.js b/spec/frontend/issues/show/components/incidents/mock_data.js
index 6606bed1567..f6951864344 100644
--- a/spec/frontend/issues/show/components/incidents/mock_data.js
+++ b/spec/frontend/issues/show/components/incidents/mock_data.js
@@ -1,3 +1,16 @@
+export const mockTimelineEventTags = {
+ nodes: [
+ {
+ id: 'gid://gitlab/IncidentManagement::TimelineEvent/132',
+ name: 'Start time',
+ },
+ {
+ id: 'gid://gitlab/IncidentManagement::TimelineEvent/132',
+ name: 'End time',
+ },
+ ],
+};
+
export const mockEvents = [
{
action: 'comment',
@@ -32,18 +45,7 @@ export const mockEvents = [
noteHtml: '<p>Dummy event 2</p>',
occurredAt: '2022-03-23T14:57:00Z',
updatedAt: '2022-03-23T14:57:08Z',
- timelineEventTags: {
- nodes: [
- {
- id: 'gid://gitlab/IncidentManagement::TimelineEvent/132',
- name: 'Start time',
- },
- {
- id: 'gid://gitlab/IncidentManagement::TimelineEvent/132',
- name: 'End time',
- },
- ],
- },
+ timelineEventTags: mockTimelineEventTags,
__typename: 'TimelineEventType',
},
{
@@ -187,5 +189,12 @@ export const mockInputData = {
occurredAt: '2020-08-10T02:30:00.000Z',
};
-const { id, note, occurredAt } = mockEvents[0];
-export const fakeEventData = { id, note, occurredAt };
+const { id, note, occurredAt, timelineEventTags } = mockEvents[0];
+export const fakeEventData = { id, note, occurredAt, timelineEventTags };
+export const fakeEventSaveData = {
+ id,
+ note,
+ occurredAt,
+ timelineEventTagNames: timelineEventTags,
+ ...mockInputData,
+};