mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-30 17:47:10 +00:00
test: sync
Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
This commit is contained in:
@@ -1,15 +1,18 @@
|
||||
import BasePage from '../../Base';
|
||||
import { ProjectViewPage } from './index';
|
||||
import { Locator } from '@playwright/test';
|
||||
import { MetaDataPage } from './Metadata';
|
||||
|
||||
export class DataSourcePage extends BasePage {
|
||||
readonly projectView: ProjectViewPage;
|
||||
readonly databaseType: Locator;
|
||||
readonly metaData: MetaDataPage;
|
||||
|
||||
constructor(projectView: ProjectViewPage) {
|
||||
super(projectView.rootPage);
|
||||
this.projectView = projectView;
|
||||
this.databaseType = this.get().locator('.nc-extdb-db-type');
|
||||
this.metaData = new MetaDataPage(this);
|
||||
}
|
||||
|
||||
get() {
|
||||
@@ -28,12 +31,22 @@ export class DataSourcePage extends BasePage {
|
||||
return list;
|
||||
}
|
||||
|
||||
async openMetaSync({ rowIndex }: { rowIndex: number }) {
|
||||
// 0th offset for header
|
||||
const row = this.get()
|
||||
.locator('.ds-table-row')
|
||||
.nth(rowIndex + 1);
|
||||
await row.locator('button.nc-action-btn:has-text("Sync Metadata")').click();
|
||||
}
|
||||
|
||||
async openERD({ rowIndex }: { rowIndex: number }) {
|
||||
// hardwired
|
||||
await this.rootPage.locator('button.nc-action-btn').nth(1).click();
|
||||
// await this.rootPage.locator('button.nc-action-btn:has-text("Relations")').click();
|
||||
|
||||
// const row = this.get().locator('.ds-table-row').nth(rowIndex);
|
||||
// await row.locator('.ds-table-actions').locator('button.nc-action-btn').waitFor();
|
||||
// await row.locator('.ds-table-actions').locator('button.nc-action-btn').nth(1).click();
|
||||
// 0th offset for header
|
||||
const row = this.get()
|
||||
.locator('.ds-table-row')
|
||||
.nth(rowIndex + 1);
|
||||
await row.locator('button.nc-action-btn:has-text("Relations")').click();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user