]> source.dussan.org Git - sonarqube.git/commitdiff
[NO-JIRA] Fix calendar test for IssuesApp
authorKevin Silva <kevin.silva@sonarsource.com>
Tue, 2 Jan 2024 09:53:33 +0000 (10:53 +0100)
committersonartech <sonartech@sonarsource.com>
Tue, 2 Jan 2024 20:02:37 +0000 (20:02 +0000)
server/sonar-web/src/main/js/apps/issues/__tests__/IssuesApp-Filtering-it.tsx

index dbb8fcfbb64f1f2df50fc00c46f297ef041576f3..a9062b14e51a4e9781f4d5363a3e4f911ba67ce6 100644 (file)
@@ -207,13 +207,13 @@ describe('issues app filtering', () => {
 
     await user.click(monthSelector);
 
-    await user.click(within(ui.dateInputMonthSelect.get()).getByText('Jan'));
+    await user.click(within(ui.dateInputMonthSelect.get()).getAllByText('Jan').slice(-1)[0]);
 
     const yearSelector = within(ui.dateInputYearSelect.get()).getByRole('combobox');
 
     await user.click(yearSelector);
 
-    await user.click(within(ui.dateInputYearSelect.get()).getAllByText('2023')[-1]);
+    await user.click(within(ui.dateInputYearSelect.get()).getAllByText('2023').slice(-1)[0]);
 
     await user.click(screen.getByText('1', { selector: 'button' }));
     await user.click(screen.getByText('10'));