test: cleanup

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
This commit is contained in:
Raju Udava
2023-06-10 11:58:59 +05:30
committed by mertmit
parent c44330b59d
commit 9870d1e8a6
3 changed files with 84 additions and 23 deletions

View File

@@ -1,5 +1,6 @@
import { CellPageObject } from '.';
import BasePage from '../../../Base';
import { expect } from '@playwright/test';
export class DateCellPageObject extends BasePage {
readonly cell: CellPageObject;
@@ -20,6 +21,12 @@ export class DateCellPageObject extends BasePage {
});
}
async verify({ index, columnHeader, date }: { index: number; columnHeader: string; date: string }) {
const cell = await this.get({ index, columnHeader });
await cell.scrollIntoViewIfNeeded();
await expect(cell.locator(`[title="${date}"]`)).toBeVisible();
}
async selectDate({
// date in format `YYYY-MM-DD`
date,