mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-30 23:46:56 +00:00
- Rename `Project` => `Base` - Rename `Base` => `Source` - Remove `db` from data/meta api endpoints - Add backward compatibility for old apis - Migrations for renaming table and columns Signed-off-by: Pranav C <pranavxc@gmail.com>
32 lines
1.0 KiB
TypeScript
32 lines
1.0 KiB
TypeScript
import { Locator } from '@playwright/test';
|
|
import BasePage from '../../Base';
|
|
import { DashboardPage } from '..';
|
|
|
|
export class ImportAirtablePage extends BasePage {
|
|
readonly dashboard: DashboardPage;
|
|
readonly importButton: Locator;
|
|
|
|
constructor(dashboard: DashboardPage) {
|
|
super(dashboard.rootPage);
|
|
this.dashboard = dashboard;
|
|
this.importButton = dashboard.get().locator('.nc-btn-airtable-import');
|
|
}
|
|
|
|
get() {
|
|
return this.dashboard.get().locator(`.nc-modal-airtable-import`);
|
|
}
|
|
|
|
async import({ key, sourceId }: { key: string; sourceId: string }) {
|
|
// kludge: failing in headless mode
|
|
// additional time to allow the modal to render completely
|
|
await this.rootPage.waitForTimeout(1000);
|
|
|
|
await this.get().locator(`.nc-input-api-key >> input`).fill(key);
|
|
await this.get().locator(`.nc-input-shared-base`).fill(sourceId);
|
|
await this.importButton.click();
|
|
|
|
await this.get().locator(`button:has-text("Go to Dashboard")`).waitFor();
|
|
await this.get().locator(`button:has-text("Go to Dashboard")`).click();
|
|
}
|
|
}
|