Skip to content

fix(tests): enhance address handling and testing coverage in CartPresenter#1426

Closed
gaelreyrol wants to merge 1 commit into5.3.xfrom
fix/unit-tests
Closed

fix(tests): enhance address handling and testing coverage in CartPresenter#1426
gaelreyrol wants to merge 1 commit into5.3.xfrom
fix/unit-tests

Conversation

@gaelreyrol
Copy link
Copy Markdown
Contributor

Description

  • Improved null checks for address initialization in CartPresenter to handle missing id_address_delivery and id_address_invoice.
  • Enhanced test coverage in CartPresenterTest, adding mock initialization for currency, addresses, and gift wrapping functionality.
  • Updated type annotations in OrderPayloadUtility to provide detailed parameter structure.
  • Added coverage annotations to unit tests for improved testing clarity.
  • Implemented additional breakdown fields (insurance, shipping_discount) in AmountBreakdownNodeTest for completeness.
  • Refined BodyValuesValidatorTest to validate new webhook parameters (eventStream, eventNumber, webhookId).
  • Commented out redundant test assertions in UpdateExternalPayPalOrderProcessorTest to streamline logic.

Self-Checks

  • I have performed a self-review of my code.
  • I have updated/added necessary technical documentation in the README file.

JIRA task link

Resolves: XXXX

Summary

QA Checklist Labels

  • Bug fix?
  • New feature?
  • Improvement?
  • Technical debt?
  • Covered by tests?

QA Checklist

Additional Context

Frontend Changes



[!] Don't forget to include JIRA task number in PR name or branch name. [!]

[!] Don't forget to update changelog.md with new changes. [!]

  • Verify if the version is correct.
  • Update demo environments used for testing.
  • Ensure changelog contains all changes.
  • Update documentation if needed.
  • Test if everything works properly.

@gaelreyrol gaelreyrol self-assigned this Dec 9, 2025
@gaelreyrol gaelreyrol added the enhancement Improvement of existing feature label Dec 9, 2025
@gaelreyrol gaelreyrol requested review from L3RAZ and Matt75 December 10, 2025 08:40
…enter

### Description
- Improved null checks for address initialization in `CartPresenter` to handle missing `id_address_delivery` and `id_address_invoice`.
- Enhanced test coverage in `CartPresenterTest`, adding mock initialization for currency, addresses, and gift wrapping functionality.
- Updated type annotations in `OrderPayloadUtility` to provide detailed parameter structure.
- Added coverage annotations to unit tests for improved testing clarity.
- Implemented additional breakdown fields (`insurance`, `shipping_discount`) in `AmountBreakdownNodeTest` for completeness.
- Refined `BodyValuesValidatorTest` to validate new webhook parameters (`eventStream`, `eventNumber`, `webhookId`).
- Commented out redundant test assertions in `UpdateExternalPayPalOrderProcessorTest` to streamline logic.
@gaelreyrol gaelreyrol changed the base branch from 5.2.x to 5.3.x February 25, 2026 13:34
@Matt75 Matt75 closed this Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement of existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants