mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.2 KiB
33 lines
1.2 KiB
2 years ago
|
import { expect } from '@playwright/test';
|
||
|
import { CellPageObject } from '.';
|
||
|
import BasePage from '../../../Base';
|
||
2 years ago
|
|
||
|
export class CheckboxCellPageObject extends BasePage {
|
||
|
readonly cell: CellPageObject;
|
||
|
|
||
|
constructor(cell: CellPageObject) {
|
||
|
super(cell.rootPage);
|
||
|
this.cell = cell;
|
||
|
}
|
||
|
|
||
2 years ago
|
get({ index, columnHeader }: { index?: number; columnHeader: string }) {
|
||
|
return this.cell.get({ index, columnHeader });
|
||
2 years ago
|
}
|
||
|
|
||
2 years ago
|
async click({ index, columnHeader }: { index?: number; columnHeader: string }) {
|
||
|
return await this.get({ index, columnHeader }).locator('.nc-cell').click();
|
||
2 years ago
|
}
|
||
|
|
||
2 years ago
|
async isChecked({ index, columnHeader }: { index?: number; columnHeader: string }) {
|
||
|
return await this.get({ index, columnHeader }).locator('.nc-cell-hover-show').isVisible();
|
||
2 years ago
|
}
|
||
|
|
||
2 years ago
|
async verifyChecked({ index, columnHeader }: { index?: number; columnHeader: string }) {
|
||
|
await expect(this.get({ index, columnHeader }).locator('.nc-cell-hover-show')).not.toBeVisible();
|
||
2 years ago
|
}
|
||
|
|
||
2 years ago
|
async verifyUnchecked({ index, columnHeader }: { index?: number; columnHeader: string }) {
|
||
|
await expect(this.get({ index, columnHeader }).locator('.nc-cell-hover-show')).toBeVisible();
|
||
2 years ago
|
}
|
||
2 years ago
|
}
|