Skip to content

Commit

Permalink
chore: ui sentence case update (#888)
Browse files Browse the repository at this point in the history
Co-authored-by: afwilcox <[email protected]>
  • Loading branch information
jon-funk and afwilcox authored Jan 21, 2025
1 parent 2887d2b commit 370c724
Show file tree
Hide file tree
Showing 44 changed files with 170 additions and 166 deletions.
26 changes: 13 additions & 13 deletions frontend/cypress/e2e/allegation-details-edit.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,46 +354,46 @@ describe("Complaint Edit Page spec - Edit Allegation View", () => {
// Species - not on ERS tab
cy.get("#species-pair-id").should("not.exist");

// Violation Type
// Violation type
cy.get("#violation-type-pair-id label").should(($label) => {
expect($label).to.contain.text("Violation Type");
expect($label).to.contain.text("Violation type");
});
cy.get("#violation-type-pair-id .comp-details-input").should("exist");

// Officer Assigned
// Officer assigned
cy.get("#officer-assigned-pair-id label").should(($label) => {
expect($label).to.contain.text("Officer Assigned");
expect($label).to.contain.text("Officer assigned");
});
cy.get("#officer-assigned-pair-id .comp-details-input").contains("None");

// Check the Call Details inputs
// Complaint Location
cy.get("#complaint-location-pair-id label").should(($label) => {
expect($label).to.contain.text("Complaint Location");
expect($label).to.contain.text("Complaint location");
});
cy.get("#complaint-location-pair-id input").should("exist");

// Incident Time
cy.get("#incident-time-pair-id label").should(($label) => {
expect($label).to.contain.text("Incident Date/Time");
expect($label).to.contain.text("Incident date/time");
});
cy.get("#incident-time-pair-id input").should("exist");

// Location Description
cy.get("#location-description-pair-id label").should(($label) => {
expect($label).to.contain.text("Location Description");
expect($label).to.contain.text("Location description");
});
cy.get("#location-description-pair-id textarea").should("exist");

// Violation In Progress
cy.get("#violation-in-progress-pair-id label").should(($label) => {
expect($label).to.contain.text("Violation in Progress");
expect($label).to.contain.text("Violation in progress");
});
cy.get("#violation-in-progress-pair-id div").should("exist");

// Violation observed
cy.get("#violation-observed-pair-id label").should(($label) => {
expect($label).to.contain.text("Violation Observed");
expect($label).to.contain.text("Violation observed");
});
cy.get("#violation-observed-pair-id div").should("exist");

Expand Down Expand Up @@ -457,19 +457,19 @@ describe("Complaint Edit Page spec - Edit Allegation View", () => {

// Primary Phone
cy.get("#primary-phone-pair-id label").should(($label) => {
expect($label).to.contain.text("Primary Phone");
expect($label).to.contain.text("Primary phone");
});
cy.get("#primary-phone-pair-id input").should("exist");

// Alternative 1 Phone
cy.get("#secondary-phone-pair-id label").should(($label) => {
expect($label).to.contain.text("Alternate Phone 1");
expect($label).to.contain.text("Alternate phone 1");
});
cy.get("#secondary-phone-pair-id input").should("exist");

// Alternative 2 Phone
cy.get("#alternate-phone-pair-id label").should(($label) => {
expect($label).to.contain.text("Alternate Phone 2");
expect($label).to.contain.text("Alternate phone 2");
});
cy.get("#alternate-phone-pair-id input").should("exist");

Expand All @@ -487,7 +487,7 @@ describe("Complaint Edit Page spec - Edit Allegation View", () => {

// Reffered by / Complaint Agency
cy.get("#reported-pair-id label").should(($label) => {
expect($label).to.contain.text("Organization Reporting the Complaint");
expect($label).to.contain.text("Organization reporting the complaint");
});
cy.get("#reported-pair-id input").should("exist");

Expand Down
26 changes: 13 additions & 13 deletions frontend/cypress/e2e/hwcr-details-edit.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,9 @@ describe("Complaint Edit Page spec - Edit View", () => {

// Note: if the layout of this page changes, these selectors that use classes may break
// Check the First Section inputs
// Nature of Complaint
// Nature of complaint
cy.get("#nature-of-complaint-pair-id label").should(($label) => {
expect($label).to.contain.text("Nature of Complaint");
expect($label).to.contain.text("Nature of complaint");
});
cy.get("#nature-of-complaint-pair-id .comp-details-input").should("exist");

Expand All @@ -321,28 +321,28 @@ describe("Complaint Edit Page spec - Edit View", () => {
});
cy.get("#species-pair-id .comp-details-input").should("exist");

// Officer Assigned
// Officer assigned
cy.get("#officer-assigned-pair-id label").should(($label) => {
expect($label).to.contain.text("Officer Assigned");
expect($label).to.contain.text("Officer assigned");
});
cy.get("#officer-assigned-pair-id .comp-details-input").contains("None");

// Check the Call Details inputs
// Complaint Location
// Complaint location
cy.get("#complaint-location-pair-id label").should(($label) => {
expect($label).to.contain.text("Complaint Location");
expect($label).to.contain.text("Complaint location");
});
cy.get("#complaint-location-pair-id input").should("exist");

// Incident Time
cy.get("#incident-time-pair-id label").should(($label) => {
expect($label).to.contain.text("Incident Date/Time");
expect($label).to.contain.text("Incident date/time");
});
cy.get("#incident-time-pair-id input").should("exist");

// Location Description
// Location description
cy.get("#location-description-pair-id label").should(($label) => {
expect($label).to.contain.text("Location Description");
expect($label).to.contain.text("Location description");
});
cy.get("#location-description-pair-id textarea").should("exist");

Expand Down Expand Up @@ -409,19 +409,19 @@ describe("Complaint Edit Page spec - Edit View", () => {

// Primary Phone
cy.get("#primary-phone-pair-id label").should(($label) => {
expect($label).to.contain.text("Primary Phone");
expect($label).to.contain.text("Primary phone");
});
cy.get("#primary-phone-pair-id input").should("exist");

// Alternative 1 Phone
cy.get("#secondary-phone-pair-id label").should(($label) => {
expect($label).to.contain.text("Alternate Phone 1");
expect($label).to.contain.text("Alternate phone 1");
});
cy.get("#secondary-phone-pair-id input").should("exist");

// Alternative 2 Phone
cy.get("#alternate-phone-pair-id label").should(($label) => {
expect($label).to.contain.text("Alternate Phone 2");
expect($label).to.contain.text("Alternate phone 2");
});
cy.get("#alternate-phone-pair-id input").should("exist");

Expand All @@ -439,7 +439,7 @@ describe("Complaint Edit Page spec - Edit View", () => {

// Reffered by / Complaint Agency
cy.get("#reported-pair-id label").should(($label) => {
expect($label).to.contain.text("Organization Reporting the Complaint");
expect($label).to.contain.text("Organization reporting the complaint");
});
cy.get("#reported-pair-id input").should("exist");
});
Expand Down
2 changes: 1 addition & 1 deletion frontend/cypress/e2e/zone-at-a-glance-header.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe("COMPENF-259 Zone at a Glance - View Complaint Stats", () => {
cy.get(".comp-loader-overlay", { timeout: 30000 }).should("not.exist");

//-- make sure we're on the zone at a glance page
cy.get(".comp-main-content").contains("Zone At a Glance");
cy.get(".comp-main-content").contains("Zone at a glance");

//-- navigate back to complaints
cy.get("#complaints-link").click({ force: true });
Expand Down
2 changes: 1 addition & 1 deletion frontend/cypress/e2e/zone-at-a-glance-setup.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe("COMPENF-137 Zone at a Glance - Page Set Up", () => {
cy.waitForSpinner();

//-- make sure we're on the zone at a glance page
cy.get(".comp-main-content").contains("Zone At a Glance");
cy.get(".comp-main-content").contains("Zone at a glance");

//-- navigate back to complaints
cy.get("#complaints-link").click();
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/app/components/common/map-list-toggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const MapListToggle: React.FC<Props> = ({ activeView, onToggle, className }) =>
onChange={(view) => onToggle(view as "list" | "map")}
>
<ToggleButton
title="Complaint List View"
title="Complaint list view"
value="list"
id="list_toggle_id"
className={setElementActive("toggle-button", "list")}
Expand All @@ -38,7 +38,7 @@ const MapListToggle: React.FC<Props> = ({ activeView, onToggle, className }) =>
<span className={setElementActive("toggle-button-text", "list")}>List</span>
</ToggleButton>
<ToggleButton
title="Complaint Map View"
title="Complaint map view"
value="map"
id="map_toggle_id"
className={setElementActive("toggle-button", "map")}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const SelectUser: FC<SelectUserProps> = ({
<div className="comp-page-container user-management-container">
<div className="comp-page-header">
<div className="comp-page-title-container">
<h3>User Administration</h3>
<h3>User administration</h3>
<Button
variant="primary"
onClick={handleAddNewUser}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const ComplaintEllipsisPopover: FC<Props> = ({
className="popover-text"
onClick={openStatusChangeModal}
>
Update Status
Update status
</div>
</Popover.Body>
</Popover>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export const ComplaintFilter: FC<Props> = ({ type }) => {
activeFilters.showSpeciesFilter && ( // wildlife only filter
<>
<div id="comp-filter-nature-of-complaint-id">
<label htmlFor="nature-of-complaint-select-id">Nature of Complaint</label>
<label htmlFor="nature-of-complaint-select-id">Nature of complaint</label>
<div className="filter-select-padding">
<CompSelect
id="nature-of-complaint-select-id"
Expand Down Expand Up @@ -174,7 +174,7 @@ export const ComplaintFilter: FC<Props> = ({ type }) => {
activeFilters.showViolationFilter && ( // wildlife only filter
<div id="comp-filter-violation-id">
{/* <!-- violation types --> */}
<label htmlFor="violation-type-select-id">Violation Type</label>
<label htmlFor="violation-type-select-id">Violation type</label>
<div className="filter-select-padding">
<CompSelect
id="violation-type-select-id"
Expand All @@ -198,7 +198,7 @@ export const ComplaintFilter: FC<Props> = ({ type }) => {
{COMPLAINT_TYPES.GIR === type &&
activeFilters.showGirTypeFilter && ( // GIR only filter
<div id="comp-filter-gir-id">
<label htmlFor="gir-type-select-id">Gir Type</label>
<label htmlFor="gir-type-select-id">Gir type</label>
<div className="filter-select-padding">
<CompSelect
id="gir-type-select-id"
Expand All @@ -222,7 +222,7 @@ export const ComplaintFilter: FC<Props> = ({ type }) => {
{activeFilters.showDateFilter && (
<FilterDate
id="comp-filter-date-id"
label="Date Logged"
label="Date logged"
startDate={startDate}
endDate={endDate}
handleDateChange={handleDateRangeChange}
Expand Down Expand Up @@ -254,7 +254,7 @@ export const ComplaintFilter: FC<Props> = ({ type }) => {

{COMPLAINT_TYPES.ERS === type && activeFilters.showMethodFilter && (
<div id="comp-filter-complaint-method-id">
<label htmlFor="complaint-method-select-id">Complaint Method</label>
<label htmlFor="complaint-method-select-id">Complaint method</label>
<div className="filter-select-padding">
<CompSelect
id="complaint-method-select-id"
Expand All @@ -277,7 +277,7 @@ export const ComplaintFilter: FC<Props> = ({ type }) => {

{UserService.hasRole(Roles.CEEB) && (
<div id="comp-filter-action-taken-id">
<label htmlFor="action-taken-select-id">Action Taken</label>
<label htmlFor="action-taken-select-id">Action taken</label>
<div className="filter-select-padding">
<CompSelect
id="action-taken-select-id"
Expand All @@ -300,7 +300,7 @@ export const ComplaintFilter: FC<Props> = ({ type }) => {

{COMPLAINT_TYPES.HWCR === type && activeFilters.showOutcomeAnimalFilter && (
<div id="comp-filter-status-id">
<label htmlFor="status-select-id">Outcome by Animal</label>
<label htmlFor="status-select-id">Outcome by animal</label>
<div className="filter-select-padding">
<CompSelect
id="status-select-id"
Expand All @@ -324,7 +324,7 @@ export const ComplaintFilter: FC<Props> = ({ type }) => {
{COMPLAINT_TYPES.HWCR === type && activeFilters.showOutcomeAnimalDateFilter && (
<FilterDate
id="comp-filter-outcome-date-id"
label="Outcome Date"
label="Outcome date"
startDate={outcomeAnimalStartDate}
endDate={outcomeAnimalEndDate}
handleDateChange={handleOutcomeDateRangeChange}
Expand Down Expand Up @@ -410,7 +410,7 @@ export const ComplaintFilter: FC<Props> = ({ type }) => {
)}
{activeFilters.showOfficerFilter && (
<div id="comp-filter-officer-id">
<label htmlFor="officer-select-id">Officer Assigned</label>
<label htmlFor="officer-select-id">Officer assigned</label>
<div className="filter-select-padding">
<CompSelect
id="officer-select-id"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export const Complaints: FC<Props> = ({ defaultComplaintType }) => {
<div className="comp-page-header">
<div className="comp-page-title-container">
<h1>Complaints</h1>
<Button onClick={() => handleCreateClick()}>Create Complaint</Button>
<Button onClick={() => handleCreateClick()}>Create complaint</Button>
</div>
{/* <!-- create list of complaint types --> */}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@ export const CallDetails: FC<ComplaintHeaderProps> = ({ complaintType }) => {

return (
<section className="comp-details-section">
<h3>Call Details</h3>
<h3>Call details</h3>

<Card>
<Card.Body>
{/* General Call Information */}
<dl className="comp-call-details-group">
<div>
<dt>Complaint Description</dt>
<dt>Complaint description</dt>
<dd>
<pre id="comp-details-description">{details}</pre>
</dd>
</div>
<div>
<dt>Incident Date/Time</dt>
<dt>Incident date/time</dt>
<dd
className="comp-date-time-value"
id="complaint-incident-date-time"
Expand Down Expand Up @@ -87,11 +87,11 @@ export const CallDetails: FC<ComplaintHeaderProps> = ({ complaintType }) => {
{complaintType === COMPLAINT_TYPES.ERS && (
<>
<div>
<dt>Violation In Progress</dt>
<dt>Violation in progress</dt>
<dd id="comp-details-violation-in-progress">{violationInProgress ? "Yes" : "No"}</dd>
</div>
<div>
<dt>Violation Observed</dt>
<dt>Violation observed</dt>
<dd
id="comp-details-violation-observed"
className="comp-details-content"
Expand All @@ -106,11 +106,11 @@ export const CallDetails: FC<ComplaintHeaderProps> = ({ complaintType }) => {
{/* Location Information */}
<dl className="comp-call-details-group">
<div>
<dt>Complaint Location</dt>
<dt>Complaint location</dt>
<dd id="comp-details-location">{location}</dd>
</div>
<div>
<dt>Location Description</dt>
<dt>Location description</dt>
<dd id="comp-details-location-description">{locationDescription}</dd>
</div>
<CompLocationInfo
Expand Down
Loading

0 comments on commit 370c724

Please sign in to comment.