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

CBIIT / crdc-datahub-ui / 18789341118

24 Oct 2025 06:57PM UTC coverage: 78.178% (+15.5%) from 62.703%
18789341118

push

github

web-flow
Merge pull request #888 from CBIIT/3.4.0

3.4.0 Release

4977 of 5488 branches covered (90.69%)

Branch coverage included in aggregate %.

8210 of 9264 new or added lines in 257 files covered. (88.62%)

6307 existing lines in 120 files now uncovered.

30203 of 39512 relevant lines covered (76.44%)

213.36 hits per line

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

98.4
/src/components/SystemUseWarningOverlay/OverlayWindow.tsx
1
import FiberManualRecordIcon from "@mui/icons-material/FiberManualRecord";
1✔
2
import {
1✔
3
  Dialog,
4
  DialogContent,
5
  DialogContentText,
6
  Button,
7
  DialogTitle,
8
  Divider,
9
  List,
10
  ListItem,
11
  ListItemText,
12
  ListItemIcon,
13
  DialogActions,
14
} from "@mui/material";
15
import { ThemeProvider, createTheme } from "@mui/material/styles";
1✔
16
import React, { useEffect, useState } from "react";
1✔
17

18
import text from "./OverlayText";
1✔
19

20
const theme = createTheme({
1✔
21
  components: {
1✔
22
    MuiDialog: {
1✔
23
      styleOverrides: {
1✔
24
        paper: {
1✔
25
          width: "770px",
1✔
26
          height: "620px",
1✔
27
          borderRadius: "5px !important",
1✔
28
          backgroundColor: "#ffffff !important",
1✔
29
          padding: "0px 20px 0px 20px !important",
1✔
30
        },
1✔
31
      },
1✔
32
    },
1✔
33
    MuiTypography: {
1✔
34
      styleOverrides: {
1✔
35
        root: {
1✔
36
          fontSize: "14px !important",
1✔
37
          color: "#000000",
1✔
38
        },
1✔
39
      },
1✔
40
    },
1✔
41
    MuiDialogTitle: {
1✔
42
      styleOverrides: {
1✔
43
        root: {
1✔
44
          padding: "15px 15px 15px 0 !important",
1✔
45
          fontSize: "22px !important",
1✔
46
        },
1✔
47
      },
1✔
48
    },
1✔
49
    MuiDialogContent: {
1✔
50
      styleOverrides: {
1✔
51
        root: {
1✔
52
          color: "#000045",
1✔
53
          "& p": {
1✔
54
            fontSize: "14px",
1✔
55
            margin: "0px 0px 10px !important",
1✔
56
          },
1✔
57
          padding: "20px 0px 0px 0px !important",
1✔
58
          "& ul": {
1✔
59
            marginTop: "0px",
1✔
60
            paddingTop: "0px",
1✔
61
          },
1✔
62
        },
1✔
63
      },
1✔
64
    },
1✔
65
    MuiButton: {
1✔
66
      styleOverrides: {
1✔
67
        root: {
1✔
68
          width: "133px",
1✔
69
          height: "35px",
1✔
70
          backgroundColor: "#337ab7 !important",
1✔
71
          color: "#fff",
1✔
72
          textTransform: "capitalize !important" as "capitalize",
1✔
73
          boxShadow: "none !important",
1✔
74
          "&:hover": {
1✔
75
            backgroundColor: "#2e6da4 !important",
1✔
76
          },
1✔
77
        },
1✔
78
      },
1✔
79
    },
1✔
80
    MuiList: {
1✔
81
      styleOverrides: {
1✔
82
        root: {
1✔
83
          marginTop: "-15px !important",
1✔
84
          fontSize: "14px",
1✔
85
        },
1✔
86
        padding: {
1✔
87
          paddingTop: "0px !important",
1✔
88
        },
1✔
89
      },
1✔
90
    },
1✔
91
    MuiListItem: {
1✔
92
      styleOverrides: {
1✔
93
        root: {
1✔
94
          fontSize: "14px",
1✔
95
          padding: "2px 0px 0px 25px !important",
1✔
96
        },
1✔
97
        gutters: {
1✔
98
          paddingTop: "4px",
1✔
99
          paddingRight: "8px",
1✔
100
          paddingBottom: "4px",
1✔
101
          paddingLeft: "35px",
1✔
102
        },
1✔
103
      },
1✔
104
    },
1✔
105
    MuiListItemIcon: {
1✔
106
      styleOverrides: {
1✔
107
        root: {
1✔
108
          marginBottom: "auto",
1✔
109
          fontSize: "12px",
1✔
110
          color: "black",
1✔
111
          width: "10px",
1✔
112
          minWidth: "2px",
1✔
113
          paddingTop: "10px",
1✔
114
          marginRight: "4px",
1✔
115
        },
1✔
116
      },
1✔
117
    },
1✔
118
    MuiDialogContentText: {
1✔
119
      styleOverrides: {
1✔
120
        root: {
1✔
121
          color: "#000000",
1✔
122
          marginBottom: "10px",
1✔
123
          "& p.lastChild": {
1✔
124
            marginBottom: "0px",
1✔
125
          },
1✔
126
        },
1✔
127
      },
1✔
128
    },
1✔
129
    MuiBackdrop: {
1✔
130
      styleOverrides: {
1✔
131
        root: {
1✔
132
          backgroundColor: "#00000047",
1✔
133
        },
1✔
134
      },
1✔
135
    },
1✔
136
    MuiDialogActions: {
1✔
137
      styleOverrides: {
1✔
138
        root: {
1✔
139
          height: "75px",
1✔
140
          justifyContent: "right !important",
1✔
141
          padding: "30px 10px 25px 0px !important",
1✔
142
        },
1✔
143
      },
1✔
144
    },
1✔
145
  },
1✔
146
});
1✔
147

