From f0686811b80b354c47fdf6caca2e847f71050f4f Mon Sep 17 00:00:00 2001 From: Ricky Mettler Date: Tue, 30 Jan 2024 01:17:37 +0000 Subject: [PATCH] code cleanup --- .../DateAndLocationForm.jsx | 1 - .../DateAndLocation/DateAndLocation.test.jsx | 60 ++++--------------- 2 files changed, 12 insertions(+), 49 deletions(-) diff --git a/src/components/Customer/PPM/Booking/DateAndLocationForm/DateAndLocationForm.jsx b/src/components/Customer/PPM/Booking/DateAndLocationForm/DateAndLocationForm.jsx index c7f9bd64d4d..be2d4ac366a 100644 --- a/src/components/Customer/PPM/Booking/DateAndLocationForm/DateAndLocationForm.jsx +++ b/src/components/Customer/PPM/Booking/DateAndLocationForm/DateAndLocationForm.jsx @@ -14,7 +14,6 @@ import formStyles from 'styles/form.module.scss'; import { DutyLocationShape } from 'types'; import { MoveShape, ServiceMemberShape } from 'types/customerShapes'; import { ShipmentShape } from 'types/shipment'; -import { ZIP5_CODE_REGEX } from 'utils/validation'; import { searchTransportationOffices } from 'services/internalApi'; import SERVICE_MEMBER_AGENCIES from 'content/serviceMemberAgencies'; import { AddressFields } from 'components/form/AddressFields/AddressFields'; diff --git a/src/pages/MyMove/PPM/Booking/DateAndLocation/DateAndLocation.test.jsx b/src/pages/MyMove/PPM/Booking/DateAndLocation/DateAndLocation.test.jsx index b3866b8d246..b009986f9df 100644 --- a/src/pages/MyMove/PPM/Booking/DateAndLocation/DateAndLocation.test.jsx +++ b/src/pages/MyMove/PPM/Booking/DateAndLocation/DateAndLocation.test.jsx @@ -165,17 +165,11 @@ describe('DateAndLocation component', () => { renderDateAndLocation(); await act(async () => { - await userEvent.type( - document.querySelector('input[name="pickupAddress.address.postalCode"]'), - '10001', - ); + await userEvent.type(document.querySelector('input[name="pickupAddress.address.postalCode"]'), '10001'); }); await act(async () => { - await userEvent.type( - document.querySelector('input[name="destinationAddress.address.postalCode"]'), - '10002', - ); + await userEvent.type(document.querySelector('input[name="destinationAddress.address.postalCode"]'), '10002'); }); await userEvent.type(screen.getByLabelText('When do you plan to start moving your PPM?'), '04 Jul 2022'); @@ -214,17 +208,11 @@ describe('DateAndLocation component', () => { renderDateAndLocation(); await act(async () => { - await userEvent.type( - document.querySelector('input[name="pickupAddress.address.postalCode"]'), - '10001', - ); + await userEvent.type(document.querySelector('input[name="pickupAddress.address.postalCode"]'), '10001'); }); await act(async () => { - await userEvent.type( - document.querySelector('input[name="destinationAddress.address.postalCode"]'), - '10002', - ); + await userEvent.type(document.querySelector('input[name="destinationAddress.address.postalCode"]'), '10002'); }); await userEvent.type(screen.getByLabelText('When do you plan to start moving your PPM?'), '04 Jul 2022'); @@ -268,10 +256,7 @@ describe('DateAndLocation component', () => { }); await act(async () => { - await userEvent.type( - document.querySelector('input[name="pickupAddress.address.postalCode"]'), - '10001', - ); + await userEvent.type(document.querySelector('input[name="pickupAddress.address.postalCode"]'), '10001'); }); await act(async () => { @@ -282,10 +267,7 @@ describe('DateAndLocation component', () => { }); await act(async () => { - await userEvent.type( - document.querySelector('input[name="destinationAddress.address.postalCode"]'), - '10002', - ); + await userEvent.type(document.querySelector('input[name="destinationAddress.address.postalCode"]'), '10002'); }); await act(async () => { @@ -376,17 +358,11 @@ describe('DateAndLocation component', () => { // Fill in form await act(async () => { - await userEvent.type( - document.querySelector('input[name="pickupAddress.address.postalCode"]'), - '10001', - ); + await userEvent.type(document.querySelector('input[name="pickupAddress.address.postalCode"]'), '10001'); }); await act(async () => { - await userEvent.type( - document.querySelector('input[name="destinationAddress.address.postalCode"]'), - '10002', - ); + await userEvent.type(document.querySelector('input[name="destinationAddress.address.postalCode"]'), '10002'); }); await userEvent.type(screen.getByLabelText('When do you plan to start moving your PPM?'), '04 Jul 2022'); @@ -426,17 +402,11 @@ describe('DateAndLocation component', () => { // Fill in form await act(async () => { - await userEvent.type( - document.querySelector('input[name="pickupAddress.address.postalCode"]'), - '10001', - ); + await userEvent.type(document.querySelector('input[name="pickupAddress.address.postalCode"]'), '10001'); }); await act(async () => { - await userEvent.type( - document.querySelector('input[name="destinationAddress.address.postalCode"]'), - '10002', - ); + await userEvent.type(document.querySelector('input[name="destinationAddress.address.postalCode"]'), '10002'); }); await userEvent.type(screen.getByLabelText('When do you plan to start moving your PPM?'), '04 Jul 2022'); @@ -476,17 +446,11 @@ describe('DateAndLocation component', () => { // Fill in form await act(async () => { - await userEvent.type( - document.querySelector('input[name="pickupAddress.address.postalCode"]'), - '10001', - ); + await userEvent.type(document.querySelector('input[name="pickupAddress.address.postalCode"]'), '10001'); }); await act(async () => { - await userEvent.type( - document.querySelector('input[name="destinationAddress.address.postalCode"]'), - '10002', - ); + await userEvent.type(document.querySelector('input[name="destinationAddress.address.postalCode"]'), '10002'); }); await userEvent.type(screen.getByLabelText('When do you plan to start moving your PPM?'), '04 Jul 2022');