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
882 B
33 lines
882 B
2 years ago
|
import { DashboardPage } from '..';
|
||
|
import BasePage from '../../Base';
|
||
|
import { ToolbarPage } from '../common/Toolbar';
|
||
2 years ago
|
|
||
|
export class GalleryPage extends BasePage {
|
||
|
readonly dashboard: DashboardPage;
|
||
2 years ago
|
readonly toolbar: ToolbarPage;
|
||
2 years ago
|
|
||
2 years ago
|
constructor(dashboard: DashboardPage) {
|
||
|
super(dashboard.rootPage);
|
||
|
this.dashboard = dashboard;
|
||
|
this.toolbar = new ToolbarPage(this);
|
||
2 years ago
|
}
|
||
|
|
||
|
get() {
|
||
2 years ago
|
return this.dashboard.get().locator('[data-nc="nc-gallery-wrapper"]');
|
||
2 years ago
|
}
|
||
|
|
||
|
card(index: number) {
|
||
|
return this.get().locator(`.ant-card`).nth(index);
|
||
|
}
|
||
|
|
||
|
async openExpandedRow({ index }: { index: number }) {
|
||
|
await this.card(index).click();
|
||
2 years ago
|
await (await this.rootPage.locator('.ant-drawer-body').elementHandle())?.waitForElementState('stable');
|
||
2 years ago
|
}
|
||
|
|
||
2 years ago
|
// todo: Wait for render to complete
|
||
2 years ago
|
async waitLoading() {
|
||
|
await this.rootPage.waitForTimeout(1000);
|
||
|
}
|
||
2 years ago
|
}
|