test(core): fix selectMonthFromMonthPicker logic (#5498)
This commit is contained in:
@@ -148,10 +148,10 @@ export const selectMonthFromMonthPicker = async (page: Page, date: Date) => {
|
|||||||
.getByTestId('month-picker-current-year')
|
.getByTestId('month-picker-current-year')
|
||||||
.innerText());
|
.innerText());
|
||||||
if (selectedYear > year) {
|
if (selectedYear > year) {
|
||||||
page.locator('[data-testid="month-picker-prev-button"]').click();
|
await page.locator('[data-testid="month-picker-prev-button"]').click();
|
||||||
return await selectMonth();
|
return await selectMonth();
|
||||||
} else if (selectedYear < year) {
|
} else if (selectedYear < year) {
|
||||||
page.locator('[data-testid="month-picker-next-button"]').click();
|
await page.locator('[data-testid="month-picker-next-button"]').click();
|
||||||
return await selectMonth();
|
return await selectMonth();
|
||||||
}
|
}
|
||||||
// Click on the day cell
|
// Click on the day cell
|
||||||
|
|||||||
Reference in New Issue
Block a user