summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/src/sdc-app/onboarding/softwareProduct/validationResults/SoftwareProductValidationResultsViewReducer.js
blob: 99bf68f723a57393a94d29a7a3cb05b2a70760fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { actionTypes } from './SoftwareProductValidationResultsViewConstants.js';

export default (state = {}, action) => {
    switch (action.type) {
        case actionTypes.FETCH_VSP_RESULT: {
            return {
                ...state,
                vspTestResults: action.vspTestResults
            };
        }
        case actionTypes.FETCH_VSP_CHECKS: {
            return {
                ...state,
                vspChecks: action.vspChecks
            };
        }
        case actionTypes.UPDATE_DISPLAY_TEST_RESULT_DATA: {
            return {
                ...state,
                vspTestResults: null,
                testResultToDisplay: action.testResultToDisplay
            };
        }
        default:
            return state;
    }
};