From 635ae94bda443e594e06f4275cefa405ec728b33 Mon Sep 17 00:00:00 2001 From: prakashdurlabhji Date: Fri, 19 Jul 2019 17:25:27 +0530 Subject: [PATCH 1/2] issue 2786 fix --- .../Filters/__snapshots__/FiltersPanel.jsx.snap | 14 ++++++++------ .../Filters/FiltersPanel/index.jsx | 3 ++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/__tests__/shared/components/challenge-listing/Filters/__snapshots__/FiltersPanel.jsx.snap b/__tests__/shared/components/challenge-listing/Filters/__snapshots__/FiltersPanel.jsx.snap index a8b558a6b0..0f23ff7eb3 100644 --- a/__tests__/shared/components/challenge-listing/Filters/__snapshots__/FiltersPanel.jsx.snap +++ b/__tests__/shared/components/challenge-listing/Filters/__snapshots__/FiltersPanel.jsx.snap @@ -84,11 +84,12 @@ exports[`Matches shallow shapshot 1`] = ` options={ Array [ Object { - "label":
- Sample community -
, + "label": "Sample community", "name": "Sample community", "value": "123", + "data":
+ Sample community +
}, ] } @@ -299,11 +300,12 @@ exports[`Matches shallow shapshot 2`] = ` options={ Array [ Object { - "label":
- Sample community -
, + "label": "Sample community", "name": "Sample community", "value": "123", + "data":
+ Sample community +
}, ] } diff --git a/src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx b/src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx index e8e6614abd..c4f6f07fea 100644 --- a/src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx +++ b/src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx @@ -180,9 +180,10 @@ challenges in this sub community const communityOps = communityFilters.filter(community => !community.hidden) .map(community => ({ - label: getLabel(community), + label: community.communityName, value: community.communityId, name: community.communityName, + data: getLabel(community), })); const disableClearSaveFilterButtons = isSavingFilter || ( From 37a53cae2e040e40bc250e05a63d6def026aaf7d Mon Sep 17 00:00:00 2001 From: prakashdurlabhji Date: Fri, 19 Jul 2019 17:43:45 +0530 Subject: [PATCH 2/2] test fix --- .../Filters/__snapshots__/FiltersPanel.jsx.snap | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/__tests__/shared/components/challenge-listing/Filters/__snapshots__/FiltersPanel.jsx.snap b/__tests__/shared/components/challenge-listing/Filters/__snapshots__/FiltersPanel.jsx.snap index 0f23ff7eb3..56f3b49c24 100644 --- a/__tests__/shared/components/challenge-listing/Filters/__snapshots__/FiltersPanel.jsx.snap +++ b/__tests__/shared/components/challenge-listing/Filters/__snapshots__/FiltersPanel.jsx.snap @@ -84,12 +84,12 @@ exports[`Matches shallow shapshot 1`] = ` options={ Array [ Object { + "data":
+ Sample community +
, "label": "Sample community", "name": "Sample community", "value": "123", - "data":
- Sample community -
}, ] } @@ -300,12 +300,12 @@ exports[`Matches shallow shapshot 2`] = ` options={ Array [ Object { + "data":
+ Sample community +
, "label": "Sample community", "name": "Sample community", "value": "123", - "data":
- Sample community -
}, ] }