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.
46 lines
1.3 KiB
46 lines
1.3 KiB
import { SettingsPage } from '.'; |
|
import BasePage from '../../Base'; |
|
import { SettingsErdPage } from './Erd'; |
|
import { MetaDataPage } from '../ProjectView/Metadata'; |
|
|
|
export class DataSourcesPage extends BasePage { |
|
private readonly settings: SettingsPage; |
|
readonly erd: SettingsErdPage; |
|
readonly metaData: MetaDataPage; |
|
|
|
constructor(settings: SettingsPage) { |
|
super(settings.rootPage); |
|
this.settings = settings; |
|
this.erd = new SettingsErdPage(this); |
|
this.metaData = new MetaDataPage(this); |
|
} |
|
|
|
get() { |
|
return this.settings.get().locator('[data-testid="nc-settings-datasources"]'); |
|
} |
|
|
|
async openErd({ rowIndex }: { rowIndex: number }) { |
|
const row = this.get() |
|
.locator('.ds-table-row') |
|
.nth(rowIndex + 1); |
|
await row.click(); |
|
await this.get().getByTestId('nc-erd-tab').click(); |
|
} |
|
|
|
async openAudit({ rowIndex }: { rowIndex: number }) { |
|
const row = this.get() |
|
.locator('.ds-table-row') |
|
.nth(rowIndex + 1); |
|
await row.click(); |
|
await this.get().getByTestId('nc-audit-tab').click(); |
|
} |
|
|
|
async openMetaSync({ rowIndex }: { rowIndex: number }) { |
|
// 0th offset for header |
|
const row = this.get() |
|
.locator('.ds-table-row') |
|
.nth(rowIndex + 1); |
|
await row.click(); |
|
await this.get().getByTestId('nc-meta-sync-tab').click(); |
|
} |
|
}
|
|
|