diff --git a/packages/nc-gui/components/dashboard/TreeView/TableNode.vue b/packages/nc-gui/components/dashboard/TreeView/TableNode.vue index dede1f8c00..8dfae7041c 100644 --- a/packages/nc-gui/components/dashboard/TreeView/TableNode.vue +++ b/packages/nc-gui/components/dashboard/TreeView/TableNode.vue @@ -331,6 +331,7 @@ const deleteTable = () => {
@@ -358,7 +359,7 @@ const deleteTable = () => {
diff --git a/packages/nc-gui/components/dashboard/settings/DataSources.vue b/packages/nc-gui/components/dashboard/settings/DataSources.vue index 96da8bbac9..721fedda6e 100644 --- a/packages/nc-gui/components/dashboard/settings/DataSources.vue +++ b/packages/nc-gui/components/dashboard/settings/DataSources.vue @@ -25,6 +25,8 @@ const { isDataSourceLimitReached } = storeToRefs(basesStore) const baseStore = useBase() const { base } = storeToRefs(baseStore) +const { isUIAllowed } = useRoles() + const { projectPageTab } = storeToRefs(useConfigStore()) const { refreshCommandPalette } = useCommandPalette() @@ -253,400 +255,239 @@ const isNewBaseModalOpen = computed({ }, }) -const isErdModalOpen = computed({ - get: () => { - return [DataSourcesSubTab.ERD].includes(vState.value as any) - }, - set: (val) => { - if (!val) { - vState.value = '' - } - }, -}) - -const isMetaDataModal = computed({ - get: () => { - return [DataSourcesSubTab.Metadata].includes(vState.value as any) - }, - set: (val) => { - if (!val) { - vState.value = '' - } - }, -}) - -const isUIAclModalOpen = computed({ - get: () => { - return [DataSourcesSubTab.UIAcl].includes(vState.value as any) - }, - set: (val) => { - if (!val) { - vState.value = '' - } - }, -}) -const isBaseAuditModalOpen = computed({ - get: () => { - return [DataSourcesSubTab.Audit].includes(vState.value as any) - }, - set: (val) => { - if (!val) { - vState.value = '' - } - }, -}) - -const isEditBaseModalOpen = computed({ - get: () => { - return [DataSourcesSubTab.Edit].includes(vState.value as any) - }, - set: (val) => { - if (!val) { - vState.value = '' - } - }, -}) +const activeSource = ref(null) +const openedTab = ref('erd') diff --git a/packages/nc-gui/components/project/View.vue b/packages/nc-gui/components/project/View.vue index 34cd24b223..952f5b7855 100644 --- a/packages/nc-gui/components/project/View.vue +++ b/packages/nc-gui/components/project/View.vue @@ -162,7 +162,7 @@ watch( - +
diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.json index c481dcfce5..670dc102e9 100644 --- a/packages/nc-gui/lang/en.json +++ b/packages/nc-gui/lang/en.json @@ -448,6 +448,8 @@ "noResultsMatchedYourSearch": "Your search did not yield any matching results" }, "labels": { + "connectionDetails": "Connection Details", + "metaSync": "Meta Sync", "today": "Today", "workspace": "Workspace", "txt": "TXT Record value", diff --git a/packages/noco-docs/docs/100.data-sources/010.data-source-overview.md b/packages/noco-docs/docs/100.data-sources/010.data-source-overview.md index ae3b7cdf8d..085ae8b972 100644 --- a/packages/noco-docs/docs/100.data-sources/010.data-source-overview.md +++ b/packages/noco-docs/docs/100.data-sources/010.data-source-overview.md @@ -21,10 +21,12 @@ Currently only one external data source can be added per project. ## Accessing `Data Sources` -1. Access Base context menu by clicking on the `Base` name in the left sidebar -2. Click on `Data Sources` tab +1. Access Base context menu by clicking on the `...` in the left sidebar against the base name +2. Click on `Settings` tab +3. In the popup modal, click on `Data Sources` tab -![data source](/img/v2/data-source/data-source.png) +![data source](/img/v2/data-source/data-source-1.png) +![data source](/img/v2/data-source/data-source-2.png) Learn more about working with Data sources in the following sections: diff --git a/packages/noco-docs/docs/100.data-sources/020.connect-to-data-source.md b/packages/noco-docs/docs/100.data-sources/020.connect-to-data-source.md index c9e2326156..82fc5f9188 100644 --- a/packages/noco-docs/docs/100.data-sources/020.connect-to-data-source.md +++ b/packages/noco-docs/docs/100.data-sources/020.connect-to-data-source.md @@ -7,10 +7,11 @@ keywords: ['NocoDB data source', 'connect data source', 'external data source', To connect to an external data source, follow the steps below: -1. Access Base context menu by clicking on the `Base` name in the left sidebar -2. Select `Data Sources` tab -3. Click on `+ New Data Source` button -4. On the pop-up modal, provide the following details: +1. Access the Base context menu by clicking on the `...` in the left sidebar against the base name +2. Click on `Settings` tab +3. In the popup modal, click on `Data Sources` tab +4. Click on `+ New Data Source` button +5. On the input modal, provide the following details: | Field Name | Description | |---------------|--------------------------------------------------------------------------------------| @@ -23,7 +24,7 @@ To connect to an external data source, follow the steps below: | Database | Name of the database to connect to | | Schema name | Name of the schema to connect to | -4a. Optionally, if the connection required is TLS/MTLS for MITM protection, follow these additional steps below: +5a. Optionally, if the connection required is TLS/MTLS for MITM protection, follow these additional steps below: - Click on `SSL & Advanced Parameters` - Select `SSL Mode` and upload the client certificate, client key, and Root CA files by clicking on the file. @@ -33,16 +34,18 @@ To connect to an external data source, follow the steps below: Example: In PostgreSQL when SSL mode set to "Required-Identity," if the server certificate's common name (cname) differs from the actual DNS/IP used for connection, the connection will fail.\ To resolve, add "servername" property with same cname value under the SSL section. Additional details are available at [knex configuration options](https://knexjs.org/guide/#configuration-options). -5. Click on `Test Database Connection` button to verify the connection -6. Wait for the connection to be verified. -- After connection is successful, `Submit` button will be enabled. -- Click on `Submit` button to save the data source. +6. Click on the `Test Database Connection` button to verify the connection +7. Wait for the connection to be verified. +- After test is successful, `Counnect to Data Source` button will be enabled. +- Click on `Connect to Data Source` button to save the data source. -![data source-1](/img/v2/data-source/data-source-connect-1.png) -![data source-2](/img/v2/data-source/data-source-connect-2.png) -![data source-3](/img/v2/data-source/data-source-connect-3.png) +![data source-1](/img/v2/data-source/ds-connect-1.png) -![data source-4](/img/v2/data-source/data-source-connect-4a.png) \ No newline at end of file +![data source-2](/img/v2/data-source/ds-connect-2.png) + +![data source-3](/img/v2/data-source/ds-connect-3.png) + +![data source-4](/img/v2/data-source/ds-connect-4.png) diff --git a/packages/noco-docs/docs/100.data-sources/030.sync-with-data-source.md b/packages/noco-docs/docs/100.data-sources/030.sync-with-data-source.md index 4854ef29a5..8c8d7aacb3 100644 --- a/packages/noco-docs/docs/100.data-sources/030.sync-with-data-source.md +++ b/packages/noco-docs/docs/100.data-sources/030.sync-with-data-source.md @@ -5,17 +5,15 @@ tags: ['Data Sources', 'Sync', 'External', 'PG', 'MySQL'] keywords: ['NocoDB data source', 'connect data source', 'external data source', 'PG data source', 'MySQL data source'] --- - -1. Access Base context menu by clicking on the `Base` name in the left sidebar -2. Select `Data Sources` tab -3. Click on `Sync Metadata` button listed under `Actions` column for the data source that you wish to sync metadata for -4. Click on `Reload` button to refresh Sync state (Optional) -5. Any changes to the metadata identified will be listed in the `Sync State` column -6. Click on `Sync Now` button to sync the metadata changes +Access `Data Sources` tab in the `Base Settings` to sync changes done in the external data source with NocoDB. +1. Select the data source that you wish to sync metadata for +2. Click on the `Meta Sync` button listed under `Actions` column for the data source that you wish to sync metadata for +3. Click on the `Reload` button to refresh Sync state (Optional) +4. Any changes to the metadata identified will be listed in the `Sync State` column +5. Click on `Sync Now` button to sync the metadata changes -![sync metadata](/img/v2/data-source/data-source-2.png) - -![sync metadata](/img/v2/data-source/data-source-meta-sync.png) +![sync metadata](/img/v2/data-source/data-source-meta-sync-1.png) +![sync metadata](/img/v2/data-source/data-source-meta-sync-2.png) After the sync is complete, you can see the updated state in the `Sync State` column. Sync modal also marks `Tables metadata is in Sync` in the header. diff --git a/packages/noco-docs/docs/100.data-sources/040.actions-on-data-sources.md b/packages/noco-docs/docs/100.data-sources/040.actions-on-data-sources.md index 44856436e7..69e3103058 100644 --- a/packages/noco-docs/docs/100.data-sources/040.actions-on-data-sources.md +++ b/packages/noco-docs/docs/100.data-sources/040.actions-on-data-sources.md @@ -6,24 +6,22 @@ keywords: ['NocoDB data source', 'UI ACL', 'Audit logs', 'Relations', 'Edit', 'U --- ## Edit external database configuration parameters +- Access `Data Sources` tab in the `Base Settings` +- Click on `Connection Details` tab +- Re-configure database credentials as required -1. Access Base context menu by clicking on the `Base` name in the left sidebar -2. Click on `Data Sources` tab -3. Click on `Edit` icon listed under `Actions` column for the data source that you wish to access ERD (Relations view) for - Go to `Data Sources`, click ``Edit`` icon, you can re-configure database credentials. - Please make sure database configuration parameters are valid. Any incorrect parameters could lead to schema loss! - -![relations](/img/v2/data-source/data-source-edit.png) +:::info +Please make sure database configuration parameters are valid. Any incorrect parameters could lead to schema loss! +::: -![edit db config](/img/v2/data-source/edit-base.png) +![edit-data-source](/img/v2/data-source/data-source-edit.png) ## Remove data source -1. Access Base context menu by clicking on the `Base` name in the left sidebar -2. Click on `Data Sources` tab -3. Click on `Delete` icon listed under `Actions` column for the data source that you wish to Unlink +- Access `Data Sources` tab in the `Base Settings` +- Click on `Delete` icon listed under `Actions` column for the data source that you wish to remove -![datasource unlink](/img/v2/data-source/data-source-unlink.png) +![datasource unlink](/img/v2/data-source/data-source-remove.png) :::note Unlinking a data source will not delete the external data source. It will only remove the data source from the current project. @@ -32,52 +30,45 @@ Unlinking a data source will not delete the external data source. It will only r ## Data source visibility -1. Access Base context menu by clicking on the `Base` name in the left sidebar -2. Click on `Data Sources` tab -3. Toggle radio button listed under `Visibility` column for the data source that you wish to hide/un-hide +- Access `Data Sources` tab in the `Base Settings` +- Toggle radio button listed under `Visibility` column for the data source that you wish to hide/un-hide -![datasource visibility](/img/v2/data-source/data-source-visibility.png) +![datasource visibility](/img/v2/data-source/data-source-hide.png) ## UI Access Control :::info -UI Access Control is available only in Open Source version of NocoDB. +UI Access Control is available only in Open-Source version of NocoDB. ::: -1. Access Base context menu by clicking on the `Base` name in the left sidebar -2. Click on `Data Sources` tab -3. Click on `UI ACL` button listed under `Actions` column for the data source that you wish to manage UI access control for -4. On the UI ACL modal, you can see the list of tables available in the data source as rows & roles available as columns. Toggle checkboxes to enable/disable access to tables for specific roles. -5. Click on `Save` button to save the changes +Access `Data Sources` tab in the `Base Settings` to manage UI access control for the data source. +1. Click on `UI ACL` button listed under `Actions` column for the data source that you wish to manage UI access control for +2. On the UI ACL modal, you can see the list of tables available in the data source as rows & roles available as columns. Toggle checkboxes to enable/disable access to tables for specific roles. +3. Click on `Save` button to save the changes -![ui acl](/img/v2/data-source/data-source-3.png) - -![ui acl](/img/v2/data-source/ui-acl.png) +![ui acl](/img/v2/data-source/data-source-uiacl.png) ## Audit logs -1. Access Base context menu by clicking on the `Base` name in the left sidebar -2. Click on `Data Sources` tab -3. Click on `Audit` button listed under `Actions` column for the data source that you wish to access Audit logs for - -![audit](/img/v2/data-source/audit.png) +Access `Data Sources` tab in the `Base Settings` to access Audit logs for the data source. +- Click on `Default` datasource & then +- Access `Audit` tab to view the audit logs. -![audit logs](/img/v2/data-source/audit-logs.png) +![audit](/img/v2/data-source/data-source-audit.png) +:::info +Audit logs are not available for external data source connections. +::: ## Relations +Access `Data Sources` tab in the `Base Settings` to access Relations view for the data source. +- Select the data source that you wish to access ERD (Relations view) for +- Click on `ERD` tab -1. Access Base context menu by clicking on the `Base` name in the left sidebar -2. Click on `Data Sources` tab -3. Click on `Relations` button listed under `Actions` column for the data source that you wish to access ERD (Relations view) for - -![relations](/img/v2/data-source/data-source-4.png) - -![relations](https://github.com/nocodb/nocodb/assets/86527202/c3775d27-f75d-4263-8903-dd66427de4b4) - +![relations](/img/v2/data-source/data-source-erd.png) ### Junction table names within Relations diff --git a/packages/noco-docs/static/img/v2/data-source/data-source-1.png b/packages/noco-docs/static/img/v2/data-source/data-source-1.png new file mode 100644 index 0000000000..f6fbe5b3f1 Binary files /dev/null and b/packages/noco-docs/static/img/v2/data-source/data-source-1.png differ diff --git a/packages/noco-docs/static/img/v2/data-source/data-source-2.png b/packages/noco-docs/static/img/v2/data-source/data-source-2.png index 0dfb695bb1..5b5605dfee 100644 Binary files a/packages/noco-docs/static/img/v2/data-source/data-source-2.png and b/packages/noco-docs/static/img/v2/data-source/data-source-2.png differ diff --git a/packages/noco-docs/static/img/v2/data-source/data-source-audit.png b/packages/noco-docs/static/img/v2/data-source/data-source-audit.png new file mode 100644 index 0000000000..04c450bcea Binary files /dev/null and b/packages/noco-docs/static/img/v2/data-source/data-source-audit.png differ diff --git a/packages/noco-docs/static/img/v2/data-source/data-source-edit.png b/packages/noco-docs/static/img/v2/data-source/data-source-edit.png index 314df70957..1bc2c39db8 100644 Binary files a/packages/noco-docs/static/img/v2/data-source/data-source-edit.png and b/packages/noco-docs/static/img/v2/data-source/data-source-edit.png differ diff --git a/packages/noco-docs/static/img/v2/data-source/data-source-erd.png b/packages/noco-docs/static/img/v2/data-source/data-source-erd.png new file mode 100644 index 0000000000..ea231db4b6 Binary files /dev/null and b/packages/noco-docs/static/img/v2/data-source/data-source-erd.png differ diff --git a/packages/noco-docs/static/img/v2/data-source/data-source-hide.png b/packages/noco-docs/static/img/v2/data-source/data-source-hide.png new file mode 100644 index 0000000000..e549ce9555 Binary files /dev/null and b/packages/noco-docs/static/img/v2/data-source/data-source-hide.png differ diff --git a/packages/noco-docs/static/img/v2/data-source/data-source-meta-sync-1.png b/packages/noco-docs/static/img/v2/data-source/data-source-meta-sync-1.png new file mode 100644 index 0000000000..669833f0b9 Binary files /dev/null and b/packages/noco-docs/static/img/v2/data-source/data-source-meta-sync-1.png differ diff --git a/packages/noco-docs/static/img/v2/data-source/data-source-meta-sync-2.png b/packages/noco-docs/static/img/v2/data-source/data-source-meta-sync-2.png new file mode 100644 index 0000000000..87f9082262 Binary files /dev/null and b/packages/noco-docs/static/img/v2/data-source/data-source-meta-sync-2.png differ diff --git a/packages/noco-docs/static/img/v2/data-source/data-source-remove.png b/packages/noco-docs/static/img/v2/data-source/data-source-remove.png new file mode 100644 index 0000000000..9d1d12f9d1 Binary files /dev/null and b/packages/noco-docs/static/img/v2/data-source/data-source-remove.png differ diff --git a/packages/noco-docs/static/img/v2/data-source/data-source-uiacl.png b/packages/noco-docs/static/img/v2/data-source/data-source-uiacl.png new file mode 100644 index 0000000000..b732672314 Binary files /dev/null and b/packages/noco-docs/static/img/v2/data-source/data-source-uiacl.png differ diff --git a/packages/noco-docs/static/img/v2/data-source/ds-connect-1.png b/packages/noco-docs/static/img/v2/data-source/ds-connect-1.png new file mode 100644 index 0000000000..f6fbe5b3f1 Binary files /dev/null and b/packages/noco-docs/static/img/v2/data-source/ds-connect-1.png differ diff --git a/packages/noco-docs/static/img/v2/data-source/ds-connect-2.png b/packages/noco-docs/static/img/v2/data-source/ds-connect-2.png new file mode 100644 index 0000000000..c3f19b1d0c Binary files /dev/null and b/packages/noco-docs/static/img/v2/data-source/ds-connect-2.png differ diff --git a/packages/noco-docs/static/img/v2/data-source/ds-connect-3.png b/packages/noco-docs/static/img/v2/data-source/ds-connect-3.png new file mode 100644 index 0000000000..6242a0db89 Binary files /dev/null and b/packages/noco-docs/static/img/v2/data-source/ds-connect-3.png differ diff --git a/packages/noco-docs/static/img/v2/data-source/ds-connect-4.png b/packages/noco-docs/static/img/v2/data-source/ds-connect-4.png new file mode 100644 index 0000000000..358af2081a Binary files /dev/null and b/packages/noco-docs/static/img/v2/data-source/ds-connect-4.png differ diff --git a/tests/playwright/pages/Dashboard/ProjectView/Metadata.ts b/tests/playwright/pages/Dashboard/ProjectView/Metadata.ts index cbddf82810..91e8805232 100644 --- a/tests/playwright/pages/Dashboard/ProjectView/Metadata.ts +++ b/tests/playwright/pages/Dashboard/ProjectView/Metadata.ts @@ -25,7 +25,9 @@ export class MetaDataPage extends BasePage { await this.get().click(); await this.rootPage.keyboard.press('Escape'); await this.rootPage.keyboard.press('Escape'); - await this.get().waitFor({ state: 'detached' }); + await this.rootPage.waitForSelector('div.ant-modal-content', { + state: 'hidden', + }); } async sync() { diff --git a/tests/playwright/pages/Dashboard/ProjectView/index.ts b/tests/playwright/pages/Dashboard/ProjectView/index.ts index 7d00051aee..bff160c808 100644 --- a/tests/playwright/pages/Dashboard/ProjectView/index.ts +++ b/tests/playwright/pages/Dashboard/ProjectView/index.ts @@ -54,12 +54,9 @@ export class ProjectViewPage extends BasePage { expect(await this.tab_allTables.isVisible()).toBeTruthy(); if (role.toLowerCase() === 'creator' || role.toLowerCase() === 'owner') { - await this.tab_dataSources.waitFor({ state: 'visible' }); await this.tab_accessSettings.waitFor({ state: 'visible' }); - expect(await this.tab_dataSources.isVisible()).toBeTruthy(); expect(await this.tab_accessSettings.isVisible()).toBeTruthy(); } else { - expect(await this.tab_dataSources.isVisible()).toBeFalsy(); expect(await this.tab_accessSettings.isVisible()).toBeFalsy(); } diff --git a/tests/playwright/pages/Dashboard/Settings/DataSources.ts b/tests/playwright/pages/Dashboard/Settings/DataSources.ts index d1b5ce646e..5b15944f49 100644 --- a/tests/playwright/pages/Dashboard/Settings/DataSources.ts +++ b/tests/playwright/pages/Dashboard/Settings/DataSources.ts @@ -20,21 +20,35 @@ export class DataSourcesPage extends BasePage { } get() { - return this.settings.get().locator(`[data-testid="nc-settings-subtab-Data Sources"]`); + return this.settings.get().locator('[data-testid="nc-settings-datasources"]'); } - async openErd({ dataSourceName }: { dataSourceName: string }) { - await this.get().locator('.ds-table-row', { hasText: dataSourceName }).locator('button:has-text("ERD")').click(); + async openErd({ rowIndex }: { rowIndex: number }) { + const row = this.get() + .locator('.ds-table-row') + .nth(rowIndex + 1); + await row.click(); + await this.get().getByTestId('nc-erd-tab').click(); + } + + async openAudit({ rowIndex }: { rowIndex: number }) { + const row = this.get() + .locator('.ds-table-row') + .nth(rowIndex + 1); + await row.click(); + await this.get().getByTestId('nc-audit-tab').click(); } async openAcl({ dataSourceName = defaultBaseName }: { dataSourceName?: string } = {}) { await this.get().locator('.ds-table-row', { hasText: dataSourceName }).locator('button:has-text("UI ACL")').click(); } - async openMetaSync({ dataSourceName = defaultBaseName }: { dataSourceName?: string } = {}) { - await this.get() - .locator('.ds-table-row', { hasText: dataSourceName }) - .locator('button:has-text("Sync Metadata")') - .click(); + async openMetaSync({ rowIndex }: { rowIndex: number }) { + // 0th offset for header + const row = this.get() + .locator('.ds-table-row') + .nth(rowIndex + 1); + await row.click(); + await this.get().getByTestId('nc-meta-sync-tab').click(); } } diff --git a/tests/playwright/pages/Dashboard/TreeView.ts b/tests/playwright/pages/Dashboard/TreeView.ts index cc226a0537..b8e808eda3 100644 --- a/tests/playwright/pages/Dashboard/TreeView.ts +++ b/tests/playwright/pages/Dashboard/TreeView.ts @@ -182,7 +182,7 @@ export class TreeViewPage extends BasePage { await this.waitForTableOptions({ title }); await this.get().locator(`.nc-base-tree-tbl-${tableTitle}`).locator('.nc-tbl-context-menu').click(); - await this.rootPage.locator('.ant-dropdown').locator('.nc-menu-item:has-text("Delete")').click(); + await this.rootPage.locator('.ant-dropdown').locator('.nc-menu-item.nc-table-delete:has-text("Delete")').click(); await this.waitForResponse({ uiAction: async () => { @@ -205,7 +205,7 @@ export class TreeViewPage extends BasePage { await this.waitForTableOptions({ title }); await this.get().locator(`.nc-base-tree-tbl-${tableTitle}`).locator('.nc-tbl-context-menu').click(); - await this.rootPage.locator('.ant-dropdown').locator('.nc-menu-item:has-text("Rename")').click(); + await this.rootPage.locator('.ant-dropdown').locator('.nc-table-rename.nc-menu-item:has-text("Rename")').click(); await this.dashboard.get().locator('[placeholder="Enter table name"]').fill(newTitle); await this.dashboard.get().locator('button:has-text("Rename Table")').click(); diff --git a/tests/playwright/tests/db/features/erd.spec.ts b/tests/playwright/tests/db/features/erd.spec.ts index 3dca369431..345696bac0 100644 --- a/tests/playwright/tests/db/features/erd.spec.ts +++ b/tests/playwright/tests/db/features/erd.spec.ts @@ -45,8 +45,10 @@ test.describe('Erd', () => { }; const openProjectErd = async () => { - await dashboard.baseView.tab_dataSources.click(); - await dashboard.baseView.dataSources.openERD({ rowIndex: 0 }); + await dashboard.treeView.baseSettings({ title: context.base.title }); + await dashboard.settings.selectTab({ tab: 'dataSources' }); + await dashboard.settings.dataSources.openErd({ rowIndex: 0 }); + // await dashboard.baseView.dataSources.openERD({ rowIndex: 0 }); }; const openErdOfATable = async (tableName: string) => { diff --git a/tests/playwright/tests/db/features/metaSync.spec.ts b/tests/playwright/tests/db/features/metaSync.spec.ts index 61517f1fbd..e11b3c7cd3 100644 --- a/tests/playwright/tests/db/features/metaSync.spec.ts +++ b/tests/playwright/tests/db/features/metaSync.spec.ts @@ -36,8 +36,12 @@ test.describe('Meta sync', () => { test('Meta sync', async () => { test.setTimeout(process.env.CI ? 100000 : 70000); - await dashboard.baseView.tab_dataSources.click(); - await dashboard.baseView.dataSources.openMetaSync({ rowIndex: 0 }); + // await dashboard.baseView.tab_dataSources.click(); + // await dashboard.baseView.dataSources.openMetaSync({ rowIndex: 0 }); + + await dashboard.treeView.baseSettings({ title: context.base.title }); + await dashboard.settings.selectTab({ tab: 'dataSources' }); + await dashboard.settings.dataSources.openMetaSync({ rowIndex: 0 }); await dbExec(`CREATE TABLE table1 (id INT NOT NULL, col1 INT NULL, PRIMARY KEY (id))`); await dbExec(`CREATE TABLE table2 (id INT NOT NULL, col1 INT NULL, PRIMARY KEY (id))`); @@ -247,8 +251,9 @@ test.describe('Meta sync', () => { `INSERT INTO table1 (id, col1, col2, col3, col4) VALUES (1,1,1,1,1), (2,2,2,2,2), (3,3,3,3,3), (4,4,4,4,4), (5,5,5,5,5), (6,6,6,6,6), (7,7,7,7,7), (8,8,8,8,8), (9,9,9,9,9);` ); - await dashboard.baseView.tab_dataSources.click(); - await dashboard.baseView.dataSources.openMetaSync({ rowIndex: 0 }); + await dashboard.treeView.baseSettings({ title: context.base.title }); + await dashboard.settings.selectTab({ tab: 'dataSources' }); + await dashboard.settings.dataSources.openMetaSync({ rowIndex: 0 }); await metaData.clickReload(); await metaData.sync(); diff --git a/tests/playwright/tests/db/general/tableOperations.spec.ts b/tests/playwright/tests/db/general/tableOperations.spec.ts index 9bec93ac98..8b05dcfc68 100644 --- a/tests/playwright/tests/db/general/tableOperations.spec.ts +++ b/tests/playwright/tests/db/general/tableOperations.spec.ts @@ -32,8 +32,10 @@ test.describe('Table Operations', () => { // Audit logs in clickhouse; locally wont be accessible await dashboard.treeView.openProject({ title: context.base.title, context }); - await dashboard.baseView.tab_dataSources.click(); - await dashboard.baseView.dataSources.openAudit({ rowIndex: 0 }); + + await dashboard.treeView.baseSettings({ title: context.base.title }); + await dashboard.settings.selectTab({ tab: 'dataSources' }); + await dashboard.settings.dataSources.openAudit({ rowIndex: 0 }); await audit.verifyRow({ index: 0,