From 1c962448ecb08d39cda3a2b643acc31bec467b8b Mon Sep 17 00:00:00 2001 From: Steven Gleason <180579696+stevengleason-caci@users.noreply.github.com> Date: Mon, 13 Jan 2025 19:47:01 +0000 Subject: [PATCH] B-21569 rename UBP to "International UB price", from just "International UB". --- migrations/app/migrations_manifest.txt | 1 + .../schema/20250113152050_rename_ubp.up.sql | 1 + pkg/models/re_service.go | 2 +- .../mto_shipment/shipment_approver_test.go | 32 +++++++++++++++---- .../ShipmentServiceItemsTable.test.jsx | 8 ++--- 5 files changed, 33 insertions(+), 11 deletions(-) create mode 100644 migrations/app/schema/20250113152050_rename_ubp.up.sql diff --git a/migrations/app/migrations_manifest.txt b/migrations/app/migrations_manifest.txt index 221f6b2cffd..0d5a220354b 100644 --- a/migrations/app/migrations_manifest.txt +++ b/migrations/app/migrations_manifest.txt @@ -1061,3 +1061,4 @@ 20241230190638_remove_AK_zips_from_zip3.up.sql 20241230190647_add_missing_AK_zips_to_zip3_distances.up.sql 20250110160244_update_ordering_service_items.up.sql +20250113152050_rename_ubp.up.sql diff --git a/migrations/app/schema/20250113152050_rename_ubp.up.sql b/migrations/app/schema/20250113152050_rename_ubp.up.sql new file mode 100644 index 00000000000..41a5f532193 --- /dev/null +++ b/migrations/app/schema/20250113152050_rename_ubp.up.sql @@ -0,0 +1 @@ +update re_services set name = 'International UB price' where code = 'UBP'; \ No newline at end of file diff --git a/pkg/models/re_service.go b/pkg/models/re_service.go index 5fc9d9b3e75..75d62317f1c 100644 --- a/pkg/models/re_service.go +++ b/pkg/models/re_service.go @@ -119,7 +119,7 @@ const ( ReServiceCodeNSTH ReServiceCode = "NSTH" // ReServiceCodeNSTUB Nonstandard UB ReServiceCodeNSTUB ReServiceCode = "NSTUB" - // ReServiceCodeUBP International UB + // ReServiceCodeUBP International UB price ReServiceCodeUBP ReServiceCode = "UBP" // ReServiceCodeISLH Shipping & Linehaul ReServiceCodeISLH ReServiceCode = "ISLH" diff --git a/pkg/services/mto_shipment/shipment_approver_test.go b/pkg/services/mto_shipment/shipment_approver_test.go index cca893524d9..aef6158ddc1 100644 --- a/pkg/services/mto_shipment/shipment_approver_test.go +++ b/pkg/services/mto_shipment/shipment_approver_test.go @@ -834,16 +834,23 @@ func (suite *MTOShipmentServiceSuite) TestApproveShipment() { err2 := suite.AppContextForTest().DB().EagerPreload("ReService").Where("mto_shipment_id = ?", internationalShipment.ID).Order("created_at asc").All(&serviceItems) suite.NoError(err2) - expectedReserviceCodes := []models.ReServiceCode{ + expectedReServiceCodes := []models.ReServiceCode{ models.ReServiceCodeUBP, models.ReServiceCodePOEFSC, models.ReServiceCodeIUBPK, models.ReServiceCodeIUBUPK, } + expectedReServiceNames := []string{ + "International UB price", + "International POE Fuel Surcharge", + "International UB pack", + "International UB unpack", + } suite.Equal(4, len(serviceItems)) for i := 0; i < len(serviceItems); i++ { - suite.Equal(expectedReserviceCodes[i], serviceItems[i].ReService.Code) + suite.Equal(expectedReServiceCodes[i], serviceItems[i].ReService.Code) + suite.Equal(expectedReServiceNames[i], serviceItems[i].ReService.Name) } }) @@ -893,16 +900,23 @@ func (suite *MTOShipmentServiceSuite) TestApproveShipment() { err2 := suite.AppContextForTest().DB().EagerPreload("ReService").Where("mto_shipment_id = ?", internationalShipment.ID).Order("created_at asc").All(&serviceItems) suite.NoError(err2) - expectedReserviceCodes := []models.ReServiceCode{ + expectedReServiceCodes := []models.ReServiceCode{ models.ReServiceCodeUBP, models.ReServiceCodePODFSC, models.ReServiceCodeIUBPK, models.ReServiceCodeIUBUPK, } + expectedReServiceNames := []string{ + "International UB price", + "International POD Fuel Surcharge", + "International UB pack", + "International UB unpack", + } suite.Equal(4, len(serviceItems)) for i := 0; i < len(serviceItems); i++ { - suite.Equal(expectedReserviceCodes[i], serviceItems[i].ReService.Code) + suite.Equal(expectedReServiceCodes[i], serviceItems[i].ReService.Code) + suite.Equal(expectedReServiceNames[i], serviceItems[i].ReService.Name) } }) @@ -952,15 +966,21 @@ func (suite *MTOShipmentServiceSuite) TestApproveShipment() { err2 := suite.AppContextForTest().DB().EagerPreload("ReService").Where("mto_shipment_id = ?", internationalShipment.ID).Order("created_at asc").All(&serviceItems) suite.NoError(err2) - expectedReserviceCodes := []models.ReServiceCode{ + expectedReServiceCodes := []models.ReServiceCode{ models.ReServiceCodeUBP, models.ReServiceCodeIUBPK, models.ReServiceCodeIUBUPK, } + expectedReServiceNames := []string{ + "International UB price", + "International UB pack", + "International UB unpack", + } suite.Equal(3, len(serviceItems)) for i := 0; i < len(serviceItems); i++ { - suite.Equal(expectedReserviceCodes[i], serviceItems[i].ReService.Code) + suite.Equal(expectedReServiceCodes[i], serviceItems[i].ReService.Code) + suite.Equal(expectedReServiceNames[i], serviceItems[i].ReService.Name) } }) diff --git a/src/components/Office/ShipmentServiceItemsTable/ShipmentServiceItemsTable.test.jsx b/src/components/Office/ShipmentServiceItemsTable/ShipmentServiceItemsTable.test.jsx index 9b18298293b..592ae52467a 100644 --- a/src/components/Office/ShipmentServiceItemsTable/ShipmentServiceItemsTable.test.jsx +++ b/src/components/Office/ShipmentServiceItemsTable/ShipmentServiceItemsTable.test.jsx @@ -25,7 +25,7 @@ const reServiceItemResponse = [ isAutoApproved: true, marketCode: 'i', serviceCode: 'UBP', - serviceName: 'International UB', + serviceName: 'International UB price', shipmentType: 'UNACCOMPANIED_BAGGAGE', }, { @@ -370,7 +370,7 @@ describe('Shipment Service Items Table', () => { describe('renders the intl UB shipment type (CONUS -> OCONUS) with service items', () => { it.each([ - ['International UB'], + ['International UB price'], ['International POE Fuel Surcharge'], ['International UB pack'], ['International UB unpack'], @@ -385,7 +385,7 @@ describe('Shipment Service Items Table', () => { describe('renders the intl UB shipment type (OCONUS -> CONUS) with service items', () => { it.each([ - ['International UB'], + ['International UB price'], ['International POD Fuel Surcharge'], ['International UB pack'], ['International UB unpack'], @@ -399,7 +399,7 @@ describe('Shipment Service Items Table', () => { }); describe('renders the intl UB shipment type (OCONUS -> OCONUS) with service items', () => { - it.each([['International UB'], ['International UB pack'], ['International UB unpack']])( + it.each([['International UB price'], ['International UB pack'], ['International UB unpack']])( 'expects %s to be in the document', async (serviceItem) => { render();