From d0c7d461da571b08c70f220aab058f1eeeffeccb Mon Sep 17 00:00:00 2001 From: Revanshu Paliwal Date: Wed, 1 Nov 2023 09:47:25 +0100 Subject: [PATCH] SONAR-20936 Fixing CodingRules-it failing test --- .../main/js/apps/coding-rules/__tests__/CodingRules-it.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/coding-rules/__tests__/CodingRules-it.ts b/server/sonar-web/src/main/js/apps/coding-rules/__tests__/CodingRules-it.ts index 2832b132259..a9335e3f227 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/__tests__/CodingRules-it.ts +++ b/server/sonar-web/src/main/js/apps/coding-rules/__tests__/CodingRules-it.ts @@ -123,15 +123,14 @@ describe('Rules app list', () => { await act(async () => { await user.click(monthSelector); - await user.click(within(ui.dateInputMonthSelect.get()).getByText('Nov')); + await selectEvent.select(ui.dateInputMonthSelect.byRole('combobox').get(), 'Nov'); }); const yearSelector = within(ui.dateInputYearSelect.get()).getByRole('combobox'); await act(async () => { await user.click(yearSelector); - await user.click(within(ui.dateInputYearSelect.get()).getAllByText('2022')[-1]); - await user.click(within(ui.dateInputYearSelect.get()).getByText('2022')); + await selectEvent.select(ui.dateInputYearSelect.byRole('combobox').get(), '2022'); await user.click(screen.getByText('1', { selector: 'button' })); }); -- 2.39.5