diff --git a/tests/parallels/all-page.spec.ts b/tests/parallels/all-page.spec.ts index 51311dffa..fb8b899f1 100644 --- a/tests/parallels/all-page.spec.ts +++ b/tests/parallels/all-page.spec.ts @@ -195,9 +195,10 @@ const selectDateFromDatePicker = async (page: Page, date: Date) => { ); await nextMonthButton.click(); } + const map = ['th', 'st', 'nd', 'rd'] // Click on the day cell const dateCell = page.locator( - `[aria-disabled="false"][aria-label="Choose ${weekday}, ${month} ${day}th, ${year}"]` + `[aria-disabled="false"][aria-label="Choose ${weekday}, ${month} ${day}${map[Number.parseInt(day) % 10] ?? 'th'}, ${year}"]` ); await dateCell.click(); };