Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix: e2e test (#2828)

3720019a2f57cb97
diff --git a/tests/parallels/all-page.spec.ts b/tests/parallels/all-page.spec.ts
index 51311dffae..fb8b899f1f 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();
};