Skip to content

Commit

Permalink
fixup! Persist selected filters in checks results inside Redux
Browse files Browse the repository at this point in the history
  • Loading branch information
dottorblaster committed May 24, 2023
1 parent df042df commit fe9e421
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions assets/js/state/selectors/clusterChecksResultsFilters.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { getSelectedFilters } from './clusterChecksResultsFilters';
describe('getSelectedFilters', () => {
it('should return an empty array if the cluster ID is not found', () => {
const clusterID = faker.datatype.uuid();

expect(
getSelectedFilters(clusterID)({ clusterChecksResultsFilters: {} })
).toEqual([]);
Expand All @@ -15,6 +16,7 @@ describe('getSelectedFilters', () => {
const state = {
clusterChecksResultsFilters: { [clusterID]: ['passing', 'critical'] },
};

expect(getSelectedFilters(clusterID)(state)).toEqual([
'passing',
'critical',
Expand Down

0 comments on commit fe9e421

Please sign in to comment.