Skip to content

Commit

Permalink
fix(VULN-2011): Refresh exposed table on status update success
Browse files Browse the repository at this point in the history
  • Loading branch information
Katerina Patticha committed Oct 21, 2021
1 parent 3d9dda4 commit d394bbe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useDispatch, useSelector } from 'react-redux';
import {
fetchCveDetails,
changeExposedSystemsParameters,
fetchAffectedSystemsByCVE,
clearInventoryStore,
clearCveStore
} from '../../../Store/Actions/Actions';
import { withRouter } from 'react-router-dom';
Expand Down Expand Up @@ -52,7 +52,7 @@ const CVEDetailsPage = ({ match }) => {
cves={cves}
updateRef={() => {
dispatch(fetchCveDetails(cveName));
dispatch(fetchAffectedSystemsByCVE({ id: cveName }));
dispatch(clearInventoryStore());
}}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ describe('CVE details:', () => {
const statusModal = wrapper.find('CveStatusModal');
expect(statusModal).toBeTruthy();
act(() => statusModal.props().updateRef());
expect(store.getActions()[5].type).toEqual('FETCH_AFFECTED_SYSTEMS_BY_CVE');
expect(store.getActions()[5].type).toEqual('CLEAR_INVENTORY_STORE');
});
});

Expand Down

0 comments on commit d394bbe

Please sign in to comment.