mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-29 19:56:58 +00:00
test: import airtable
Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
This commit is contained in:
committed by
Muhammed Mustafa
parent
31917d23ab
commit
d342a74dc4
53
scripts/playwright/tests/import.spec.ts
Normal file
53
scripts/playwright/tests/import.spec.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
import { test } from "@playwright/test";
|
||||
import { DashboardPage } from "../pages/Dashboard";
|
||||
import setup from "../setup";
|
||||
|
||||
const apiKey = process.env.E2E_AIRTABLE_API_KEY;
|
||||
const apiBase = process.env.E2E_AIRTABLE_BASE_ID;
|
||||
|
||||
test.describe("Import", () => {
|
||||
let dashboard: DashboardPage;
|
||||
let context: any;
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
context = await setup({ page });
|
||||
dashboard = new DashboardPage(page, context.project);
|
||||
});
|
||||
|
||||
test("Airtable", async () => {
|
||||
// create empty project
|
||||
await dashboard.clickHome();
|
||||
await dashboard.createProject({ name: "airtable", type: "xcdb" });
|
||||
|
||||
await dashboard.treeView.quickImport({ title: "Airtable" });
|
||||
await dashboard.importAirtable.import({
|
||||
key: apiKey,
|
||||
baseId: apiBase,
|
||||
});
|
||||
await dashboard.rootPage.waitForTimeout(1000);
|
||||
});
|
||||
|
||||
test("Excel", async () => {
|
||||
// create empty project
|
||||
await dashboard.clickHome();
|
||||
await dashboard.createProject({ name: "excel", type: "xcdb" });
|
||||
|
||||
await dashboard.treeView.quickImport({ title: "Microsoft Excel" });
|
||||
});
|
||||
|
||||
test("CSV", async () => {
|
||||
// create empty project
|
||||
await dashboard.clickHome();
|
||||
await dashboard.createProject({ name: "CSV", type: "xcdb" });
|
||||
|
||||
await dashboard.treeView.quickImport({ title: "CSV file" });
|
||||
});
|
||||
|
||||
test("JSON", async () => {
|
||||
// create empty project
|
||||
await dashboard.clickHome();
|
||||
await dashboard.createProject({ name: "JSON", type: "xcdb" });
|
||||
|
||||
await dashboard.treeView.quickImport({ title: "JSON file" });
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user