Skip to content

Commit e4835ff

Browse files
author
Anuj Rajak
committed
review comments
1 parent 8883be2 commit e4835ff

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

src/components/TableWrapper.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const TableWrapper = (props: TableWrapperProps) => {
4545
fields.forEach((field) => {
4646
const value = field.data[i];
4747
if (value === null || value === undefined) {
48-
row[field.name] = "N/A";
48+
row[field.name] = "";
4949
} else if (Array.isArray(value)) {
5050
row[field.name] = value.join(", ");
5151
} else {
@@ -64,11 +64,7 @@ const TableWrapper = (props: TableWrapperProps) => {
6464
<Card id={id} className={className}>
6565
<CardBody>
6666
<Table variant="compact" borders>
67-
<Caption>
68-
<span style={{ fontWeight: "bold", fontSize: "1.1em" }}>
69-
{title}
70-
</span>
71-
</Caption>
67+
<Caption>{title}</Caption>
7268
<Thead>
7369
<Tr>
7470
{columns.map((col, index) => (

src/test/components/TableWrapper.test.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ describe("TableWrapper Component", () => {
103103

104104
render(<TableWrapper {...fieldsWithNull} />);
105105

106-
expect(screen.getByText("N/A")).toBeInTheDocument();
107106
expect(screen.getByText("1995")).toBeInTheDocument();
108107
});
109108

@@ -184,9 +183,6 @@ describe("TableWrapper Component", () => {
184183
expect(screen.getByText("value1")).toBeInTheDocument();
185184
expect(screen.getByText("value2")).toBeInTheDocument();
186185
expect(screen.getByText("single value")).toBeInTheDocument();
187-
// Second row should have N/A for Field 2
188-
const naElements = screen.getAllByText("N/A");
189-
expect(naElements.length).toBeGreaterThan(0);
190186
});
191187

192188
it("should render table with correct structure", () => {
@@ -241,6 +237,5 @@ describe("TableWrapper Component", () => {
241237
expect(screen.getByText("test string")).toBeInTheDocument();
242238
expect(screen.getByText("123")).toBeInTheDocument();
243239
expect(screen.getByText("true")).toBeInTheDocument();
244-
expect(screen.getByText("N/A")).toBeInTheDocument();
245240
});
246241
});

0 commit comments

Comments
 (0)