Skip to content

Commit

Permalink
scope down unnecessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fzhao99 committed Aug 31, 2023
1 parent 38d1af7 commit 1c584e9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { initialState, ManageFacilityState } from "./ManageFacility";
describe("Facility Information", () => {
const handleFacilityDelete = jest.fn();
const mockManageFacilityState: ManageFacilityState = {
orgId: "123",
facilityId: "123",
orgId: "456",
facility: {
city: "New York",
state: "NY",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ describe("FacilitySelectFilter", () => {
<FacilitySelectFilter
organizationOptions={orgOptions}
facilityOptions={facilityOptions}
manageFacilityState={manageFacilityState}
onClearFilter={handleClearFilter}
onSelectOrg={handleSelectOrg}
onSelectFacility={handleSelectFacility}
onSearch={handleSearch}
manageFacilityState={manageFacilityState}
loading={true}
orgRef={orgRef}
facilityRef={facilityRef}
Expand All @@ -82,9 +82,9 @@ describe("FacilitySelectFilter", () => {

it("calls handleClearFilter upon clicking clear filters button", async () => {
renderWithMocks(mockOrganizationOptions, mockFacilityOptions, {
orgId: "123",
facilityId: undefined,
facility: undefined,
orgId: "123",
});
const clearFiltersBtn = screen.getByRole("button", {
name: /clear facility selection filters/i,
Expand All @@ -105,9 +105,9 @@ describe("FacilitySelectFilter", () => {

it("calls event handlers when facility is selected", async () => {
renderWithMocks(mockOrganizationOptions, mockFacilityOptions, {
facilityId: "",
orgId: undefined,
facilityId: undefined,
facility: undefined,
orgId: "",
});

const [facilityDropdown] = getFacilityComboBoxElements();
Expand All @@ -117,9 +117,9 @@ describe("FacilitySelectFilter", () => {

it("calls event handlers when search button is clicked", async () => {
renderWithMocks(mockOrganizationOptions, mockFacilityOptions, {
orgId: undefined,
facilityId: "123",
facility: undefined,
orgId: undefined,
});

const searchBtn = screen.getByRole("button", {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useRef, useState } from "react";
import { useRef, useState } from "react";
import { ComboBoxRef } from "@trussworks/react-uswds";

import { Option } from "../../commonComponents/Dropdown";
Expand Down Expand Up @@ -169,7 +169,6 @@ const ManageFacility = () => {
* Delete facility
*/
const [deleteFacilityMutation] = useDeleteFacilityMutation();

function handleDeleteFacility() {
if (localState.facilityId) {
deleteFacilityMutation({
Expand Down

0 comments on commit 1c584e9

Please sign in to comment.