mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-19 15:26:59 +08:00
fix: e2e test (#2828)
Co-authored-by: Alex Yang <himself65@outlook.com>
This commit is contained in:
@@ -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();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user