mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-29 14:56:43 +00:00
feat(testing): Added quicktest(not complete)
This commit is contained in:
21
scripts/playwright/pages/Dashboard/common/Cell/RatingCell.ts
Normal file
21
scripts/playwright/pages/Dashboard/common/Cell/RatingCell.ts
Normal 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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user