fix: clear modal state after adding dataset (#17044)

* fix: clear modal state after adding dataset

* Fix test

* Small fixes
This commit is contained in:
Beto Dealmeida
2021-10-10 16:21:14 -07:00
committed by GitHub
parent 7c1c89c94b
commit 16a1df75fc
5 changed files with 91 additions and 64 deletions

View File

@@ -26,7 +26,12 @@ import DatabaseSelector from '.';
const SupersetClientGet = jest.spyOn(SupersetClient, 'get');
const createProps = () => ({
db: { id: 1, database_name: 'test', backend: 'test-postgresql' },
db: {
id: 1,
database_name: 'test',
backend: 'test-postgresql',
allow_multi_schema_metadata_fetch: false,
},
formMode: false,
isDatabaseSelectEnabled: true,
readOnly: false,
@@ -246,6 +251,7 @@ test('Sends the correct db when changing the database', async () => {
id: 2,
database_name: 'test-mysql',
backend: 'mysql',
allow_multi_schema_metadata_fetch: false,
}),
),
);