Skip to content
Snippets Groups Projects
Commit 4c7c898d authored by Bucknell, Mary S.'s avatar Bucknell, Mary S.
Browse files

Updated legend and its test for the new store state

parent e9c93d91
No related branches found
No related tags found
No related merge requests found
......@@ -192,7 +192,7 @@ const uniqueClassesSelector = memoize(tsKey => createSelector(
* Select attributes from the state useful for legend creation
*/
const legendDisplaySelector = createSelector(
(state) => state.showSeries,
(state) => state.timeseriesState.showSeries,
currentVariableTimeSeriesSelector('median'),
methodsSelector,
uniqueClassesSelector('current'),
......
......@@ -165,11 +165,13 @@ describe('Legend module', () => {
}
}
},
currentVariableID: '45807197',
showSeries: {
current: true,
compare: true,
median: true
timeseriesState: {
currentVariableID: '45807197',
showSeries: {
current: true,
compare: true,
median: true
}
}
};
......@@ -199,7 +201,10 @@ describe('Legend module', () => {
it('Should return markers for a different selected variable', () => {
const newData = {
...TEST_DATA,
currentVariableID: '45807202'
timeseriesState: {
...TEST_DATA.timeseriesState,
currentVariableID: '45807202'
}
};
const result = legendMarkerRowsSelector(newData);
......@@ -216,11 +221,14 @@ describe('Legend module', () => {
it('Should return markers only for time series shown', () => {
const newData = {
...TEST_DATA,
currentVariableID: '45807202',
showSeries: {
'current': true,
'compare': false,
'median': true
timeseriesState: {
...TEST_DATA.timeseriesState,
currentVariableID: '45807202',
showSeries: {
'current': true,
'compare': false,
'median': true
}
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment