From 7de8e908e4400cf6a34ecc426ca5c239e022e640 Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani Date: Sun, 15 Dec 2024 00:28:30 -0800 Subject: [PATCH] ad --- src/__tests__/TagPage/VulnerabilitiesDetails.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/__tests__/TagPage/VulnerabilitiesDetails.test.js b/src/__tests__/TagPage/VulnerabilitiesDetails.test.js index 437429b..85263e9 100644 --- a/src/__tests__/TagPage/VulnerabilitiesDetails.test.js +++ b/src/__tests__/TagPage/VulnerabilitiesDetails.test.js @@ -822,7 +822,7 @@ describe('Vulnerabilties page', () => { expect(exportAsCSVBtn).toBeInTheDocument(); global.URL.createObjectURL = jest.fn(); await fireEvent.click(exportAsCSVBtn); - expect(await screen.findByTestId('export-csv-menuItem')).not.toBeInTheDocument(); + await waitFor(() => expect(screen.findByTestId('export-csv-menuItem')).not.toBeInTheDocument()); fireEvent.click(downloadBtn[0]); const exportAsExcelBtn = screen.getByText(/xlsx/i); expect(exportAsExcelBtn).toBeInTheDocument(); @@ -858,7 +858,7 @@ describe('Vulnerabilties page', () => { await waitFor(() => expect(screen.getAllByText('Fixed in')).toHaveLength(20)); const collapseListBtn = await screen.findAllByTestId('ViewHeadlineIcon'); fireEvent.click(collapseListBtn[0]); - expect(await screen.findByText('Fixed in')).not.toBeVisible(); + await waitFor (() => expect(screen.findByText('Fixed in')).not.toBeVisible()); }); it('should handle fixed CVE query errors', async () => {