mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-29 22:36:47 +00:00
test: preview (disabled, wip)
Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
This commit is contained in:
committed by
Muhammed Mustafa
parent
adc74498e4
commit
1c1429870c
@@ -0,0 +1,36 @@
|
||||
import BasePage from "../../../Base";
|
||||
import { GridPage } from "../../Grid";
|
||||
import { GalleryPage } from "../../Gallery";
|
||||
import { KanbanPage } from "../../Kanban";
|
||||
import { FormPage } from "../../Form";
|
||||
|
||||
export class ProjectMenuObject extends BasePage {
|
||||
constructor(parent: GridPage | GalleryPage | KanbanPage | FormPage) {
|
||||
super(parent.rootPage);
|
||||
}
|
||||
|
||||
get() {
|
||||
return this.rootPage.locator(`[pw-data="nc-fields-menu"]`);
|
||||
}
|
||||
|
||||
async toggle() {
|
||||
await this.rootPage.locator('[pw-data="nc-project-menu"]').click();
|
||||
}
|
||||
|
||||
async click({ menu, subMenu }: { menu: string; subMenu: string }) {
|
||||
let pMenu = await this.rootPage.locator(
|
||||
`.nc-dropdown-project-menu:visible`
|
||||
);
|
||||
await pMenu
|
||||
.locator(`div.nc-project-menu-item:has-text("${menu}"):visible`)
|
||||
.click();
|
||||
await this.rootPage.waitForTimeout(2000);
|
||||
|
||||
if (subMenu) {
|
||||
await this.rootPage
|
||||
.locator(`div.nc-project-menu-item:has-text("${subMenu}"):visible`)
|
||||
.click();
|
||||
await this.rootPage.waitForTimeout(10000);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user