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

CBIIT / crdc-datahub-ui / 11074479132

27 Sep 2024 04:44PM UTC coverage: 44.982% (+26.5%) from 18.435%
11074479132

Pull #479

github

web-flow
Merge a0867d25a into 3d8b55818
Pull Request #479: 3.0.0 Release

1727 of 4418 branches covered (39.09%)

Branch coverage included in aggregate %.

2612 of 5228 relevant lines covered (49.96%)

128.96 hits per line

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

77.78
/src/components/Questionnaire/ReviewFileTypeTable.tsx
1
import React from "react";
2
import {
3
  Table,
4
  TableBody,
5
  TableCell,
6
  TableContainer,
7
  TableHead,
8
  TableRow,
9
  styled,
10
} from "@mui/material";
11
import { addSpace } from "../../utils";
12

13
const StyledTableContainer = styled(TableContainer)(() => ({
2✔
14
  borderRadius: "8px !important",
15
  border: "1px solid #6B7294",
16
  overflow: "hidden",
17
}));
18

19
const StyledTableHeaderRow = styled(TableRow)(() => ({
2✔
20
  "&.MuiTableRow-root": {
21
    height: "40px",
22
    padding: 0,
23
    justifyContent: "space-between",
24
    alignItems: "center",
25
    background: "#FFF",
26
    borderBottom: "1px solid #6B7294",
27
  },
28
}));
29

30
const StyledTableRow = styled(TableRow)(() => ({
2✔
31
  "&.MuiTableRow-root": {
32
    height: "40px",
33
    padding: 0,
34
    justifyContent: "space-between",
35
    alignItems: "center",
36
    background: "#FFF",
37
    borderBottom: "1px solid #6B7294",
38
    "&:last-child": {
39
      borderBottom: "none",
40
    },
41
  },
42
}));
43

44
const StyledTableHeaderCell = styled(TableCell)(() => ({
2✔
45
  "&.MuiTableCell-root": {
46
    height: "100%",
47
    color: "#083A50",
48
    fontFamily: "'Nunito', 'Rubik', sans-serif",
49
    fontSize: "16px",
50
    fontStyle: "normal",
51
    fontWeight: 700,
52
    lineHeight: "19.6px",
53
    padding: "10px 20px",
54
    borderBottom: "0 !important",
55
    borderRight: "1px solid #6B7294",
56
    "&:last-child": {
57
      borderRight: "none",
58
    },
59
  },
60
}));
61

62
const StyledTableCell = styled(TableCell)(() => ({
2✔
63
  "&.MuiTableCell-root": {
64
    height: "100%",
65
    color: "#083A50",
66
    fontFamily: "'Nunito', 'Rubik', sans-serif",
67
    fontSize: "16px",
68
    fontStyle: "normal",
69
    fontWeight: 400,
70
    lineHeight: "19.6px",
71
    padding: "10px 20px",
72
    borderBottom: "0 !important",
73
    borderRight: "1px solid #6B7294",
74
    "&:last-child": {
75
      borderRight: "none",
76
    },
77
  },
78
}));
79

80
const StyledTableCellNumber = styled(TableCell)(() => ({
2✔
81
  "&.MuiTableCell-root": {
82
    height: "100%",
83
    color: "#346798",
84
    fontFamily: "'Inter'",
85
    fontSize: "15px",
86
    fontStyle: "normal",
87
    fontWeight: 400,
88
    lineHeight: "normal",
89
    padding: "11px 15px",
90
    borderBottom: "0 !important",
91
    borderRight: "1px solid #6B7294",
92
    "&:last-child": {
93
      borderRight: "none",
94
    },
95
  },
96
}));
97

98
type ReviewFileTypeTableProps = {
99
  files: FileInfo[];
100
};
101

102
const ReviewFileTypeTable: React.FC<ReviewFileTypeTableProps> = ({ files }) => (
2✔
103
  <StyledTableContainer>
×
104
    <Table>
105
      <TableHead>
106
        <StyledTableHeaderRow>
107
          <StyledTableHeaderCell id="review-file-type-table-file-type" width="auto">
108
            File Type
109
          </StyledTableHeaderCell>
110
          <StyledTableHeaderCell id="review-file-type-table-file-extension" width="25%">
111
            File Extension
112
          </StyledTableHeaderCell>
113
          <StyledTableHeaderCell id="review-file-type-table-number-of-files" width="17%">
114
            Number of files
115
          </StyledTableHeaderCell>
116
          <StyledTableHeaderCell id="review-file-type-table-estimated-data-size" width="25%">
117
            Estimated data size
118
          </StyledTableHeaderCell>
119
        </StyledTableHeaderRow>
120
      </TableHead>
121
      <TableBody>
122
        {files.map((file: FileInfo, idx: number) => (
123
          <StyledTableRow key={`${file.type}-${file.count}-${file.amount}`}>
×
124
            <StyledTableCell id={`review-file-type-table-file-${idx}-file-type`} width="auto">
125
              {file.type}
126
            </StyledTableCell>
127
            <StyledTableCell id={`review-file-type-table-file-${idx}-file-extension`} width="25%">
128
              {file.extension}
129
            </StyledTableCell>
130
            <StyledTableCellNumber id={`review-file-type-table-file-${idx}-file-count`} width="17%">
131
              {file.count}
132
            </StyledTableCellNumber>
133
            <StyledTableCellNumber
134
              id={`review-file-type-table-file-${idx}-file-amount`}
135
              width="25%"
136
            >
137
              {addSpace(file.amount)}
138
            </StyledTableCellNumber>
139
          </StyledTableRow>
140
        ))}
141
      </TableBody>
142
    </Table>
143
  </StyledTableContainer>
144
);
145

146
export default ReviewFileTypeTable;
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