feat(testing): Added quicktest(not complete)

This commit is contained in:
Muhammed Mustafa
2022-10-22 21:12:54 +05:30
parent 19ec22f10e
commit f8d852f9d2
9 changed files with 301 additions and 6 deletions

View File

@@ -0,0 +1,21 @@
import { expect } from "@playwright/test";
import { CellPageObject } from ".";
import BasePage from "../../../Base";
export class RatingCellPageObject extends BasePage {
readonly cell: CellPageObject;
constructor(cell: CellPageObject) {
super(cell.rootPage);
this.cell = cell;
}
get({index, columnHeader}: {index?: number, columnHeader: string}) {
return this.cell.get({index, columnHeader});
}
async verify({index, columnHeader, rating}: {index?: number, columnHeader: string, rating: number}) {
expect(await this.get({index, columnHeader}).locator(`div[role="radio"][aria-checked="true"]`).count()).toBe(rating);
}
}