From ea4d8b7540853d6e2aa041bbf2865870d1b79b7b Mon Sep 17 00:00:00 2001 From: Matt Dragon Date: Wed, 18 Dec 2024 07:06:37 -0500 Subject: [PATCH] [Issue #3237] Remove bad Agencies from manual list (#3238) ## Summary Fixes #3237 ### Time to review: __2 mins__ ## Changes proposed Remove some Agencies that shouldn't appear in the Search UI anyway. --- api/openapi.generated.yml | 4 +- .../opportunities_v1/opportunity_routes.py | 2 +- .../opportunities_v1/opportunity_schemas.py | 2 +- api/tests/lib/seed_agencies.py | 5 -- api/tests/src/db/models/factories.py | 1 - .../SearchFilterOptions.ts | 62 ------------------- frontend/tests/e2e/search/search.spec.ts | 2 +- 7 files changed, 5 insertions(+), 73 deletions(-) diff --git a/api/openapi.generated.yml b/api/openapi.generated.yml index b4ede79e3..a3caaa040 100644 --- a/api/openapi.generated.yml +++ b/api/openapi.generated.yml @@ -261,7 +261,7 @@ paths: agency: one_of: - USAID - - ARPAH + - DOC applicant_type: one_of: - state_governments @@ -1659,7 +1659,7 @@ components: description: The counts of agency values in the full response example: USAID: 4 - ARPAH: 3 + DOC: 3 additionalProperties: type: integer OpportunitySearchResponseV1: diff --git a/api/src/api/opportunities_v1/opportunity_routes.py b/api/src/api/opportunities_v1/opportunity_routes.py index 678bf2a88..6500f2bdc 100644 --- a/api/src/api/opportunities_v1/opportunity_routes.py +++ b/api/src/api/opportunities_v1/opportunity_routes.py @@ -48,7 +48,7 @@ "value": { "query": "research", "filters": { - "agency": {"one_of": ["USAID", "ARPAH"]}, + "agency": {"one_of": ["USAID", "DOC"]}, "applicant_type": { "one_of": ["state_governments", "county_governments", "individuals"] }, diff --git a/api/src/api/opportunities_v1/opportunity_schemas.py b/api/src/api/opportunities_v1/opportunity_schemas.py index f4c6cbd44..f1cfac930 100644 --- a/api/src/api/opportunities_v1/opportunity_schemas.py +++ b/api/src/api/opportunities_v1/opportunity_schemas.py @@ -454,7 +454,7 @@ class OpportunityFacetV1Schema(Schema): values=fields.Integer(), metadata={ "description": "The counts of agency values in the full response", - "example": {"USAID": 4, "ARPAH": 3}, + "example": {"USAID": 4, "DOC": 3}, }, ) diff --git a/api/tests/lib/seed_agencies.py b/api/tests/lib/seed_agencies.py index 0dbce6bf8..ef7aabd07 100644 --- a/api/tests/lib/seed_agencies.py +++ b/api/tests/lib/seed_agencies.py @@ -11,11 +11,6 @@ # Agencies we want to create locally - note that these are a subset of popular # agencies from production AGENCIES_TO_CREATE = [ - { - "agency_id": 2, - "agency_code": "ARPAH", - "agency_name": "Advanced Research Projects Agency for Health", - }, {"agency_id": 3, "agency_code": "DOC", "agency_name": "Department of Commerce"}, {"agency_id": 53, "agency_code": "DOD", "agency_name": "Department of Defense"}, {"agency_id": 140, "agency_code": "DOE", "agency_name": "Department of Energy"}, diff --git a/api/tests/src/db/models/factories.py b/api/tests/src/db/models/factories.py index e29a491ed..3bcde080c 100644 --- a/api/tests/src/db/models/factories.py +++ b/api/tests/src/db/models/factories.py @@ -76,7 +76,6 @@ class CustomProvider(BaseProvider): "USAID", "USAID-SAF", "USAID-ETH", - "ARPAH", "DOC", "DOC-EDA", "DOC-NIST", diff --git a/frontend/src/components/search/SearchFilterAccordion/SearchFilterOptions.ts b/frontend/src/components/search/SearchFilterAccordion/SearchFilterOptions.ts index 27ab414bc..f25371829 100644 --- a/frontend/src/components/search/SearchFilterAccordion/SearchFilterOptions.ts +++ b/frontend/src/components/search/SearchFilterAccordion/SearchFilterOptions.ts @@ -211,11 +211,6 @@ export const categoryOptions: FilterOption[] = [ ]; export const agencyOptions: FilterOption[] = [ - { - id: "CNCS", - label: "Corporation for National and Community Service", - value: "CNCS", - }, { id: "DHS", label: "Department of Homeland Security", @@ -313,11 +308,6 @@ export const agencyOptions: FilterOption[] = [ label: "AmeriCorps", value: "AC", }, - { - id: "ARPAH", - label: "Advanced Research Projects Agency for Health", - value: "ARPAH", - }, { id: "DOC", label: "Department of Commerce", @@ -2177,48 +2167,16 @@ export const agencyOptions: FilterOption[] = [ label: "Department of Education", value: "ED", }, - { - id: "ECP", - label: "Energy Cluster Program", - value: "ECP", - }, { id: "EPA", label: "Environmental Protection Agency", value: "EPA", }, - { - id: "FMCS", - label: "Federal Mediation and Conciliation Service", - value: "FMCS", - }, { id: "FCC", label: "Federal Communications Commission", value: "FCC", }, - { - id: "GDIT", - label: "General Dynamics Information Technology", - value: "GDIT", - children: [ - { - id: "GDIT-02072010", - label: "KVkv", - value: "GDIT-02072010", - }, - { - id: "GDIT-08", - label: "08092011-kj-test", - value: "GDIT-08", - }, - { - id: "GDIT-KV03262009", - label: "03162009-KV", - value: "GDIT-KV03262009", - }, - ], - }, { id: "GSA", label: "General Services Administration", @@ -2526,21 +2484,11 @@ export const agencyOptions: FilterOption[] = [ label: "Institute of Museum and Library Services", value: "IMLS", }, - { - id: "IVV", - label: "IV&V Test Agency", - value: "IVV", - }, { id: "IAF", label: "Inter-American Foundation", value: "IAF", }, - { - id: "MCC", - label: "Millennium Challenge Corporation", - value: "MCC", - }, { id: "LOC", label: "Library of Congress", @@ -3714,14 +3662,4 @@ export const agencyOptions: FilterOption[] = [ }, ], }, - { - id: "USEAC", - label: "Election Assistance Commission", - value: "USEAC", - }, - { - id: "WWC", - label: "Woodrow Wilson Center", - value: "WWC", - }, ]; diff --git a/frontend/tests/e2e/search/search.spec.ts b/frontend/tests/e2e/search/search.spec.ts index d93b1a0a4..147c514a6 100644 --- a/frontend/tests/e2e/search/search.spec.ts +++ b/frontend/tests/e2e/search/search.spec.ts @@ -41,7 +41,7 @@ test.describe("Search page tests", () => { "eligibility-county_governments": "county_governments", }; const agencyCheckboxes = { - ARPAH: "ARPAH", + EPA: "EPA", AC: "AC", }; const categoryCheckboxes = {