From 83e222232aa41a7b4096b815ecff51cf2e0b8ad2 Mon Sep 17 00:00:00 2001 From: lyndsiWilliams Date: Tue, 29 Jun 2021 14:41:34 -0500 Subject: [PATCH 1/3] Removed unnecessary TODO and named the remaining ones --- .../cypress/integration/database/modal.test.ts | 1 - .../views/CRUD/data/database/DatabaseModal/index.test.jsx | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/superset-frontend/cypress-base/cypress/integration/database/modal.test.ts b/superset-frontend/cypress-base/cypress/integration/database/modal.test.ts index 5a5a97ef47817..57453650f196f 100644 --- a/superset-frontend/cypress-base/cypress/integration/database/modal.test.ts +++ b/superset-frontend/cypress-base/cypress/integration/database/modal.test.ts @@ -17,7 +17,6 @@ * under the License. */ import { DATABASE_LIST } from './helper'; -// TODO: Add new tests with the modal describe('Add database', () => { beforeEach(() => { cy.login(); diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.test.jsx b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.test.jsx index 7b8d822cbcae5..03bbf8c534760 100644 --- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.test.jsx +++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.test.jsx @@ -266,7 +266,7 @@ describe('DatabaseModal', () => { hidden: true, }); - // ---------- TODO: Selector options, can't seem to get these to render properly. + // ---------- TODO (lyndsiWilliams): Selector options, can't seem to get these to render properly. // renderAvailableSelector() => - Supported databases alert const alertIcon = screen.getByRole('img', { name: /info icon/i }); @@ -901,7 +901,7 @@ describe('DatabaseModal', () => { }); it('runs fetchResource when "Connect" is clicked', () => { - /* ---------- 🐞 TODO: function mock is not currently working 🐞 ---------- + /* ---------- 🐞 TODO (lyndsiWilliams): function mock is not currently working 🐞 ---------- // Mock useSingleViewResource const mockUseSingleViewResource = jest.fn(); @@ -935,7 +935,7 @@ describe('DatabaseModal', () => { }); it('runs testDatabaseConnection when "TEST CONNECTION" is clicked', () => { - /* ---------- 🐞 TODO: function mock is not currently working 🐞 ---------- + /* ---------- 🐞 TODO (lyndsiWilliams): function mock is not currently working 🐞 ---------- // Mock testDatabaseConnection const mockTestDatabaseConnection = jest.fn(); @@ -995,7 +995,7 @@ describe('DatabaseModal', () => { expect(usernameField).toHaveValue('testdb'); expect(passwordField).toHaveValue('demoPassword'); - /* ---------- 🐞 TODO: function mock is not currently working 🐞 ---------- + /* ---------- 🐞 TODO (lyndsiWilliams): function mock is not currently working 🐞 ---------- // Mock useSingleViewResource const mockUseSingleViewResource = jest.fn(); From b8be120b60f52982f7135c222828b0426c322faf Mon Sep 17 00:00:00 2001 From: lyndsiWilliams Date: Tue, 29 Jun 2021 14:54:28 -0500 Subject: [PATCH 2/3] Added translation functionality --- .../DatabaseModal/DatabaseConnectionForm.tsx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm.tsx b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm.tsx index 8a9945d95065f..80527f0c0ae68 100644 --- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm.tsx +++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm.tsx @@ -85,7 +85,7 @@ const CredentialsInfo = ({ {!isEditMode && ( <> - How do you want to enter service account credentials? + `${t('How do you want to enter service account credentials?')}` @@ -106,7 +106,7 @@ const CredentialsInfo = ({ isEditMode || editNewDb ? (
- Service Account + `${t('Service Account')}`