fix: Global e2e failure (#19055)

* fix: flaky test organization.spec

* fix: global e2e failure
This commit is contained in:
Anik Dhabal Babu
2025-02-03 04:21:49 +00:00
committed by GitHub
parent b280e78da8
commit c20b3419d4
+4 -4
View File
@@ -496,8 +496,8 @@ async function selectToAndFromDates(page: Page, fromDate: string, toDate: string
await page.locator(`button[name="${month}-month"]`).click();
await page.locator(`button[name="day"]:has-text("${fromDate}")`).nth(0).click();
await page.locator(`button[name="day"]:has-text("${toDate}")`).nth(0).click();
await page.locator(`button[name="day"]:text-is("${fromDate}")`).nth(0).click();
await page.locator(`button[name="day"]:text-is("${toDate}")`).nth(0).click();
}
async function selectDateAndCreateOOO(
@@ -509,8 +509,8 @@ async function selectDateAndCreateOOO(
) {
const t = await localize("en");
await page.locator(`button[name="next-month"]`).click();
await page.locator(`button[name="day"]:has-text("${fromDate}")`).nth(0).click();
await page.locator(`button[name="day"]:has-text("${toDate}")`).nth(0).click();
await page.locator(`button[name="day"]:text-is("${fromDate}")`).nth(0).click();
await page.locator(`button[name="day"]:text-is("${toDate}")`).nth(0).click();
await page.locator(`text=${t("create_an_out_of_office")}`).click();
await page.getByTestId("reason_select").click();
await page.getByTestId("select-option-4").click();