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.
40 lines
1.0 KiB
40 lines
1.0 KiB
// playwright-dev-page.ts |
|
import { Locator, expect } from "@playwright/test"; |
|
import { DashboardPage } from ".."; |
|
import BasePage from "../../Base"; |
|
import { ToolbarPage } from "../common/Toolbar"; |
|
|
|
export class GalleryPage extends BasePage { |
|
readonly dashboard: DashboardPage; |
|
readonly toolbar: ToolbarPage; |
|
|
|
constructor(dashboard: DashboardPage) { |
|
super(dashboard.rootPage); |
|
this.dashboard = dashboard; |
|
this.toolbar = new ToolbarPage(this); |
|
} |
|
|
|
get() { |
|
return this.dashboard.get().locator('[data-pw="nc-gallery-wrapper"]'); |
|
} |
|
|
|
card(index: number) { |
|
return this.get().locator(`.ant-card`).nth(index); |
|
} |
|
|
|
async openExpandedRow({ index }: { index: number }) { |
|
await this.card(index).click(); |
|
await ( |
|
await this.rootPage.locator(".ant-drawer-body").elementHandle() |
|
)?.waitForElementState("stable"); |
|
} |
|
|
|
async verifyRowCount(param: { count: number }) { |
|
return; |
|
} |
|
|
|
// todo: Wait for render to complete |
|
async waitLoading() { |
|
await this.rootPage.waitForTimeout(1000); |
|
} |
|
}
|
|
|