fix: Show sqllab state when deleting databases (#17331)

* saving

* fix ts

* update test

* update test

* log unit

* updated test
This commit is contained in:
Hugh A. Miles II
2021-11-04 20:17:08 -04:00
committed by GitHub
parent 43f4ab845a
commit e5fe18660c
5 changed files with 36 additions and 3 deletions

View File

@@ -88,6 +88,10 @@ fetchMock.get(databaseRelatedEndpoint, {
count: 0,
result: [],
},
sqllab_tab_states: {
count: 0,
result: [],
},
});
describe('DatabaseList', () => {
@@ -131,7 +135,7 @@ describe('DatabaseList', () => {
await waitForComponentToPaint(wrapper);
expect(wrapper.find(DeleteModal).props().description).toMatchInlineSnapshot(
`"The database db 0 is linked to 0 charts that appear on 0 dashboards. Are you sure you want to continue? Deleting the database will break those objects."`,
`"The database db 0 is linked to 0 charts that appear on 0 dashboards and users have 0 SQL Lab tabs using this database open. Are you sure you want to continue? Deleting the database will break those objects."`,
);
act(() => {