From 990881fe49ea1c5e19585142edd1a641cfdda1c1 Mon Sep 17 00:00:00 2001 From: Srikanth Chekuri Date: Fri, 2 Aug 2024 15:50:36 +0530 Subject: [PATCH 1/3] chore: make table header sticky --- frontend/src/components/ResizeTable/ResizeTable.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/components/ResizeTable/ResizeTable.tsx b/frontend/src/components/ResizeTable/ResizeTable.tsx index 5f8ac7a4a5..db9e981363 100644 --- a/frontend/src/components/ResizeTable/ResizeTable.tsx +++ b/frontend/src/components/ResizeTable/ResizeTable.tsx @@ -65,6 +65,7 @@ function ResizeTable({ ...restProps, components: { header: { cell: ResizableHeader } }, columns: mergedColumns, + sticky: true, }; set( From 739d35cf7f4e8eeb532f8610cc94d92132198ad3 Mon Sep 17 00:00:00 2001 From: Srikanth Chekuri Date: Sun, 4 Aug 2024 12:58:28 +0530 Subject: [PATCH 2/3] chore: update table snapshot --- .../TablePanelWrapper.test.tsx.snap | 32 ++++++++++++------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/frontend/src/container/PanelWrapper/__tests__/__snapshots__/TablePanelWrapper.test.tsx.snap b/frontend/src/container/PanelWrapper/__tests__/__snapshots__/TablePanelWrapper.test.tsx.snap index d37ccf5841..1a930f740c 100644 --- a/frontend/src/container/PanelWrapper/__tests__/__snapshots__/TablePanelWrapper.test.tsx.snap +++ b/frontend/src/container/PanelWrapper/__tests__/__snapshots__/TablePanelWrapper.test.tsx.snap @@ -70,20 +70,13 @@ exports[`Table panel wrappper tests table should render fine with the query resp class="ant-table-container" >
- - - - + @@ -222,6 +215,23 @@ exports[`Table panel wrappper tests table should render fine with the query resp +
+
+
+ + + + + From efcd1b8aef87aa8cec4d2579b200f7c2c0e3a1a7 Mon Sep 17 00:00:00 2001 From: Srikanth Chekuri Date: Sun, 4 Aug 2024 13:08:04 +0530 Subject: [PATCH 3/3] chore: update ServicesTraces tests --- .../ServiceTraces/ServicTraces.test.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/src/container/ServiceApplication/ServiceTraces/ServicTraces.test.tsx b/frontend/src/container/ServiceApplication/ServiceTraces/ServicTraces.test.tsx index fc6e97e4b4..8620138e88 100644 --- a/frontend/src/container/ServiceApplication/ServiceTraces/ServicTraces.test.tsx +++ b/frontend/src/container/ServiceApplication/ServiceTraces/ServicTraces.test.tsx @@ -38,9 +38,9 @@ describe('ServicesTraces', () => { const secondServiceName = await screen.findByText(/TestCustomerService/i); expect(secondServiceName).toBeInTheDocument(); const allRow = screen.getAllByRole('row'); - expect(allRow).toHaveLength(3); - expect(allRow[1].innerHTML).toContain('TestService'); - expect(allRow[2].innerHTML).toContain('TestCustomerService'); + expect(allRow).toHaveLength(2); + expect(allRow[0].innerHTML).toContain('TestService'); + expect(allRow[1].innerHTML).toContain('TestCustomerService'); const tableHeader = await screen.findAllByRole('columnheader'); expect(tableHeader).toHaveLength(4); @@ -48,12 +48,12 @@ describe('ServicesTraces', () => { fireEvent.click(tableHeader[1]); const allSortedRowAsc = screen.getAllByRole('row'); - expect(allSortedRowAsc).toHaveLength(3); - expect(allSortedRowAsc[1].innerHTML).toContain('TestService'); + expect(allSortedRowAsc).toHaveLength(2); + expect(allSortedRowAsc[0].innerHTML).toContain('TestService'); fireEvent.click(tableHeader[1]); const allSortedRowDsc = screen.getAllByRole('row'); - expect(allSortedRowDsc).toHaveLength(3); - expect(allSortedRowDsc[1].innerHTML).toContain('TestCustomerService'); + expect(allSortedRowDsc).toHaveLength(2); + expect(allSortedRowDsc[0].innerHTML).toContain('TestCustomerService'); }); });