From eab412504a8cbb43cc15398590082f6de25669fe Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Mon, 5 Dec 2022 13:22:25 +0800 Subject: [PATCH] feat(playwright): add verifyDateCell --- .../pages/Dashboard/common/Cell/index.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/playwright/pages/Dashboard/common/Cell/index.ts b/tests/playwright/pages/Dashboard/common/Cell/index.ts index 92fdf7a2f2..bb32f48fa7 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/index.ts +++ b/tests/playwright/pages/Dashboard/common/Cell/index.ts @@ -101,6 +101,22 @@ export class CellPageObject extends BasePage { } } + async verifyDateCell({ index, columnHeader, value }: { index: number; columnHeader: string; value: string }) { + const _verify = async expectedValue => { + await expect + .poll(async () => { + const cell = await this.get({ + index, + columnHeader, + }).locator('input'); + return await cell.getAttribute('title'); + }) + .toEqual(expectedValue); + }; + + await _verify(value); + } + async verifyQrCodeCell({ index, columnHeader,