• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

geosolutions-it / MapStore2 / 19710972030

26 Nov 2025 03:38PM UTC coverage: 76.665% (-0.3%) from 76.929%
19710972030

Pull #11119

github

web-flow
Fix maven publish (#11739)
Pull Request #11119: Layer Selection Plugin on ArcGIS, WFS & WMS layers

32272 of 50209 branches covered (64.28%)

3 of 3 new or added lines in 2 files covered. (100.0%)

3018 existing lines in 249 files now uncovered.

40157 of 52380 relevant lines covered (76.66%)

37.9 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

87.5
/web/client/reducers/thematic.js
1
/**
2
 * Copyright 2016, GeoSolutions Sas.
3
 * All rights reserved.
4
 *
5
 * This source code is licensed under the BSD-style license found in the
6
 * LICENSE file in the root directory of this source tree.
7
 */
8

9
import {
10
    LOAD_FIELDS,
11
    FIELDS_LOADED,
12
    FIELDS_ERROR,
13
    LOAD_CLASSIFICATION,
14
    CLASSIFICATION_LOADED,
15
    CLASSIFICATION_ERROR,
16
    CHANGE_CONFIGURATION,
17
    CHANGE_DIRTY,
18
    CHANGE_INPUT_VALIDITY
19
} from '../actions/thematic';
20

21
import { HIDE_SETTINGS } from '../actions/layers';
22

23
const initialState = {
1✔
24
    loadingFields: false,
25
    errorFields: null,
26
    loadingClassification: false,
27
    errorClassification: null,
28
    customClassification: false,
29
    dirty: false,
30
    adminCfg: {
31
        open: false,
32
        current: null,
33
        error: null
34
    },
35
    invalidInputs: {}
36
};
37

38
function thematic(state = initialState, action) {
×
39
    switch (action.type) {
12!
40
    case HIDE_SETTINGS:
UNCOV
41
        return Object.assign({}, initialState);
×
42
    case LOAD_FIELDS:
43
        return Object.assign({}, state, {
1✔
44
            fields: null,
45
            loadingFields: true,
46
            errorFields: null
47
        });
48
    case FIELDS_LOADED:
49
        return Object.assign({}, state, {
1✔
50
            fields: action.fields,
51
            loadingFields: false,
52
            errorFields: null
53
        });
54
    case FIELDS_ERROR:
55
        return Object.assign({}, state, {
1✔
56
            fields: null,
57
            loadingFields: false,
58
            errorFields: action.error
59
        });
60
    case LOAD_CLASSIFICATION:
61
        return Object.assign({}, state, {
1✔
62
            loadingClassification: true,
63
            errorClassification: null
64
        });
65
    case CLASSIFICATION_LOADED:
66
        return Object.assign({}, state, {
1✔
67
            classification: action.classification,
68
            loadingClassification: false,
69
            errorClassification: null,
70
            customClassification: false
71
        });
72
    case CLASSIFICATION_ERROR:
73
        return Object.assign({}, state, {
1✔
74
            classification: null,
75
            loadingClassification: false,
76
            errorClassification: action.error,
77
            customClassification: false
78
        });
79
    case CHANGE_CONFIGURATION:
80
        return Object.assign({}, state, {
2✔
81
            adminCfg: {
82
                open: action.editEnabled,
83
                current: action.current,
84
                error: action.error
85
            }
86
        });
87
    case CHANGE_DIRTY:
88
        return Object.assign({}, state, {
2✔
89
            dirty: action.dirty
90
        });
91
    case CHANGE_INPUT_VALIDITY:
92
        if (action.valid) {
2✔
93
            return Object.assign({}, state, {
1✔
94
                invalidInputs: Object.keys(state.invalidInputs).reduce((previous, current) => {
95
                    return current === action.input ? previous : [...previous, current];
1!
96
                }, {})
97
            });
98
        }
99
        return Object.assign({}, state, {
1✔
100
            invalidInputs: Object.assign({}, state.invalidInputs, {
101
                [action.input]: {
102
                    message: action.message,
103
                    params: action.params || {}
1!
104
                }
105
            })
106
        });
107
    default:
UNCOV
108
        return state;
×
109
    }
110
}
111

112
export default thematic;
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc