Skip to content

Commit

Permalink
feat: allow small parcel to be sent to belgium (#241)
Browse files Browse the repository at this point in the history
INT-644
  • Loading branch information
GravendeelJochem authored Sep 16, 2024
1 parent 6b787bb commit f891670
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/data/carriers/abstractCarrierConfiguration.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
ALLOW_PACKAGE_TYPE_MAILBOX,
ALLOW_PACKAGE_TYPE_PACKAGE_SMALL,
} from '@/data/keys/configKeys';
import {BELGIUM, NETHERLANDS} from '@myparcel/js-sdk/dist/constant/countries-iso2';
import { NETHERLANDS } from '@myparcel/js-sdk/dist/constant/countries-iso2';
import { CITY, POSTAL_CODE, STREET } from '../keys/addressKeys';
import { PACKAGE_TYPE_DIGITAL_STAMP, PACKAGE_TYPE_MAILBOX, PACKAGE_TYPE_PACKAGE, PACKAGE_TYPE_PACKAGE_SMALL } from '@/data/keys/settingsConsts';
import { flatten } from 'lodash-es';
Expand Down Expand Up @@ -70,7 +70,7 @@ export class AbstractCarrierConfiguration {
case PACKAGE_TYPE_PACKAGE:
return true;
case PACKAGE_TYPE_PACKAGE_SMALL:
return BELGIUM !== country && this.hasFeature(ALLOW_PACKAGE_TYPE_PACKAGE_SMALL);
return this.hasFeature(ALLOW_PACKAGE_TYPE_PACKAGE_SMALL);
case PACKAGE_TYPE_MAILBOX:
return this.hasFeature(ALLOW_PACKAGE_TYPE_MAILBOX);
case PACKAGE_TYPE_DIGITAL_STAMP:
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/delivery-options/carrierConfiguration.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('CarrierConfiguration', () => {
expect(config.allowsPackageTypeIn(PACKAGE_TYPE_MAILBOX, 'NL')).toBe(true);
expect(config.allowsPackageTypeIn(PACKAGE_TYPE_MAILBOX, 'BE')).toBe(true);
expect(config.allowsPackageTypeIn(PACKAGE_TYPE_PACKAGE_SMALL, 'NL')).toBe(true);
expect(config.allowsPackageTypeIn(PACKAGE_TYPE_PACKAGE_SMALL, 'BE')).toBe(false);
expect(config.allowsPackageTypeIn(PACKAGE_TYPE_PACKAGE_SMALL, 'BE')).toBe(true);
expect(config.allowsPackageTypeIn('NonExistentType', 'NL')).toBe(false);
});

Expand Down

0 comments on commit f891670

Please sign in to comment.