From 285a48b0d41116d5a9bf8bfbf55347f7f0ec21af Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Mon, 2 Jan 2023 16:36:51 +0530 Subject: [PATCH] test: date picker configuration Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- .../pages/Dashboard/common/Cell/DateTimeCell.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/playwright/pages/Dashboard/common/Cell/DateTimeCell.ts b/tests/playwright/pages/Dashboard/common/Cell/DateTimeCell.ts index 50b762b618..22c95925ae 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/DateTimeCell.ts +++ b/tests/playwright/pages/Dashboard/common/Cell/DateTimeCell.ts @@ -33,7 +33,18 @@ export class DateTimeCellPageObject extends BasePage { date: string; }) { // title date format needs to be YYYY-MM-DD - await this.rootPage.locator(`td[title="${date}"]`).click(); + const [year, month, day] = date.split('-'); + + // configure year + await this.rootPage.locator('.ant-picker-year-btn').click(); + await this.rootPage.locator(`td[title="${year}"]`).click(); + + // configure month + await this.rootPage.locator('.ant-picker-month-btn').click(); + await this.rootPage.locator(`td[title="${year}-${month}"]`).click(); + + // configure day + await this.rootPage.locator(`td[title="${year}-${month}-${day}"]`).click(); } async selectTime({