Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main b 21659 display estimated prices ub #14811

Merged
merged 15 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ ShipmentInfoListSelector.propTypes = {
SHIPMENT_TYPES.BOAT_HAUL_AWAY,
SHIPMENT_TYPES.BOAT_TOW_AWAY,
SHIPMENT_OPTIONS.MOBILE_HOME,
SHIPMENT_OPTIONS.UNACCOMPANIED_BAGGAGE,
]),
isForEvaluationReport: PropTypes.bool,
destinationDutyLocationPostalCode: PropTypes.string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,11 @@ const ServiceItemDetails = ({ id, code, details, serviceRequestDocs, shipment, s
case 'ISLH':
case 'IHPK':
case 'IHUPK':
case 'IUBPK':
case 'IUBUPK':
case 'POEFSC':
case 'PODFSC': {
case 'PODFSC':
case 'UBP': {
detailSection = (
<div>
<dl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -523,44 +523,70 @@ describe('ServiceItemDetails Crating Rejected', () => {
});
});

describe('ServiceItemDetails Estimated Price for DLH, DSH, FSC, DOP, DDP, DPK, DUPK', () => {
it.each([['DLH'], ['DSH'], ['FSC'], ['DOP'], ['DDP'], ['DPK'], ['DUPK']])(
'renders the formatted estimated price field for the service items',
(code) => {
render(
<ServiceItemDetails
id="1"
code={code}
details={details}
shipment={shipment}
serviceRequestDocs={serviceRequestDocs}
/>,
);

expect(screen.getByText('Estimated Price:')).toBeInTheDocument();
expect(screen.getByText('$28.00')).toBeInTheDocument();
},
);
describe('ServiceItemDetails Estimated Price for DLH, DSH, FSC, DOP, DDP, DPK, DUPK, ISLH, IHPK, IHUPK, IUBPK, IUBUPK, POEFSC, PODFSC, UBP', () => {
it.each([
['DLH'],
['DSH'],
['FSC'],
['DOP'],
['DDP'],
['DPK'],
['DUPK'],
['ISLH'],
['IHPK'],
['IHUPK'],
['IUBPK'],
['IUBUPK'],
['POEFSC'],
['PODFSC'],
['UBP'],
])('renders the formatted estimated price field for the service item: %s', (code) => {
render(
<ServiceItemDetails
id="1"
code={code}
details={details}
shipment={shipment}
serviceRequestDocs={serviceRequestDocs}
/>,
);

expect(screen.getByText('Estimated Price:')).toBeInTheDocument();
expect(screen.getByText('$28.00')).toBeInTheDocument();
});

const noEstimatePriceDetails = {};

it.each([['DLH'], ['DSH'], ['FSC'], ['DOP'], ['DDP'], ['DPK'], ['DUPK']])(
'renders - for estimated price when price is not in details',
(code) => {
render(
<ServiceItemDetails
id="1"
code={code}
details={noEstimatePriceDetails}
shipment={shipment}
serviceRequestDocs={serviceRequestDocs}
/>,
);

expect(screen.getByText('Estimated Price:')).toBeInTheDocument();
expect(screen.getByText('-')).toBeInTheDocument();
},
);
it.each([
['DLH'],
['DSH'],
['FSC'],
['DOP'],
['DDP'],
['DPK'],
['DUPK'],
['ISLH'],
['IHPK'],
['IHUPK'],
['IUBPK'],
['IUBUPK'],
['POEFSC'],
['PODFSC'],
['UBP'],
])('renders - for estimated price when price is not in details for the service item: %s', (code) => {
render(
<ServiceItemDetails
id="1"
code={code}
details={noEstimatePriceDetails}
shipment={shipment}
serviceRequestDocs={serviceRequestDocs}
/>,
);

expect(screen.getByText('Estimated Price:')).toBeInTheDocument();
expect(screen.getByText('-')).toBeInTheDocument();
});
});

describe('ServiceItemDetails Price for MS, CS', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ ShipmentDisplay.propTypes = {
SHIPMENT_TYPES.BOAT_HAUL_AWAY,
SHIPMENT_TYPES.BOAT_TOW_AWAY,
SHIPMENT_OPTIONS.MOBILE_HOME,
SHIPMENT_OPTIONS.UNACCOMPANIED_BAGGAGE,
]),
displayInfo: PropTypes.oneOfType([
PropTypes.shape({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ ShipmentFormRemarks.propTypes = {
SHIPMENT_OPTIONS.BOAT,
SHIPMENT_TYPES.BOAT_HAUL_AWAY,
SHIPMENT_TYPES.BOAT_TOW_AWAY,
SHIPMENT_OPTIONS.UNACCOMPANIED_BAGGAGE,
]).isRequired,
customerRemarks: PropTypes.string,
counselorRemarks: PropTypes.string,
Expand Down
Loading