diff --git a/.github/workflows/build-app-pro-beta.yaml b/.github/workflows/build-app-pro-beta.yaml index 733dc36dd..84774b2a2 100644 --- a/.github/workflows/build-app-pro-beta.yaml +++ b/.github/workflows/build-app-pro-beta.yaml @@ -39,7 +39,7 @@ jobs: repository: dbgate/dbgate-pro token: '${{ secrets.GH_TOKEN }}' path: dbgate-pro - ref: a2f824dc711b510a5e8235d3faf4aafab1965184 + ref: ca1a1664e4c45945d7afe9534c43ca6cbb0b06e3 - name: Merge dbgate/dbgate-pro run: | mkdir ../dbgate-pro diff --git a/.github/workflows/build-app-pro.yaml b/.github/workflows/build-app-pro.yaml index 3ab892a19..1c867176d 100644 --- a/.github/workflows/build-app-pro.yaml +++ b/.github/workflows/build-app-pro.yaml @@ -39,7 +39,7 @@ jobs: repository: dbgate/dbgate-pro token: '${{ secrets.GH_TOKEN }}' path: dbgate-pro - ref: a2f824dc711b510a5e8235d3faf4aafab1965184 + ref: ca1a1664e4c45945d7afe9534c43ca6cbb0b06e3 - name: Merge dbgate/dbgate-pro run: | mkdir ../dbgate-pro diff --git a/.github/workflows/build-aws-pro.yaml b/.github/workflows/build-aws-pro.yaml index 52fa8f321..2d98e2363 100644 --- a/.github/workflows/build-aws-pro.yaml +++ b/.github/workflows/build-aws-pro.yaml @@ -36,7 +36,7 @@ jobs: repository: dbgate/dbgate-pro token: '${{ secrets.GH_TOKEN }}' path: dbgate-pro - ref: a2f824dc711b510a5e8235d3faf4aafab1965184 + ref: ca1a1664e4c45945d7afe9534c43ca6cbb0b06e3 - name: Merge dbgate/dbgate-pro run: | mkdir ../dbgate-pro diff --git a/.github/workflows/build-docker-pro.yaml b/.github/workflows/build-docker-pro.yaml index 1da09a70a..ce4f5b724 100644 --- a/.github/workflows/build-docker-pro.yaml +++ b/.github/workflows/build-docker-pro.yaml @@ -44,7 +44,7 @@ jobs: repository: dbgate/dbgate-pro token: '${{ secrets.GH_TOKEN }}' path: dbgate-pro - ref: a2f824dc711b510a5e8235d3faf4aafab1965184 + ref: ca1a1664e4c45945d7afe9534c43ca6cbb0b06e3 - name: Merge dbgate/dbgate-pro run: | mkdir ../dbgate-pro diff --git a/.github/workflows/build-npm-pro.yaml b/.github/workflows/build-npm-pro.yaml index fc876f443..fb417cfb2 100644 --- a/.github/workflows/build-npm-pro.yaml +++ b/.github/workflows/build-npm-pro.yaml @@ -32,7 +32,7 @@ jobs: repository: dbgate/dbgate-pro token: '${{ secrets.GH_TOKEN }}' path: dbgate-pro - ref: a2f824dc711b510a5e8235d3faf4aafab1965184 + ref: ca1a1664e4c45945d7afe9534c43ca6cbb0b06e3 - name: Merge dbgate/dbgate-pro run: | mkdir ../dbgate-pro diff --git a/.github/workflows/e2e-pro.yaml b/.github/workflows/e2e-pro.yaml index 9e3378751..83113cce2 100644 --- a/.github/workflows/e2e-pro.yaml +++ b/.github/workflows/e2e-pro.yaml @@ -26,7 +26,7 @@ jobs: repository: dbgate/dbgate-pro token: '${{ secrets.GH_TOKEN }}' path: dbgate-pro - ref: a2f824dc711b510a5e8235d3faf4aafab1965184 + ref: ca1a1664e4c45945d7afe9534c43ca6cbb0b06e3 - name: Merge dbgate/dbgate-pro run: | mkdir ../dbgate-pro diff --git a/e2e-tests/cypress/e2e/browse-data.cy.js b/e2e-tests/cypress/e2e/browse-data.cy.js index 87f16a17c..520ab8367 100644 --- a/e2e-tests/cypress/e2e/browse-data.cy.js +++ b/e2e-tests/cypress/e2e/browse-data.cy.js @@ -355,6 +355,8 @@ describe('Data browser data', () => { cy.contains('MyChinook').click(); cy.testid('TabsPanel_buttonNewQuery').click(); cy.testid('QueryTab_switchAiAssistantButton').click(); + cy.testid('QueryAiAssistant_allowSendToAiServiceButton').click(); + cy.testid('ConfirmModal_okButton').click(); cy.testid('QueryAiAssistant_promptInput').type('album names'); cy.testid('QueryAiAssistant_queryFromQuestionButton').click(); cy.contains('Use this').click(); diff --git a/e2e-tests/e2eTestTools.js b/e2e-tests/e2eTestTools.js index 417670d8e..2ff82a52f 100644 --- a/e2e-tests/e2eTestTools.js +++ b/e2e-tests/e2eTestTools.js @@ -22,6 +22,9 @@ function clearTestingData() { if (fs.existsSync(path.join(baseDir, 'connections-e2etests.jsonl'))) { fs.unlinkSync(path.join(baseDir, 'connections-e2etests.jsonl')); } + if (fs.existsSync(path.join(baseDir, 'settings-e2etests.jsonl'))) { + fs.unlinkSync(path.join(baseDir, 'settings-e2etests.jsonl')); + } if (fs.existsSync(path.join(baseDir, 'files-e2etests'))) { fs.rmdirSync(path.join(baseDir, 'files-e2etests'), { recursive: true }); } diff --git a/packages/api/src/controllers/config.js b/packages/api/src/controllers/config.js index bb2cd21e2..451331c55 100644 --- a/packages/api/src/controllers/config.js +++ b/packages/api/src/controllers/config.js @@ -136,7 +136,7 @@ module.exports = { deleteSettings_meta: true, async deleteSettings() { - await fs.unlink(path.join(datadir(), 'settings.json')); + await fs.unlink(path.join(datadir(), processArgs.runE2eTests ? 'settings-e2etests.json' : 'settings.json')); return true; }, @@ -161,7 +161,10 @@ module.exports = { async loadSettings() { try { - const settingsText = await fs.readFile(path.join(datadir(), 'settings.json'), { encoding: 'utf-8' }); + const settingsText = await fs.readFile( + path.join(datadir(), processArgs.runE2eTests ? 'settings-e2etests.json' : 'settings.json'), + { encoding: 'utf-8' } + ); return { ...this.fillMissingSettings(JSON.parse(settingsText)), 'other.licenseKey': platformInfo.isElectron ? await this.loadLicenseKey() : undefined, @@ -247,7 +250,10 @@ module.exports = { ...currentValue, ..._.omit(values, ['other.licenseKey']), }; - await fs.writeFile(path.join(datadir(), 'settings.json'), JSON.stringify(updated, undefined, 2)); + await fs.writeFile( + path.join(datadir(), processArgs.runE2eTests ? 'settings-e2etests.json' : 'settings.json'), + JSON.stringify(updated, undefined, 2) + ); // this.settingsValue = updated; if (currentValue['other.licenseKey'] != values['other.licenseKey']) { diff --git a/workflow-templates/includes.tpl.yaml b/workflow-templates/includes.tpl.yaml index e3fe63593..61336d79a 100644 --- a/workflow-templates/includes.tpl.yaml +++ b/workflow-templates/includes.tpl.yaml @@ -7,7 +7,7 @@ checkout-and-merge-pro: repository: dbgate/dbgate-pro token: ${{ secrets.GH_TOKEN }} path: dbgate-pro - ref: a2f824dc711b510a5e8235d3faf4aafab1965184 + ref: ca1a1664e4c45945d7afe9534c43ca6cbb0b06e3 - name: Merge dbgate/dbgate-pro run: | mkdir ../dbgate-pro