diff --git a/packages/nc-gui/components/dashboard/TreeView/Project/Home.vue b/packages/nc-gui/components/dashboard/TreeView/Project/Home.vue index 5c8d93c014..9933c1147e 100644 --- a/packages/nc-gui/components/dashboard/TreeView/Project/Home.vue +++ b/packages/nc-gui/components/dashboard/TreeView/Project/Home.vue @@ -313,29 +313,29 @@ defineExpose({ -
- +
-
- + +
+ - {{ - $t('general.createEntity', { - entity: $t('objects.table'), - }) - }} -
-
-
-
+ {{ + $t('general.createEntity', { + entity: $t('objects.table'), + }) + }} +
+ +
{ + if (!(await this.isNewSidebar())) return false; + + await this.miniSidebar.waitFor(); + + switch (type) { + case 'ws': { + break; + } + case 'base': { + await this.miniSidebar.getByTestId('nc-sidebar-project-btn').click(); + break; + } + case 'cmd-k': { + await this.miniSidebar.getByTestId('nc-sidebar-cmd-k-btn').click(); + break; + } + case 'teamAndSettings': { + await this.miniSidebar.getByTestId('nc-sidebar-team-settings-btn').click(); + break; + } + case 'integration': { + await this.miniSidebar.getByTestId('nc-sidebar-integrations-btn').click(); + break; + } + case 'feeds': { + await this.miniSidebar.getByTestId('nc-sidebar-product-feed').click(); + break; + } + case 'notification': { + await this.miniSidebar.getByTestId('nc-sidebar-notification-btn').click(); + break; + } + case 'userInfo': { + await this.miniSidebar.getByTestId('nc-sidebar-userinfo').click(); + break; + } + } + } + getAddNewTableBtn({ baseTitle }: { baseTitle: string }) { return this.dashboard .get() @@ -88,7 +134,12 @@ export class TreeViewPage extends BasePage { } async openBase({ title }: { title: string }) { + if (!(await this.isBaseListOpen())) { + await this.miniSidebarActionClick({ type: 'base' }); + } + const nodes = this.get().locator(`[data-testid="nc-sidebar-base-${title.toLowerCase()}"]`); + await nodes.waitFor(); await nodes.click(); return; }