From e01012c272dadd1d4cb7b5a4136282d29c79dd50 Mon Sep 17 00:00:00 2001 From: nvms Date: Thu, 20 Jun 2024 10:23:07 -0400 Subject: [PATCH 1/2] update label and test --- frontend/src/components/filter/__tests__/goalFilters.js | 3 ++- frontend/src/components/filter/goalFilters.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/filter/__tests__/goalFilters.js b/frontend/src/components/filter/__tests__/goalFilters.js index 17bd778001..564a8afe91 100644 --- a/frontend/src/components/filter/__tests__/goalFilters.js +++ b/frontend/src/components/filter/__tests__/goalFilters.js @@ -109,6 +109,7 @@ describe('goalFilters', () => { const grantFilter = grantNumberFilter([{ numberWithProgramTypes: 'number EHS', number: 'number', + status: 'Active', }]); const grantFilterWithNoPossibleGrantsYet = grantNumberFilter([]); @@ -139,7 +140,7 @@ describe('goalFilters', () => { const apply = jest.fn(); renderFilter(() => grantFilter.renderInput('1', 'test', [], apply)); const grantNumberInput = await screen.findByLabelText('Select grant numbers to filter by'); - await selectEvent.select(grantNumberInput, ['number EHS']); + await selectEvent.select(grantNumberInput, ['number EHS, Active']); expect(apply).toHaveBeenCalled(); }); }); diff --git a/frontend/src/components/filter/goalFilters.js b/frontend/src/components/filter/goalFilters.js index c56fec5df3..c70abb7177 100644 --- a/frontend/src/components/filter/goalFilters.js +++ b/frontend/src/components/filter/goalFilters.js @@ -149,7 +149,7 @@ export const grantNumberFilter = (possibleGrants) => ({ labelText="Select grant numbers to filter by" options={possibleGrants.map((g) => ({ value: g.number, - label: g.numberWithProgramTypes, + label: `${g.numberWithProgramTypes}, ${g.status}`, }))} selectedValues={query} mapByValue From 640e2e3ae8aa70eaee7dee91424ffe04d5a0c993 Mon Sep 17 00:00:00 2001 From: nvms Date: Thu, 20 Jun 2024 12:33:21 -0400 Subject: [PATCH 2/2] change ", " to " - " per design review --- frontend/src/components/filter/__tests__/goalFilters.js | 2 +- frontend/src/components/filter/goalFilters.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/filter/__tests__/goalFilters.js b/frontend/src/components/filter/__tests__/goalFilters.js index 564a8afe91..f95b17ebc9 100644 --- a/frontend/src/components/filter/__tests__/goalFilters.js +++ b/frontend/src/components/filter/__tests__/goalFilters.js @@ -140,7 +140,7 @@ describe('goalFilters', () => { const apply = jest.fn(); renderFilter(() => grantFilter.renderInput('1', 'test', [], apply)); const grantNumberInput = await screen.findByLabelText('Select grant numbers to filter by'); - await selectEvent.select(grantNumberInput, ['number EHS, Active']); + await selectEvent.select(grantNumberInput, ['number EHS - Active']); expect(apply).toHaveBeenCalled(); }); }); diff --git a/frontend/src/components/filter/goalFilters.js b/frontend/src/components/filter/goalFilters.js index c70abb7177..85ffd57a27 100644 --- a/frontend/src/components/filter/goalFilters.js +++ b/frontend/src/components/filter/goalFilters.js @@ -149,7 +149,7 @@ export const grantNumberFilter = (possibleGrants) => ({ labelText="Select grant numbers to filter by" options={possibleGrants.map((g) => ({ value: g.number, - label: `${g.numberWithProgramTypes}, ${g.status}`, + label: `${g.numberWithProgramTypes} - ${g.status}`, }))} selectedValues={query} mapByValue