Skip to content

Commit 081a3d6

Browse files
committed
Fix stories
1 parent 68ace3f commit 081a3d6

File tree

3 files changed

+26
-20
lines changed

3 files changed

+26
-20
lines changed
Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { Meta, StoryObj } from "@storybook/react-webpack5";
22
import { IncidentSummary } from ".";
3+
import { mockedIncidentSummaryRecords } from "./mockData";
34

45
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
56
const meta: Meta<typeof IncidentSummary> = {
@@ -18,25 +19,6 @@ type Story = StoryObj<typeof IncidentSummary>;
1819
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
1920
export const Default: Story = {
2021
args: {
21-
records: [
22-
{
23-
id: "1",
24-
agent_display_name: "triager",
25-
timestamp: "2023-10-01T12:00:00Z",
26-
text: "Lorem ipsum dolor sit amet"
27-
},
28-
{
29-
id: "2",
30-
agent_display_name: "code resolver",
31-
timestamp: "2023-10-01T12:00:00Z",
32-
text: "Lorem ipsum dolor sit amet consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
33-
},
34-
{
35-
id: "3",
36-
agent_display_name: "infra resolver",
37-
timestamp: "2023-10-01T12:00:00Z",
38-
text: "Lorem ipsum dolor sit amet"
39-
}
40-
]
22+
records: mockedIncidentSummaryRecords
4123
}
4224
};
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import type { IncidentSummaryRecord } from "../../../../redux/services/types";
2+
3+
export const mockedIncidentSummaryRecords: IncidentSummaryRecord[] = [
4+
{
5+
id: "1",
6+
agent_display_name: "triager",
7+
timestamp: "2023-10-01T12:00:00Z",
8+
text: "Lorem ipsum dolor sit amet"
9+
},
10+
{
11+
id: "2",
12+
agent_display_name: "code resolver",
13+
timestamp: "2023-10-01T12:00:00Z",
14+
text: "Lorem ipsum dolor sit amet consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
15+
},
16+
{
17+
id: "3",
18+
agent_display_name: "infra resolver",
19+
timestamp: "2023-10-01T12:00:00Z",
20+
text: "Lorem ipsum dolor sit amet"
21+
}
22+
];

src/components/Agentic/IncidentDetails/mockData.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { type GetIncidentResponse } from "../../../redux/services/types";
22
import { mockedArtifacts } from "./AdditionalInfo/Artifacts/mockData";
33
import { mockedIncidentIssues } from "./AdditionalInfo/RelatedIssues/mockData";
4+
import { mockedIncidentSummaryRecords } from "./IncidentSummary/mockData";
45

56
export const mockedIncident: GetIncidentResponse = {
67
id: "incident-123",
@@ -9,6 +10,7 @@ export const mockedIncident: GetIncidentResponse = {
910
status: "active",
1011
affected_services: ["service-1", "service-2", "service-3", "service-4"],
1112
summary: "This is a summary of the incident.",
13+
summary_timeline: mockedIncidentSummaryRecords,
1214
related_issues: mockedIncidentIssues,
1315
related_artifacts: mockedArtifacts,
1416
status_details: {

0 commit comments

Comments
 (0)