From bb5d2cdbcf8f07cbf16d35c74b5561eb98df4027 Mon Sep 17 00:00:00 2001 From: KonstanceH Date: Fri, 30 Aug 2024 21:18:11 +0000 Subject: [PATCH 1/9] got rid of please. match ac on descript, added submitted to db --- pkg/services/move/move_router.go | 6 ++++-- .../MobileHomeShipmentForm/MobileHomeShipmentForm.jsx | 2 +- .../MobileHomeShipmentCreate/MobileHomeShipmentCreate.jsx | 1 - src/pages/MyMove/SelectShipmentType.jsx | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/services/move/move_router.go b/pkg/services/move/move_router.go index 771ed557fa1..22fa92bd99a 100644 --- a/pkg/services/move/move_router.go +++ b/pkg/services/move/move_router.go @@ -207,8 +207,10 @@ func (router moveRouter) sendToServiceCounselor(appCtx appcontext.AppContext, mo return apperror.NewInvalidInputError(move.MTOShipments[i].PPMShipment.ID, err, verrs, msg) } } - // update status for boat shipment - if move.MTOShipments[i].ShipmentType == models.MTOShipmentTypeBoatHaulAway || move.MTOShipments[i].ShipmentType == models.MTOShipmentTypeBoatTowAway { + // update status for boat or mobile home shipment + if move.MTOShipments[i].ShipmentType == models.MTOShipmentTypeBoatHaulAway || + move.MTOShipments[i].ShipmentType == models.MTOShipmentTypeBoatTowAway || + move.MTOShipments[i].ShipmentType == models.MTOShipmentTypeMobileHome { move.MTOShipments[i].Status = models.MTOShipmentStatusSubmitted if verrs, err := appCtx.DB().ValidateAndUpdate(&move.MTOShipments[i]); verrs.HasAny() || err != nil { diff --git a/src/components/Customer/MobileHomeShipment/MobileHomeShipmentForm/MobileHomeShipmentForm.jsx b/src/components/Customer/MobileHomeShipment/MobileHomeShipmentForm/MobileHomeShipmentForm.jsx index f370ef0585a..0ae7fcdd1f8 100644 --- a/src/components/Customer/MobileHomeShipment/MobileHomeShipmentForm/MobileHomeShipmentForm.jsx +++ b/src/components/Customer/MobileHomeShipment/MobileHomeShipmentForm/MobileHomeShipmentForm.jsx @@ -142,7 +142,7 @@ const MobileHomeShipmentForm = ({ mtoShipment, onBack, onSubmit }) => {

Mobile Home Dimensions

-

Enter all of the dimensions of the mobile home.

+

Enter the total outside dimensions (in Feet and Inches) of the Mobile Home.