148
const OverlayWindow = () => {
1✔
149
  const [open, setOpen] = useState(false);
3✔
150

151
  const handleClose = () => {
3✔
152
    setOpen(false);
×
153
    sessionStorage.setItem("overlayLoad", "true");
×
UNCOV
154
  };
×
155

156
  useEffect(() => {
3✔
157
    if (!sessionStorage.length) {
2✔
158
      setOpen(true);
2✔
159
    }
2✔
160
  }, [open]);
3✔
161

162
  const content = text.content.map((item, index) => {
3✔
163
    const textKey = `key_${index}`;
15✔
164
    return (
15✔
165
      <DialogContentText key={textKey} id="alert-dialog-description">
15✔
166
        {item}
15✔
167
      </DialogContentText>
15✔
168
    );
169
  });
3✔
170
  const list = text.list.map((item, index) => {
3✔
171
    const listKey = `key_${index}`;
6✔
172
    return (
6✔
173
      <ListItem key={listKey}>
6✔
174
        <ListItemIcon>
6✔
175
          <FiberManualRecordIcon style={{ fontSize: 8 }} />
6✔
176
        </ListItemIcon>
6✔
177
        <ListItemText>{item}</ListItemText>
6✔
178
      </ListItem>
6✔
179
    );
180
  });
3✔
181

182
  return (
3✔
183
    <ThemeProvider theme={theme}>
3✔
184
      <Dialog
3✔
185
        open={open}
3✔
186
        aria-labelledby="alert-dialog-title"
3✔
187
        aria-describedby="alert-dialog-description"
3✔
188
        data-testid="system-use-warning-dialog"
3✔
189
        maxWidth="md"
3✔
190
      >
191
        <DialogTitle id="alert-dialog-title">Warning</DialogTitle>
3✔
192
        <Divider />
3✔
193
        <DialogContent>
3✔
194
          {content}
3✔
195
          <List>{list}</List>
3✔
196
        </DialogContent>
3✔
197
        <Divider />
3✔
198
        <DialogActions>
3✔
199
          <Button onClick={handleClose} variant="contained">
3✔
200
            Continue
201
          </Button>
3✔
202
        </DialogActions>
3✔
203
      </Dialog>
3✔
204
    </ThemeProvider>
3✔
205
  );
206
};
3✔
207

208
export default OverlayWindow;
1✔
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

© 2026 Coveralls, Inc