From 8139b16ca5a3eb4b8ea101b33582ebdaeaee8996 Mon Sep 17 00:00:00 2001 From: Florian de Vries Date: Thu, 3 Oct 2024 10:21:58 +0200 Subject: [PATCH] feat(dhlforyou): add small package type to dhl for you --- apps/delivery-options/src/utils/getResolvedCarrier.spec.ts | 4 +++- libs/shared/src/config/getMyParcelConfig.ts | 3 ++- .../src/utils/__snapshots__/getPlatformConfig.spec.ts.snap | 5 +++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/apps/delivery-options/src/utils/getResolvedCarrier.spec.ts b/apps/delivery-options/src/utils/getResolvedCarrier.spec.ts index db1b5654..7b78b5e0 100644 --- a/apps/delivery-options/src/utils/getResolvedCarrier.spec.ts +++ b/apps/delivery-options/src/utils/getResolvedCarrier.spec.ts @@ -71,7 +71,9 @@ describe('getResolvedCarrier', () => { it('exposes package types DHL For You', () => { const carrier = getResolvedCarrier(CarrierName.DhlForYou, PlatformName.MyParcel); - expect(carrier.packageTypes.value).toEqual(new Set([PackageTypeName.Package, PackageTypeName.Mailbox])); + expect(carrier.packageTypes.value).toEqual( + new Set([PackageTypeName.Package, PackageTypeName.Mailbox, PackageTypeName.PackageSmall]), + ); }); it('exposes package types PostNL', () => { diff --git a/libs/shared/src/config/getMyParcelConfig.ts b/libs/shared/src/config/getMyParcelConfig.ts index efa6961f..5c9e4eb5 100644 --- a/libs/shared/src/config/getMyParcelConfig.ts +++ b/libs/shared/src/config/getMyParcelConfig.ts @@ -66,10 +66,11 @@ export const getMyParcelConfig = (): PlatformConfiguration => ({ { name: CarrierName.DhlForYou, subscription: SubscriptionType.Optional, - packageTypes: [PackageTypeName.Package, PackageTypeName.Mailbox], + packageTypes: [PackageTypeName.Package, PackageTypeName.Mailbox, PackageTypeName.PackageSmall], deliveryTypes: [DeliveryTypeName.Standard, DeliveryTypeName.Pickup, CustomDeliveryType.SameDay], deliveryCountries: [NETHERLANDS, BELGIUM], pickupCountries: [NETHERLANDS], + smallPackagePickupCountries: [NETHERLANDS, BELGIUM], shipmentOptions: [ShipmentOptionName.OnlyRecipient, ShipmentOptionName.Signature], features: [CarrierSetting.DeliveryDaysWindow, CarrierSetting.DropOffDays, CarrierSetting.DropOffDelay], addressFields: [AddressField.City, AddressField.PostalCode], diff --git a/libs/shared/src/utils/__snapshots__/getPlatformConfig.spec.ts.snap b/libs/shared/src/utils/__snapshots__/getPlatformConfig.spec.ts.snap index caf77c5e..fcbc995f 100644 --- a/libs/shared/src/utils/__snapshots__/getPlatformConfig.spec.ts.snap +++ b/libs/shared/src/utils/__snapshots__/getPlatformConfig.spec.ts.snap @@ -217,6 +217,7 @@ exports[`getPlatformConfig > gets config for platform myparcel 1`] = ` "packageTypes": [ "package", "mailbox", + "package_small", ], "pickupCountries": [ "NL", @@ -225,6 +226,10 @@ exports[`getPlatformConfig > gets config for platform myparcel 1`] = ` "only_recipient", "signature", ], + "smallPackagePickupCountries": [ + "NL", + "BE", + ], "subscription": -1, }, {