π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
fix: cleanup old sidebar related changes
Ramesh Mane14f7f827746b
diff --git a/tests/playwright/pages/Dashboard/Sidebar/ProjectNode/index.ts b/tests/playwright/pages/Dashboard/Sidebar/ProjectNode/index.tsindex 5138dd82de..92d93d4be1 100644--- a/tests/playwright/pages/Dashboard/Sidebar/ProjectNode/index.ts+++ b/tests/playwright/pages/Dashboard/Sidebar/ProjectNode/index.ts@@ -156,26 +156,17 @@ export class SidebarProjectNodeObject extends BasePage {async verifyActiveProject({ baseTitle, open = false }: { baseTitle: string; open?: boolean }) {if (!(await this.sidebar.dashboard.leftSidebar.isMiniSidebarVisible())) return true;- const baseMiniSidebarItem = await this.sidebar.dashboard.leftSidebar.getMiniSidebarActionLocator({ type: 'base' });-- const isActive = (await baseMiniSidebarItem.locator('.nc-mini-sidebar-btn').getAttribute('class')).includes(- 'active-base'- );-- // If base sidebar is not visible click base minisidebar icon- if (!isActive) {- await baseMiniSidebarItem.click();- }-const ncProjectHeader = this.sidebar.get().locator('.nc-project-header');- await ncProjectHeader.waitFor();+ // Check if active project is same as baseTitle then return true+ if ((await ncProjectHeader.count()) > 0) {+ await ncProjectHeader.waitFor();- const isActiveProject =- (await ncProjectHeader.getAttribute('data-testid')) === `nc-sidebar-base-title-${baseTitle}`;+ const isActiveProject =+ (await ncProjectHeader.getAttribute('data-testid')) === `nc-sidebar-base-title-${baseTitle}`;- // If active project is same as baseTitle then return true- if (isActiveProject) return true;+ if (isActiveProject) return true;+ }if (!open) return false;diff --git a/tests/playwright/pages/Dashboard/common/LeftSidebar/index.ts b/tests/playwright/pages/Dashboard/common/LeftSidebar/index.tsindex 15f55f7b59..abcd52005e 100644--- a/tests/playwright/pages/Dashboard/common/LeftSidebar/index.ts+++ b/tests/playwright/pages/Dashboard/common/LeftSidebar/index.ts@@ -58,11 +58,6 @@ export class LeftSidebarPage extends BasePage {return this.dashboard.get().locator('.nc-sidebar');}- async isNewSidebar() {- // will be new sidebar always from now- return 1;- }-/*** In shared base/view minisidebar will be hidden*/@@ -76,8 +71,6 @@ export class LeftSidebarPage extends BasePage {* @returns boolean indicating if modal is open*/async verifyBaseListOpen(open: boolean = false) {- if (!(await this.isNewSidebar())) return true;-const isModalOpen = await this.modal_baseList.isVisible();if (!isModalOpen && open) {@@ -162,19 +155,11 @@ export class LeftSidebarPage extends BasePage {async clickHome() {}async getWorkspaceName() {- if (await this.isNewSidebar()) {- return await this.get().locator('.nc-sidebar-header').getAttribute('data-workspace-title');- } else {- return await this.btn_workspace.getAttribute('data-workspace-title');- }+ return await this.get().locator('.nc-sidebar-header').getAttribute('data-workspace-title');}async verifyWorkspaceName({ title }: { title: string }) {- if (await this.isNewSidebar()) {- return expect(await this.getWorkspaceName()).toContain(title);- } else {- return await expect(this.btn_workspace.locator('.nc-workspace-title')).toHaveText(title);- }+ return expect(await this.getWorkspaceName()).toContain(title);}async createWorkspace({ title }: { title: string }) {@@ -264,10 +249,6 @@ export class LeftSidebarPage extends BasePage {}async getMiniSidebarActionLocator({ type }: { type: MiniSidebarActionType }): Promise<Locator | undefined> {- if (!(await this.isNewSidebar())) {- return undefined;- }-await this.miniSidebar.waitFor();const locators = {@@ -293,7 +274,7 @@ export class LeftSidebarPage extends BasePage {type: MiniSidebarActionType;fallback?: () => Promise<void>;}): Promise<boolean | void> {- if (!(await this.isNewSidebar()) || !(await this.isMiniSidebarVisible())) {+ if (!(await this.isMiniSidebarVisible())) {if (fallback) {await fallback();}