mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-30 14:06:52 +00:00
test: audit fix
Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
This commit is contained in:
@@ -2,17 +2,20 @@ import BasePage from '../../Base';
|
||||
import { ProjectViewPage } from './index';
|
||||
import { Locator } from '@playwright/test';
|
||||
import { MetaDataPage } from './Metadata';
|
||||
import { AuditPage } from './Audit';
|
||||
|
||||
export class DataSourcePage extends BasePage {
|
||||
readonly projectView: ProjectViewPage;
|
||||
readonly databaseType: Locator;
|
||||
readonly metaData: MetaDataPage;
|
||||
readonly audit: AuditPage;
|
||||
|
||||
constructor(projectView: ProjectViewPage) {
|
||||
super(projectView.rootPage);
|
||||
this.projectView = projectView;
|
||||
this.databaseType = this.get().locator('.nc-extdb-db-type');
|
||||
this.metaData = new MetaDataPage(this);
|
||||
this.audit = new AuditPage(this);
|
||||
}
|
||||
|
||||
get() {
|
||||
@@ -40,13 +43,18 @@ export class DataSourcePage extends BasePage {
|
||||
}
|
||||
|
||||
async openERD({ rowIndex }: { rowIndex: number }) {
|
||||
// hardwired
|
||||
// await this.rootPage.locator('button.nc-action-btn:has-text("Relations")').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();
|
||||
}
|
||||
|
||||
async openAudit({ 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("Audit")').click();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user