diff --git a/src/pages/MyMove/MobileHome/MobileHomeShipmentCreate/MobileHomeShipmentCreate.jsx b/src/pages/MyMove/MobileHome/MobileHomeShipmentCreate/MobileHomeShipmentCreate.jsx index 9b63f9cd828..a4d4da8992b 100644 --- a/src/pages/MyMove/MobileHome/MobileHomeShipmentCreate/MobileHomeShipmentCreate.jsx +++ b/src/pages/MyMove/MobileHome/MobileHomeShipmentCreate/MobileHomeShipmentCreate.jsx @@ -165,7 +165,6 @@ const MobileHomeShipmentCreate = ({ onSubmit={handleSubmit} onBack={handleBack} postalCodeValidator={validatePostalCode} - isSubmitting={false} isEditPage={isEditPage} /> diff --git a/src/pages/MyMove/SelectShipmentType.jsx b/src/pages/MyMove/SelectShipmentType.jsx index 5310c8ca7af..ef636a5be16 100644 --- a/src/pages/MyMove/SelectShipmentType.jsx +++ b/src/pages/MyMove/SelectShipmentType.jsx @@ -145,7 +145,7 @@ export class SelectShipmentType extends Component { const boatCardText = 'Provide information about your boat and we will determine how it will ship.'; - const mobileHomeCardText = 'Please provide information about your mobile home.'; + const mobileHomeCardText = 'Provide information about your mobile home.'; const selectableCardDefaultProps = { onChange: (e) => this.setShipmentType(e), From 5ca370797dcbbce5468c29239f5bd75cb009d042 Mon Sep 17 00:00:00 2001 From: KonstanceH Date: Tue, 3 Sep 2024 19:24:47 +0000 Subject: [PATCH 2/9] changed shipment label shown for shippments. --- src/components/ShipmentList/ShipmentList.jsx | 3 ++- src/shared/constants.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/ShipmentList/ShipmentList.jsx b/src/components/ShipmentList/ShipmentList.jsx index fb7cf1366c8..f8e2393bada 100644 --- a/src/components/ShipmentList/ShipmentList.jsx +++ b/src/components/ShipmentList/ShipmentList.jsx @@ -8,6 +8,7 @@ import styles from './ShipmentList.module.scss'; import { shipmentTypes, WEIGHT_ADJUSTMENT } from 'constants/shipments'; import { SHIPMENT_OPTIONS, SHIPMENT_TYPES } from 'shared/constants'; +import { getShipmentTypeLabel } from 'utils/shipmentDisplay'; import { ShipmentShape } from 'types/shipment'; import { formatWeight } from 'utils/formatters'; import { isPPMShipmentComplete, isBoatShipmentComplete, isMobileHomeShipmentComplete } from 'utils/shipments'; @@ -59,7 +60,7 @@ export const ShipmentListItem = ({ >
- {shipmentTypes[shipment.shipmentType]} + {getShipmentTypeLabel(shipment.shipmentType)} {showNumber && ` ${shipmentNumber}`} {' '}
diff --git a/src/shared/constants.js b/src/shared/constants.js index 507fa3312e0..dd7be2bc9a3 100644 --- a/src/shared/constants.js +++ b/src/shared/constants.js @@ -120,7 +120,7 @@ export const shipmentOptionLabels = [ { key: SHIPMENT_OPTIONS.HHG, label: 'HHG' }, { key: SHIPMENT_OPTIONS.PPM, label: 'PPM' }, { key: SHIPMENT_OPTIONS.BOAT, label: 'Boat' }, - { key: SHIPMENT_OPTIONS.MOBILE_HOME, label: 'MobileHome' }, + { key: SHIPMENT_OPTIONS.MOBILE_HOME, label: 'Mobile Home' }, { key: SHIPMENT_TYPES.BOAT_HAUL_AWAY, label: 'Boat' }, { key: SHIPMENT_TYPES.BOAT_TOW_AWAY, label: 'Boat' }, ]; From 10b761b1f1ce500006e5679a2c223eacf64cf734 Mon Sep 17 00:00:00 2001 From: KonstanceH Date: Tue, 3 Sep 2024 19:52:46 +0000 Subject: [PATCH 3/9] linter change --- pkg/services/move/move_router.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/services/move/move_router.go b/pkg/services/move/move_router.go index 22fa92bd99a..c510023e5a7 100644 --- a/pkg/services/move/move_router.go +++ b/pkg/services/move/move_router.go @@ -209,8 +209,8 @@ func (router moveRouter) sendToServiceCounselor(appCtx appcontext.AppContext, mo } // update status for boat or mobile home shipment if move.MTOShipments[i].ShipmentType == models.MTOShipmentTypeBoatHaulAway || - move.MTOShipments[i].ShipmentType == models.MTOShipmentTypeBoatTowAway || - move.MTOShipments[i].ShipmentType == models.MTOShipmentTypeMobileHome { + move.MTOShipments[i].ShipmentType == models.MTOShipmentTypeBoatTowAway || + move.MTOShipments[i].ShipmentType == models.MTOShipmentTypeMobileHome { move.MTOShipments[i].Status = models.MTOShipmentStatusSubmitted if verrs, err := appCtx.DB().ValidateAndUpdate(&move.MTOShipments[i]); verrs.HasAny() || err != nil { From f3d1f023ff05331da2f4fee5aa6a76dda690ee59 Mon Sep 17 00:00:00 2001 From: KonstanceH Date: Thu, 5 Sep 2024 05:29:49 +0000 Subject: [PATCH 4/9] added tests --- playwright/tests/my/mymove/mobileHome.spec.js | 145 ++++++++++++++++++ .../tests/utils/my/waitForCustomerPage.js | 9 ++ .../MobileHomeshipmentCard.test.jsx | 143 +++++++++++++++++ .../Customer/Review/Summary/Summary.test.jsx | 2 + 4 files changed, 299 insertions(+) create mode 100644 playwright/tests/my/mymove/mobileHome.spec.js create mode 100644 src/components/Customer/Review/ShipmentCard/MobileHomeShipmentCard/MobileHomeshipmentCard.test.jsx diff --git a/playwright/tests/my/mymove/mobileHome.spec.js b/playwright/tests/my/mymove/mobileHome.spec.js new file mode 100644 index 00000000000..4f0233be024 --- /dev/null +++ b/playwright/tests/my/mymove/mobileHome.spec.js @@ -0,0 +1,145 @@ +// @ts-check +import { test, expect } from '../../utils/my/customerTest'; + +const multiMoveEnabled = process.env.FEATURE_FLAG_MULTI_MOVE; + +test.describe('Mobile Home shipment', () => { + test.skip(multiMoveEnabled === 'true', 'Skip if MultiMove workflow is enabled.'); + + test('A customer can create a Mobile Home shipment', async ({ page, customerPage }) => { + // Generate a new onboarded user with orders and log in + const move = await customerPage.testHarness.buildMoveWithOrders(); + const userId = move.Orders.ServiceMember.user_id; + await customerPage.signInAsExistingCustomer(userId); + + // Navigate to create a new shipment + await customerPage.waitForPage.home(); + await page.getByTestId('shipment-selection-btn').click(); + await customerPage.waitForPage.aboutShipments(); + await customerPage.navigateForward(); + await customerPage.waitForPage.selectShipmentType(); + + // Create an Mobile Home shipment + await page.getByText('Move a Mobile Home').click(); + await customerPage.navigateForward(); + + // Fill in form to create Mobile Home shipment + await customerPage.waitForPage.mobileHomeShipment(); + await page.getByLabel('Year').fill('2022'); + await page.getByLabel('Make').fill('make'); + await page.getByLabel('Model').fill('model'); + await page.getByTestId('lengthFeet').fill('22'); + await page.getByTestId('widthFeet').fill('22'); + await page.getByTestId('heightFeet').fill('22'); + await page.getByTestId('remarks').fill('remarks test'); + await page.getByRole('button', { name: 'Continue' }).click(); + + await expect(page.getByTestId('tag')).toContainText('Mobile Home'); + + await expect(page.getByText('Pickup info')).toBeVisible(); + await page.getByLabel('Preferred pickup date').fill('25 Dec 2022'); + await page.getByLabel('Preferred pickup date').blur(); + await page.getByText('Use my current address').click(); + await page.getByLabel('Preferred delivery date').fill('25 Dec 2022'); + await page.getByLabel('Preferred delivery date').blur(); + await page.getByRole('button', { name: 'Save & Continue' }).click(); + await customerPage.waitForPage.reviewShipments(); + }); +}); + +test.describe('(MultiMove) Mobile Home shipment', () => { + test.skip(multiMoveEnabled === 'false', 'Skip if MultiMove workflow is not enabled.'); + + test('A customer can create a Mobile Home shipment', async ({ page, customerPage }) => { + // Generate a new onboarded user with orders and log in + const move = await customerPage.testHarness.buildMoveWithOrders(); + const userId = move.Orders.ServiceMember.user_id; + await customerPage.signInAsExistingCustomer(userId); + + // Navigate from MM Dashboard to Move + await customerPage.navigateFromMMDashboardToMove(move); + + // Navigate to create a new shipment + await customerPage.waitForPage.home(); + await page.getByTestId('shipment-selection-btn').click(); + await customerPage.waitForPage.aboutShipments(); + await customerPage.navigateForward(); + await customerPage.waitForPage.selectShipmentType(); + + // Create an Mobile Home shipment + await page.getByText('Move a mobile home').click(); + await customerPage.navigateForward(); + + // Fill in form to create Mobile Home shipment + await customerPage.waitForPage.mobileHomeShipment(); + await page.getByLabel('Year').fill('2022'); + await page.getByLabel('Make').fill('make'); + await page.getByLabel('Model').fill('model'); + await page.getByTestId('lengthFeet').fill('22'); + await page.getByTestId('widthFeet').fill('22'); + await page.getByTestId('heightFeet').fill('22'); + await page.getByTestId('remarks').fill('remarks test'); + await page.getByRole('button', { name: 'Continue' }).click(); + + await expect(page.getByTestId('tag')).toContainText('Mobile Home'); + + await expect(page.getByText('Pickup info')).toBeVisible(); + await page.getByLabel('Preferred pickup date').fill('25 Dec 2022'); + await page.getByLabel('Preferred pickup date').blur(); + await page.getByText('Use my current address').click(); + await page.getByLabel('Preferred delivery date').fill('25 Dec 2022'); + await page.getByLabel('Preferred delivery date').blur(); + await page.getByRole('button', { name: 'Save & Continue' }).click(); + await customerPage.waitForPage.reviewShipments(); + }); + + test('Is able to delete a Mobile Home shipment', async ({ page, customerPage }) => { + // Generate a new onboarded user with orders and log in + const move = await customerPage.testHarness.buildMoveWithOrders(); + const userId = move.Orders.ServiceMember.user_id; + await customerPage.signInAsExistingCustomer(userId); + + // Navigate from MM Dashboard to Move + await customerPage.navigateFromMMDashboardToMove(move); + + // Navigate to create a new shipment + await customerPage.waitForPage.home(); + await page.getByTestId('shipment-selection-btn').click(); + await customerPage.waitForPage.aboutShipments(); + await customerPage.navigateForward(); + await customerPage.waitForPage.selectShipmentType(); + + // Create an Mobile Home shipment + await page.getByText('Move a mobile home').click(); + await customerPage.navigateForward(); + + // Fill in form to create Mobile Home shipment + await customerPage.waitForPage.mobileHomeShipment(); + await page.getByLabel('Year').fill('2022'); + await page.getByLabel('Make').fill('make'); + await page.getByLabel('Model').fill('model'); + await page.getByTestId('lengthFeet').fill('22'); + await page.getByTestId('widthFeet').fill('22'); + await page.getByTestId('heightFeet').fill('22'); + await page.getByTestId('remarks').fill('remarks test'); + await page.getByRole('button', { name: 'Continue' }).click(); + + await expect(page.getByTestId('tag')).toContainText('Mobile Home'); + + await expect(page.getByText('Pickup info')).toBeVisible(); + await page.getByLabel('Preferred pickup date').fill('25 Dec 2022'); + await page.getByLabel('Preferred pickup date').blur(); + await page.getByText('Use my current address').click(); + await page.getByLabel('Preferred delivery date').fill('25 Dec 2022'); + await page.getByLabel('Preferred delivery date').blur(); + await page.getByRole('button', { name: 'Save & Continue' }).click(); + await customerPage.waitForPage.reviewShipments(); + + await expect(page.getByRole('heading', { name: 'Mobile Home 1' })).toBeVisible(); + await page.getByTestId('deleteShipmentButton').click(); + await expect(page.getByRole('heading', { name: 'Delete this?' })).toBeVisible(); + await page.getByText('Yes, Delete').click(); + + await expect(page.getByRole('heading', { name: 'Mobile Home 1' })).not.toBeVisible(); + }); +}); diff --git a/playwright/tests/utils/my/waitForCustomerPage.js b/playwright/tests/utils/my/waitForCustomerPage.js index 18d76ac5d95..018d5a55301 100644 --- a/playwright/tests/utils/my/waitForCustomerPage.js +++ b/playwright/tests/utils/my/waitForCustomerPage.js @@ -193,6 +193,15 @@ export class WaitForCustomerPage extends WaitForPage { await this.runAccessibilityAudit(); } + /** + * @returns {Promise} + */ + async mobileHomeShipment() { + await this.runAccessibilityAudit(); + await base.expect(this.page.getByRole('heading', { level: 1 })).toHaveText('Mobile home details and measurements'); + await this.runAccessibilityAudit(); + } + /** * @returns {Promise} */ diff --git a/src/components/Customer/Review/ShipmentCard/MobileHomeShipmentCard/MobileHomeshipmentCard.test.jsx b/src/components/Customer/Review/ShipmentCard/MobileHomeShipmentCard/MobileHomeshipmentCard.test.jsx new file mode 100644 index 00000000000..e2d6d3fc563 --- /dev/null +++ b/src/components/Customer/Review/ShipmentCard/MobileHomeShipmentCard/MobileHomeshipmentCard.test.jsx @@ -0,0 +1,143 @@ +import React from 'react'; +import { render, screen } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; + +import MobileHomeShipmentCard from './MobileHomeShipmentCard'; + +import { SHIPMENT_TYPES } from 'shared/constants'; + +const defaultProps = { + showEditAndDeleteBtn: true, + onEditClick: jest.fn(), + onDeleteClick: jest.fn(), + shipmentNumber: 1, + requestedPickupDate: new Date('01/01/2020').toISOString(), + requestedDeliveryDate: new Date('03/01/2020').toISOString(), + pickupLocation: { + streetAddress1: '17 8th St', + city: 'New York', + state: 'NY', + postalCode: '11111', + }, + destinationLocation: { + streetAddress1: '17 8th St', + city: 'New York', + state: 'NY', + postalCode: '73523', + }, + releasingAgent: { + firstName: 'Super', + lastName: 'Mario', + phone: '(555) 555-5555', + email: 'superMario@gmail.com', + }, + destinationZIP: '73523', + receivingAgent: { + firstName: 'Princess', + lastName: 'Peach', + phone: '(999) 999-9999', + email: 'princessPeach@gmail.com', + }, + remarks: + 'This is 500 characters of customer remarks right here. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', + shipment: { + moveTaskOrderID: 'testMove123', + id: '20fdbf58-879e-4692-b3a6-8a71f6dcfeaa', + shipmentLocator: 'testMove123-01', + shipmentType: SHIPMENT_TYPES.MOBILE_HOME, + mobileHomeShipment: { + year: 2020, + make: 'Test Make', + model: 'Test Model', + lengthInInches: 240, + widthInInches: 120, + heightInInches: 72, + }, + }, +}; + +describe('MobileHomeShipmentCard component', () => { + it('renders component with all fields', () => { + render(); + + expect(screen.getByRole('heading', { level: 3 })).toHaveTextContent('Mobile Home 1'); + expect(screen.getByText(/^#testMove123-01$/, { selector: 'p' })).toBeInTheDocument(); + + expect(screen.getByRole('button', { name: 'Edit' })).toBeInTheDocument(); + expect(screen.getByRole('button', { name: 'Delete' })).toBeInTheDocument(); + + const descriptionDefinitions = screen.getAllByRole('definition'); + + const expectedRows = [ + ['Requested pickup date', '01 Jan 2020'], + ['Pickup location', '17 8th St New York, NY 11111'], + ['Releasing agent', 'Super Mario (555) 555-5555 superMario@gmail.com'], + ['Requested delivery date', '01 Mar 2020'], + ['Destination', '17 8th St New York, NY 73523'], + ['Receiving agent', 'Princess Peach (999) 999-9999 princessPeach@gmail.com'], + ['Mobile Home year', '2020'], + ['Mobile Home make', 'Test Make'], + ['Mobile Home model', 'Test Model'], + ['Dimensions', `20' L x 10' W x 6' H`], + [ + 'Remarks', + 'This is 500 characters of customer remarks right here. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', + ], + ]; + + expect(descriptionDefinitions.length).toBe(expectedRows.length); + + expectedRows.forEach((expectedRow, index) => { + // dt (definition terms) are not accessible elements that can be found with getByRole although + // testing library claims this is fixed we need to find the node package that is out of date + expect(descriptionDefinitions[index].previousElementSibling).toHaveTextContent(expectedRow[0]); + expect(descriptionDefinitions[index]).toHaveTextContent(expectedRow[1]); + }); + }); + + it('omits the edit button when showEditAndDeleteBtn prop is false', () => { + render(); + + expect(screen.queryByRole('button', { name: 'Edit' })).not.toBeInTheDocument(); + expect(screen.queryByRole('button', { name: 'Delete' })).not.toBeInTheDocument(); + }); + + it('calls onEditClick when edit button is pressed', async () => { + render(); + const editBtn = screen.getByRole('button', { name: 'Edit' }); + await userEvent.click(editBtn); + expect(defaultProps.onEditClick).toHaveBeenCalledTimes(1); + }); + + it('calls onDeleteClick when delete button is pressed', async () => { + render(); + const deleteBtn = screen.getByRole('button', { name: 'Delete' }); + await userEvent.click(deleteBtn); + expect(defaultProps.onDeleteClick).toHaveBeenCalledTimes(1); + }); + + it('renders incomplete shipment label and tooltip when shipment is incomplete', async () => { + const incompleteShipmentProps = { + ...defaultProps, + shipment: { + ...defaultProps.shipment, + requestedPickupDate: '', + mobileHomeShipment: defaultProps.shipment.mobileHomeShipment, + }, + onIncompleteClick: jest.fn(), + }; + + render(); + + expect(screen.getByText('Incomplete')).toBeInTheDocument(); + expect(screen.getByTitle('Help about incomplete shipment')).toBeInTheDocument(); + + await userEvent.click(screen.getByTitle('Help about incomplete shipment')); + + expect(incompleteShipmentProps.onIncompleteClick).toHaveBeenCalledWith( + 'Mobile Home 1', + 'testMove123-01', + SHIPMENT_TYPES.MOBILE_HOME, + ); + }); +}); diff --git a/src/components/Customer/Review/Summary/Summary.test.jsx b/src/components/Customer/Review/Summary/Summary.test.jsx index 88a0924209d..d62077b1083 100644 --- a/src/components/Customer/Review/Summary/Summary.test.jsx +++ b/src/components/Customer/Review/Summary/Summary.test.jsx @@ -666,6 +666,7 @@ describe('Summary page', () => { expect(isBooleanFlagEnabled).toBeCalledWith(FEATURE_FLAG_KEYS.NTS); expect(isBooleanFlagEnabled).toBeCalledWith(FEATURE_FLAG_KEYS.NTSR); expect(isBooleanFlagEnabled).toBeCalledWith(FEATURE_FLAG_KEYS.BOAT); + expect(isBooleanFlagEnabled).toBeCalledWith(FEATURE_FLAG_KEYS.MOBILE_HOME); }); it('add shipment modal displays still in dev mode', async () => { @@ -697,6 +698,7 @@ describe('Summary page', () => { expect(isBooleanFlagEnabled).toBeCalledWith(FEATURE_FLAG_KEYS.NTS); expect(isBooleanFlagEnabled).toBeCalledWith(FEATURE_FLAG_KEYS.NTSR); expect(isBooleanFlagEnabled).toBeCalledWith(FEATURE_FLAG_KEYS.BOAT); + expect(isBooleanFlagEnabled).toBeCalledWith(FEATURE_FLAG_KEYS.MOBILE_HOME); }); }); afterEach(jest.clearAllMocks); From f779a16a1d3c334d6f44bac0fd3c9344255db736 Mon Sep 17 00:00:00 2001 From: KonstanceH Date: Thu, 5 Sep 2024 15:13:25 +0000 Subject: [PATCH 5/9] remove location title --- src/content/shipments.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/content/shipments.js b/src/content/shipments.js index 2d7ecae0329..828401103fd 100644 --- a/src/content/shipments.js +++ b/src/content/shipments.js @@ -17,13 +17,12 @@ export const shipmentForm = { [SHIPMENT_OPTIONS.HHG]: 'Movers pack and transport this shipment', [SHIPMENT_OPTIONS.NTS]: 'Where and when should the movers pick up your personal property going into storage?', [SHIPMENT_OPTIONS.NTSR]: 'Where and when should the movers deliver your personal property from storage?', - [SHIPMENT_OPTIONS.MOBILE_HOME]: 'Where and when should the movers deliver your mobile home?', }, }; export const shipmentSectionLabels = { HHG: 'HHG shipment', - MOBILE_HOME: 'MOBILE Home shipment', + MOBILE_HOME: 'Mobile Home shipment', HHG_INTO_NTS_DOMESTIC: 'NTS shipment', HHG_OUTOF_NTS_DOMESTIC: 'NTS-release shipment', }; From e8b3378f81de116acbb07c839f08733477a0a5cb Mon Sep 17 00:00:00 2001 From: KonstanceH Date: Mon, 9 Sep 2024 20:25:40 +0000 Subject: [PATCH 6/9] fixing spelling and removing remarks --- .../tests/utils/my/waitForCustomerPage.js | 2 +- .../BoatShipmentForm/BoatShipmentForm.jsx | 2 +- .../MobileHomeShipmentForm.jsx | 41 ++----------------- .../MobileHomeShipmentForm.test.jsx | 5 --- .../MobileHomeShipmentCreate.jsx | 2 +- .../MobileHomeShipmentCreate.test.jsx | 12 +++--- 6 files changed, 12 insertions(+), 52 deletions(-) diff --git a/playwright/tests/utils/my/waitForCustomerPage.js b/playwright/tests/utils/my/waitForCustomerPage.js index 018d5a55301..20fa227d9b0 100644 --- a/playwright/tests/utils/my/waitForCustomerPage.js +++ b/playwright/tests/utils/my/waitForCustomerPage.js @@ -198,7 +198,7 @@ export class WaitForCustomerPage extends WaitForPage { */ async mobileHomeShipment() { await this.runAccessibilityAudit(); - await base.expect(this.page.getByRole('heading', { level: 1 })).toHaveText('Mobile home details and measurements'); + await base.expect(this.page.getByRole('heading', { level: 1 })).toHaveText('Mobile Home details and measurements'); await this.runAccessibilityAudit(); } diff --git a/src/components/Customer/BoatShipment/BoatShipmentForm/BoatShipmentForm.jsx b/src/components/Customer/BoatShipment/BoatShipmentForm/BoatShipmentForm.jsx index 4c43be5cbf7..5fdcb2c7350 100644 --- a/src/components/Customer/BoatShipment/BoatShipmentForm/BoatShipmentForm.jsx +++ b/src/components/Customer/BoatShipment/BoatShipmentForm/BoatShipmentForm.jsx @@ -333,7 +333,7 @@ const BoatShipmentForm = ({ mtoShipment, onBack, onSubmit }) => { Examples
  • - Dimensions of the boat on the trailer are signigicantly different than one would expect given + Dimensions of the boat on the trailer are significantly different than one would expect given their individual dimensions
  • diff --git a/src/components/Customer/MobileHomeShipment/MobileHomeShipmentForm/MobileHomeShipmentForm.jsx b/src/components/Customer/MobileHomeShipment/MobileHomeShipmentForm/MobileHomeShipmentForm.jsx index 7eb0d36eeb3..17d20ae59c1 100644 --- a/src/components/Customer/MobileHomeShipment/MobileHomeShipmentForm/MobileHomeShipmentForm.jsx +++ b/src/components/Customer/MobileHomeShipment/MobileHomeShipmentForm/MobileHomeShipmentForm.jsx @@ -1,20 +1,18 @@ import React from 'react'; import { func } from 'prop-types'; import * as Yup from 'yup'; -import { Formik, Field } from 'formik'; -import { Button, Form, Label, Textarea } from '@trussworks/react-uswds'; +import { Formik } from 'formik'; +import { Button, Form } from '@trussworks/react-uswds'; import classnames from 'classnames'; import styles from './MobileHomeShipmentForm.module.scss'; import SectionWrapper from 'components/Customer/SectionWrapper'; -import Hint from 'components/Hint'; import Fieldset from 'shared/Fieldset'; import formStyles from 'styles/form.module.scss'; import { ShipmentShape } from 'types/shipment'; import TextField from 'components/form/fields/TextField/TextField'; import MaskedTextField from 'components/form/fields/MaskedTextField/MaskedTextField'; -import Callout from 'components/Callout'; import { ErrorMessage } from 'components/form/index'; import { convertInchesToFeetAndInches } from 'utils/formatMtoShipment'; import RequiredTag from 'components/form/RequiredTag'; @@ -110,7 +108,7 @@ const MobileHomeShipmentForm = ({ mtoShipment, onBack, onSubmit }) => {
    -

    Mobile home Information

    +

    Mobile Home Information

    {
- -
Remarks}> - - - - Examples -
    -
  • - Dimensions of the mobile home on the trailer are signigicantly different than one would expect - given their individual dimensions -
  • - -
  • Access info for your origin or destination address/marina
  • -
-
- - - -

250 characters

-
-
-
+ +
Remarks}> + + + + Example +
    +
  • + Is there additional information you feel is pertinent to the processing of your mobile home + shipment?(e.g., ‘wrecker service requested’ and ‘crane service needed’). +
  • +
+
+ + + +

250 characters

+
+
+
}>