diff --git a/superset-frontend/src/components/Datasource/DatasourceEditor.jsx b/superset-frontend/src/components/Datasource/DatasourceEditor.jsx index e293856fb1a8a..aa3272a6b405b 100644 --- a/superset-frontend/src/components/Datasource/DatasourceEditor.jsx +++ b/superset-frontend/src/components/Datasource/DatasourceEditor.jsx @@ -118,6 +118,16 @@ const StyledLabelWrapper = styled.div` } `; +const StyledColumnsTabWrapper = styled.div` + .table > tbody > tr > td { + vertical-align: middle; + } + + .ant-tag { + margin-top: ${({ theme }) => theme.gridUnit}px; + } +`; + const checkboxGenerator = (d, onChange) => ( ); @@ -297,7 +307,7 @@ function ColumnCollectionTable({ details={record.certification_details} /> )} - + ) : ( @@ -1040,11 +1050,6 @@ class DatasourceEditor extends React.PureComponent { expandFieldset={
- } - /> ), verbose_name: (v, onChange) => ( - + ), expression: (v, onChange) => ( - ), description: (v, onChange, label) => ( @@ -1209,7 +1216,7 @@ class DatasourceEditor extends React.PureComponent { } key={2} > -
+
+ { }); userEvent.click(getToggles[0]); const getTextboxes = screen.getAllByRole('textbox'); - expect(getTextboxes.length).toEqual(5); + expect(getTextboxes.length).toEqual(12); const inputLabel = screen.getByPlaceholderText('Label'); const inputDescription = screen.getByPlaceholderText('Description'); @@ -122,10 +122,9 @@ describe('DatasourceEditor', () => { }); expect(addBtn).toBeInTheDocument(); userEvent.click(addBtn); - const newColumn = screen.getByRole('button', { - name: //i, - }); - expect(newColumn).toBeInTheDocument(); + // newColumn (Column name) is the first textbox in the tab + const newColumn = screen.getAllByRole('textbox', { name: '' })[0]; + expect(newColumn).toHaveValue(''); }); it('renders isSqla fields', () => {