π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
fix: some test update
Ramesh Mane9ac0c1110920
diff --git a/tests/playwright/pages/Dashboard/ExpandedForm/index.ts b/tests/playwright/pages/Dashboard/ExpandedForm/index.tsindex a9860bdc1b..837dc8a8f6 100644--- a/tests/playwright/pages/Dashboard/ExpandedForm/index.ts+++ b/tests/playwright/pages/Dashboard/ExpandedForm/index.ts@@ -227,9 +227,9 @@ export class ExpandedFormPage extends BasePage {const role = param.role.toLowerCase();// expect(await this.btn_moreActions.count()).toBe(1);+ await this.rootPage.waitForTimeout(200);if (await this.btn_moreActions.isVisible()) {// In large screen, the more actions button will be hidden as copy record url button will be visible inline (outside)- await this.btn_moreActions.waitFor();await this.btn_moreActions.click();}diff --git a/tests/playwright/pages/Dashboard/ProjectView/index.ts b/tests/playwright/pages/Dashboard/ProjectView/index.tsindex d260fa74ff..cd4dc66720 100644--- a/tests/playwright/pages/Dashboard/ProjectView/index.ts+++ b/tests/playwright/pages/Dashboard/ProjectView/index.ts@@ -57,6 +57,8 @@ export class ProjectViewPage extends BasePage {async openOverview() {if (await this.get().isVisible()) return;+ await this.sidebar_overview_btn.scrollIntoViewIfNeeded();+await this.sidebar_overview_btn.click();await this.get().waitFor({ state: 'visible' });diff --git a/tests/playwright/pages/Dashboard/Sidebar/ProjectNode/index.ts b/tests/playwright/pages/Dashboard/Sidebar/ProjectNode/index.tsindex 92d93d4be1..772c8b6ca2 100644--- a/tests/playwright/pages/Dashboard/Sidebar/ProjectNode/index.ts+++ b/tests/playwright/pages/Dashboard/Sidebar/ProjectNode/index.ts@@ -15,6 +15,10 @@ export class SidebarProjectNodeObject extends BasePage {return this.sidebar.get().getByTestId(`nc-sidebar-base-title-${baseTitle}`).last();}+ getMenuTrigger({ baseTitle }: { baseTitle: string }) {+ return this.sidebar.get().getByTestId(`nc-sidebar-base-${baseTitle}`);+ }+async click({ baseTitle }: { baseTitle: string }) {await this.get({baseTitle,@@ -24,9 +28,8 @@ export class SidebarProjectNodeObject extends BasePage {async clickOptions({ baseTitle }: { baseTitle: string }) {await this.sidebar.baseNode.verifyActiveProject({ baseTitle, open: true });- await this.get({- baseTitle,- }).click();+ await this.getMenuTrigger({ baseTitle }).waitFor();+ await this.getMenuTrigger({ baseTitle }).click();}async verifyTableAddBtn({ baseTitle, visible }: { baseTitle: string; visible: boolean }) {@@ -71,75 +74,51 @@ export class SidebarProjectNodeObject extends BasePage {copyProjectInfoVisible?: boolean;clickBaseTitle?: boolean;}) {- await this.get({- baseTitle,- }).waitFor({ state: 'visible' });- await this.get({- baseTitle,- }).scrollIntoViewIfNeeded();- await this.get({- baseTitle,- }).hover();+ const projectOptions = await this.rootPage.getByTestId(`nc-sidebar-base-${baseTitle}-options`);++ await projectOptions.waitFor({ state: 'visible' });- const renameLocator = await this.rootPage- .getByTestId(`nc-sidebar-base-${baseTitle}-options`)- .getByTestId('nc-sidebar-base-rename');+ const renameLocator = projectOptions.getByTestId('nc-sidebar-base-rename');if (renameVisible) await renameLocator.isVisible();else await expect(renameLocator).toHaveCount(0);- const starredLocator = await this.rootPage- .getByTestId(`nc-sidebar-base-${baseTitle}-options`)- .getByTestId('nc-sidebar-base-starred');+ const starredLocator = projectOptions.getByTestId('nc-sidebar-base-starred');if (starredVisible) await expect(starredLocator).toBeVisible();else await expect(starredLocator).toHaveCount(0);- const duplicateLocator = await this.rootPage- .getByTestId(`nc-sidebar-base-${baseTitle}-options`)- .getByTestId('nc-sidebar-base-duplicate');+ const duplicateLocator = projectOptions.getByTestId('nc-sidebar-base-duplicate');if (duplicateVisible) await expect(duplicateLocator).toBeVisible();else await expect(duplicateLocator).toHaveCount(0);- const relationsLocator = await this.rootPage- .getByTestId(`nc-sidebar-base-${baseTitle}-options`)- .getByTestId('nc-sidebar-base-relations');+ const relationsLocator = projectOptions.getByTestId('nc-sidebar-base-relations');if (relationsVisible) await expect(relationsLocator).toBeVisible();else await expect(relationsLocator).toHaveCount(0);- const restApisLocator = await this.rootPage- .getByTestId(`nc-sidebar-base-${baseTitle}-options`)- .getByTestId('nc-sidebar-base-rest-apis');+ const restApisLocator = projectOptions.getByTestId('nc-sidebar-base-rest-apis');if (restApisVisible) await expect(restApisLocator).toBeVisible();else await expect(restApisLocator).toHaveCount(0);- const importLocator = await this.rootPage- .getByTestId(`nc-sidebar-base-${baseTitle}-options`)- .getByTestId('nc-sidebar-base-import');+ const importLocator = projectOptions.getByTestId('nc-sidebar-base-import');if (importVisible) await expect(importLocator).toBeVisible();else await expect(importLocator).toHaveCount(0);- const settingsLocator = await this.rootPage- .getByTestId(`nc-sidebar-base-${baseTitle}-options`)- .getByTestId('nc-sidebar-base-settings');+ const settingsLocator = projectOptions.getByTestId('nc-sidebar-base-settings');if (settingsVisible) await expect(settingsLocator).toBeVisible();else await expect(settingsLocator).toHaveCount(0);- const deleteLocator = await this.rootPage- .getByTestId(`nc-sidebar-base-${baseTitle}-options`)- .getByTestId('nc-sidebar-base-delete');+ const deleteLocator = projectOptions.getByTestId('nc-sidebar-base-delete');if (deleteVisible) await expect(deleteLocator).toBeVisible();else await expect(deleteLocator).toHaveCount(0);- const copyProjectInfoLocator = await this.rootPage- .getByTestId(`nc-sidebar-base-${baseTitle}-options`)- .getByTestId('nc-sidebar-base-copy-base-info');+ const copyProjectInfoLocator = projectOptions.getByTestId('nc-sidebar-base-copy-base-info');if (copyProjectInfoVisible) await expect(copyProjectInfoLocator).toBeVisible();else await expect(copyProjectInfoLocator).toHaveCount(0);diff --git a/tests/playwright/pages/Dashboard/TreeView.ts b/tests/playwright/pages/Dashboard/TreeView.tsindex 86a1f9b659..8f88f36073 100644--- a/tests/playwright/pages/Dashboard/TreeView.ts+++ b/tests/playwright/pages/Dashboard/TreeView.ts@@ -244,6 +244,11 @@ export class TreeViewPage extends BasePage {const tableId = await this.get().locator(`.nc-base-tree-tbl-${searchTitle}`).getAttribute('data-table-id');+ // Wait for newly create table navigation and auto scroll+ await this.rootPage.waitForTimeout(1000);++ await this.rootPage.waitForLoadState('networkidle');+return tableId;}