This is an automated email from the ASF dual-hosted git repository. sadpandajoe pushed a commit to branch test/explore-save-modal-reducer in repository https://gitbox.apache.org/repos/asf/superset.git
commit 4dfcf6742534b1e2c78889e5f5852fb4cd36a454 Author: Joe Li <[email protected]> AuthorDate: Wed Sep 30 16:53:45 2026 -0700 test(explore): assert SAVE_SLICE_SUCCESS preserves existing modal state Co-Authored-By: Claude Sonnet 5.5 <[email protected]> --- .../src/explore/reducers/saveModalReducer.test.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/superset-frontend/src/explore/reducers/saveModalReducer.test.ts b/superset-frontend/src/explore/reducers/saveModalReducer.test.ts index dcd9c5349b1..31176b5cd6e 100644 --- a/superset-frontend/src/explore/reducers/saveModalReducer.test.ts +++ b/superset-frontend/src/explore/reducers/saveModalReducer.test.ts @@ -89,12 +89,17 @@ test('SAVE_SLICE_SUCCESS records the saved chart and its response data', () => { const data = { id: 7, slice_name: 'My chart' }; const newState = saveModalReducer( - { lastSavedChart: { id: 1 } }, + { isVisible: true, dashboards: [{ id: 1 }], lastSavedChart: { id: 1 } }, { type: SAVE_SLICE_SUCCESS, data }, ); + expect(newState).toEqual({ + isVisible: true, + dashboards: [{ id: 1 }], + data, + lastSavedChart: { id: 7 }, + }); expect(newState.data).toBe(data); - expect(newState.lastSavedChart).toEqual({ id: 7 }); }); test.each([ @@ -133,7 +138,7 @@ test('HYDRATE_EXPLORE replaces the state with payload.saveModal', () => { data: { saveModal: { dashboards: [], isVisible: false } }, }; - expect(saveModalReducer(state, action)).toEqual({ + expect(saveModalReducer(state, action)).toStrictEqual({ dashboards: [], isVisible: false, lastSavedChart: undefined,
