diff --git a/superset-frontend/src/features/databases/DatabaseModal/index.tsx b/superset-frontend/src/features/databases/DatabaseModal/index.tsx index 47c9a8b658..06a655b456 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/index.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/index.tsx @@ -1715,35 +1715,36 @@ const DatabaseModal: FunctionComponent = ({ ) { return ( [ antDModalNoPaddingStyles, antDModalStyles(theme), formHelperStyles(theme), formStyles(theme), ]} + footer={renderModalFooter()} + maskClosable={false} name="database" - onHandledPrimaryAction={onSave} onHide={onClose} + onHandledPrimaryAction={onSave} primaryButtonName={t('Connect')} - width="500px" - centered show={show} title={

{t('Connect a database')}

} - footer={renderModalFooter()} + width="500px" > - {passwordNeededField()} {confirmOverwriteField()} {importingErrorAlert()} + {passwordNeededField()}
); } @@ -1771,6 +1772,7 @@ const DatabaseModal: FunctionComponent = ({

{isEditMode ? t('Edit database') : t('Connect a database')}

} footer={modalFooter} + maskClosable={false} > @@ -1930,6 +1932,7 @@ const DatabaseModal: FunctionComponent = ({ show={show} title={

{t('Connect a database')}

} footer={renderModalFooter()} + maskClosable={false} > {!isLoading && hasConnectedDb ? ( <> diff --git a/tests/unit_tests/db_engine_specs/test_presto.py b/tests/unit_tests/db_engine_specs/test_presto.py index 08ee5173ea..5c91bc87fc 100644 --- a/tests/unit_tests/db_engine_specs/test_presto.py +++ b/tests/unit_tests/db_engine_specs/test_presto.py @@ -24,7 +24,6 @@ from pyhive.sqlalchemy_presto import PrestoDialect from sqlalchemy import sql, text, types from sqlalchemy.engine.url import make_url -from superset.sql_parse import Table from superset.utils.core import GenericDataType from tests.unit_tests.db_engine_specs.utils import ( assert_column_spec, @@ -135,7 +134,7 @@ def test_where_latest_partition( str( PrestoEngineSpec.where_latest_partition( # type: ignore database=mock.MagicMock(), - table=Table("table"), + table_name="table", query=sql.select(text("* FROM table")), columns=[ { diff --git a/tests/unit_tests/db_engine_specs/test_trino.py b/tests/unit_tests/db_engine_specs/test_trino.py index 8e67fffe76..df86b4701f 100644 --- a/tests/unit_tests/db_engine_specs/test_trino.py +++ b/tests/unit_tests/db_engine_specs/test_trino.py @@ -38,14 +38,12 @@ from superset.db_engine_specs.exceptions import ( SupersetDBAPIOperationalError, SupersetDBAPIProgrammingError, ) -from superset.sql_parse import Table from superset.superset_typing import ResultSetColumnType, SQLAColumnType, SQLType from superset.utils.core import GenericDataType from tests.unit_tests.db_engine_specs.utils import ( assert_column_spec, assert_convert_dttm, ) -from tests.unit_tests.fixtures.common import dttm def _assert_columns_equal(actual_cols, expected_cols) -> None: @@ -576,7 +574,7 @@ def test_where_latest_partition( str( TrinoEngineSpec.where_latest_partition( # type: ignore database=MagicMock(), - table=Table("table"), + table_name="table", query=sql.select(text("* FROM table")), columns=[ {