diff --git a/api/src/services/listing-csv-export.service.ts b/api/src/services/listing-csv-export.service.ts index 31f178eb94e..43d131f80c2 100644 --- a/api/src/services/listing-csv-export.service.ts +++ b/api/src/services/listing-csv-export.service.ts @@ -1762,7 +1762,7 @@ export class ListingCsvExporterService implements CsvExporterServiceInterface { }, { path: 'unit.accessibilityPriorityType', - label: 'Accessibility Priority Type', + label: 'Accessibility Unit Type', }, ]; } diff --git a/sites/partners/__tests__/components/listings/PaperListingForm/UnitForm.test.tsx b/sites/partners/__tests__/components/listings/PaperListingForm/UnitForm.test.tsx index 8a1f0f1b2fd..f98e3e60a8c 100644 --- a/sites/partners/__tests__/components/listings/PaperListingForm/UnitForm.test.tsx +++ b/sites/partners/__tests__/components/listings/PaperListingForm/UnitForm.test.tsx @@ -78,10 +78,12 @@ describe("UnitForm", () => { expect(screen.getByRole("textbox", { name: "Unit number" })).toBeInTheDocument() // Unit type dropdown selector - const unitTypeSelector = screen.getByRole("combobox", { name: /unit type/i }) + const unitTypeSelector = screen.getByRole("combobox", { name: /^unit type/i }) expect(unitTypeSelector).toBeInTheDocument() expect(within(unitTypeSelector).getAllByRole("option")).toHaveLength(8) - expect(within(unitTypeSelector).getByRole("option", { name: /unit type/i })).toBeInTheDocument() + expect( + within(unitTypeSelector).getByRole("option", { name: /^unit type/i }) + ).toBeInTheDocument() expect(within(unitTypeSelector).getByRole("option", { name: "Studio" })).toBeInTheDocument() expect(within(unitTypeSelector).getByRole("option", { name: "SRO" })).toBeInTheDocument() expect( @@ -197,9 +199,9 @@ describe("UnitForm", () => { expect(screen.getByRole("heading", { name: "Accessibility", level: 2 })).toBeInTheDocument() - // Accessibility priority type selector + // Accessibility unit type selector const priorityTypeSelector = screen.getByRole("combobox", { - name: "Accessibility priority type", + name: "Accessibility unit type", }) expect(priorityTypeSelector).toBeInTheDocument() expect(within(priorityTypeSelector).getAllByRole("option")).toHaveLength(4) @@ -398,7 +400,7 @@ describe("UnitForm", () => { await waitFor(() => { expect(screen.getByRole("textbox", { name: "Unit number" })).toHaveValue("A-101") - expect(screen.getByRole("combobox", { name: /unit type/i })).toHaveValue(unitTypes[0].id) + expect(screen.getByRole("combobox", { name: /^unit type/i })).toHaveValue(unitTypes[0].id) expect(screen.getByLabelText(/square footage/i)).toHaveValue(321) expect(screen.getByLabelText(/minimum monthly income|monthly minimum income/i)).toHaveValue( 2208 @@ -454,7 +456,7 @@ describe("UnitForm", () => { await waitFor(() => { expect(screen.getByRole("textbox", { name: "Unit number" })).toHaveValue("B-202") - expect(screen.getByRole("combobox", { name: /unit type/i })).toHaveValue(unitTypes[1].id) + expect(screen.getByRole("combobox", { name: /^unit type/i })).toHaveValue(unitTypes[1].id) expect(screen.getByLabelText(/square footage/i)).toHaveValue(456) expect(screen.getByLabelText(/minimum monthly income|monthly minimum income/i)).toHaveValue( 3200 diff --git a/sites/partners/__tests__/components/listings/PaperListingForm/UnitGroupForm.test.tsx b/sites/partners/__tests__/components/listings/PaperListingForm/UnitGroupForm.test.tsx index 36df9c288a1..e5b9d170d81 100644 --- a/sites/partners/__tests__/components/listings/PaperListingForm/UnitGroupForm.test.tsx +++ b/sites/partners/__tests__/components/listings/PaperListingForm/UnitGroupForm.test.tsx @@ -87,7 +87,7 @@ describe("", () => { expect(screen.getAllByRole("heading", { level: 2, name: /details/i })).toHaveLength(2) // Unit Types Section - expect(screen.getByText(/unit type/i)).toBeInTheDocument() + expect(screen.getByText(/^unit type/i)).toBeInTheDocument() expect(await screen.findByLabelText(/studio/i)).toBeInTheDocument() expect(screen.getByLabelText(/1 bedroom/i)).toBeInTheDocument() expect(screen.getByLabelText(/2 bedroom/i)).toBeInTheDocument() @@ -319,7 +319,7 @@ describe("", () => { expect(screen.getAllByRole("heading", { level: 2, name: /details/i })).toHaveLength(2) // Unit Types Section - expect(screen.getByText(/unit type/i)).toBeInTheDocument() + expect(screen.getByText(/^unit type/i)).toBeInTheDocument() expect(await screen.findByRole("checkbox", { name: /studio/i })).toBeInTheDocument() expect(screen.getByRole("checkbox", { name: /1 bedroom/i })).toBeInTheDocument() expect(screen.getByRole("checkbox", { name: /2 bedroom/i })).toBeInTheDocument() diff --git a/sites/partners/__tests__/components/listings/PaperListingForm/index.test.tsx b/sites/partners/__tests__/components/listings/PaperListingForm/index.test.tsx index 1b553eec8b2..93380429da2 100644 --- a/sites/partners/__tests__/components/listings/PaperListingForm/index.test.tsx +++ b/sites/partners/__tests__/components/listings/PaperListingForm/index.test.tsx @@ -246,7 +246,7 @@ describe("PaperListingForm", () => { // units expect( screen.getByRole("row", { - name: "Unit # Unit type AMI Rent SQ FT Accessibility priority type Actions", + name: "Unit # Unit type AMI Rent SQ FT Accessibility unit type Actions", }) ).toBeInTheDocument() expect( diff --git a/sites/partners/__tests__/pages/listings/[id]/index.test.tsx b/sites/partners/__tests__/pages/listings/[id]/index.test.tsx index 5a9c4fe4c77..4f56a61adfd 100644 --- a/sites/partners/__tests__/pages/listings/[id]/index.test.tsx +++ b/sites/partners/__tests__/pages/listings/[id]/index.test.tsx @@ -571,7 +571,7 @@ describe("listing data", () => { expect(screen.getByText("AMI")).toBeInTheDocument() expect(screen.getByText("Rent")).toBeInTheDocument() expect(screen.getByText("SQ FT")).toBeInTheDocument() - expect(screen.getByText("Accessibility priority type")).toBeInTheDocument() + expect(screen.getByText("Accessibility unit type")).toBeInTheDocument() expect(screen.getAllByText(/#[1-9]/i)).toHaveLength(6) expect(screen.getAllByText("Studio")).toHaveLength(6) @@ -2089,9 +2089,7 @@ describe("listing data", () => { }) expect(accessibilitySectionHeader).toBeInTheDocument() const accessibilitySection = accessibilitySectionHeader.parentElement - expect( - within(accessibilitySection).getByText("Accessibility priority type") - ).toBeInTheDocument() + expect(within(accessibilitySection).getByText("Accessibility unit type")).toBeInTheDocument() expect(within(accessibilitySection).getByText("Mobility")).toBeInTheDocument() // Should close on done diff --git a/sites/partners/page_content/locales/general.json b/sites/partners/page_content/locales/general.json index 67e0e841015..c3c98b1ecf6 100644 --- a/sites/partners/page_content/locales/general.json +++ b/sites/partners/page_content/locales/general.json @@ -543,7 +543,7 @@ "listings.streetAddressOrPOBox": "Street address or PO box", "listings.totalListings": "Total listings", "listings.unit.%incomeRent": "Percentage of income rent", - "listings.unit.accessibilityPriorityType": "Accessibility priority type", + "listings.unit.accessibilityUnitType": "Accessibility unit type", "listings.unit.add": "Add unit", "listings.unit.affordableGroupQuantity": "Unit Group Quantity", "listings.unit.ami": "AMI", diff --git a/sites/partners/src/components/listings/PaperListingDetails/DetailsUnitDrawer.tsx b/sites/partners/src/components/listings/PaperListingDetails/DetailsUnitDrawer.tsx index 374ceb4220b..ce75fff3f20 100644 --- a/sites/partners/src/components/listings/PaperListingDetails/DetailsUnitDrawer.tsx +++ b/sites/partners/src/components/listings/PaperListingDetails/DetailsUnitDrawer.tsx @@ -158,7 +158,7 @@ const DetailUnitDrawer = ({ unit, setUnitDrawer }: UnitDrawerProps) => { { amiPercentage: "t.ami", monthlyRent: "listings.unit.rent", sqFeet: "listings.unit.sqft", - accessibilityPriorityType: "listings.unit.accessibilityPriorityType", + accessibilityPriorityType: "listings.unit.accessibilityUnitType", action: "", } diff --git a/sites/partners/src/components/listings/PaperListingForm/UnitForm.tsx b/sites/partners/src/components/listings/PaperListingForm/UnitForm.tsx index 0fd5eafddd7..32a1166442a 100644 --- a/sites/partners/src/components/listings/PaperListingForm/UnitForm.tsx +++ b/sites/partners/src/components/listings/PaperListingForm/UnitForm.tsx @@ -666,7 +666,7 @@ const UnitForm = ({