From efcd1b8aef87aa8cec4d2579b200f7c2c0e3a1a7 Mon Sep 17 00:00:00 2001 From: Srikanth Chekuri Date: Sun, 4 Aug 2024 13:08:04 +0530 Subject: [PATCH] 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'); }); });