• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CBIIT / crdc-datahub-ui / 13768297073

10 Mar 2025 03:20PM UTC coverage: 59.96% (-0.3%) from 60.271%
13768297073

Pull #642

github

web-flow
Merge ccb08cb24 into 922b0b29f
Pull Request #642: CRDCDH-2458 Setup Storybook

3139 of 5627 branches covered (55.78%)

Branch coverage included in aggregate %.

3 of 69 new or added lines in 16 files covered. (4.35%)

4374 of 6903 relevant lines covered (63.36%)

145.82 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/components/HistoryDialog/index.stories.tsx
1
import type { Meta, StoryObj } from "@storybook/react";
2
import Dialog, { IconType } from "./index";
3
import ArrowUpIcon from "../../assets/icons/arrow_up.svg";
4

NEW
5
const meta = {
×
6
  title: "Dialogs / History",
7
  component: Dialog,
8
  parameters: {
9
    layout: "fullscreen",
10
  },
11
} satisfies Meta<typeof Dialog>;
12

13
export default meta;
14
type Story = StoryObj<typeof meta>;
15

16
type MockStatuses = "uploaded" | "downloaded" | "error";
17

NEW
18
const IconMap: IconType<MockStatuses> = {
×
19
  uploaded: ArrowUpIcon,
20
  downloaded: ArrowUpIcon,
21
  error: ArrowUpIcon,
22
};
23

NEW
24
export const Default: Story = {
×
25
  name: "Standard",
26
  args: {
27
    open: true,
28
    preTitle: "Dialog Pre-Title",
29
    title: "XYZ Feature History",
30
    history: [
31
      { status: "uploaded", dateTime: "2024-09-05T01:45:00Z", userID: "", reviewComment: "" },
32
      { status: "downloaded", dateTime: "2024-09-02T11:45:00Z", userID: "", reviewComment: "" },
33
      { status: "error", dateTime: "2024-07-11T19:45:00Z", userID: "", reviewComment: "" },
34
    ],
35
    iconMap: IconMap,
36
    showHeaders: false,
37
    onClose: () => {},
NEW
38
    getTextColor: () => "#fff",
×
39
  },
40
};
41

NEW
42
export const WithUserNames: Story = {
×
43
  args: {
44
    open: true,
45
    preTitle: "Dialog Pre-Title",
46
    title: "XYZ Feature History",
47
    history: [
48
      {
49
        status: "uploaded",
50
        dateTime: "2024-09-05T01:45:00Z",
51
        userID: "",
52
        userName: "Example X",
53
        reviewComment: "",
54
      },
55
      {
56
        status: "downloaded",
57
        dateTime: "2024-09-02T11:45:00Z",
58
        userID: "",
59
        userName: "Test T.",
60
        reviewComment: "",
61
      },
62
      {
63
        status: "error",
64
        dateTime: "2024-07-11T19:45:00Z",
65
        userID: "",
66
        userName: "Very long name with ellipsis",
67
        reviewComment: "",
68
      },
69
    ],
70
    iconMap: IconMap,
71
    showHeaders: true,
72
    onClose: () => {},
NEW
73
    getTextColor: () => "#fff",
×
74
  },
75
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc