Skip to content

fix: update sdk beta test expectations - #503

Merged
NabDevs merged 1 commit into
mainfrom
fix/sdk-beta29-test-expectations
Jul 9, 2026
Merged

fix: update sdk beta test expectations#503
NabDevs merged 1 commit into
mainfrom
fix/sdk-beta29-test-expectations

Conversation

@NabDevs

@NabDevs NabDevs commented Jul 9, 2026

Copy link
Copy Markdown
Contributor
  • Update tests for SDK beta.29 validation behavior
  • Avoid asserting the exact generated SDK exception message
  • Keep unsupported carrier handling covered through Carrier::isSupported()

@NabDevs
NabDevs requested a review from a team as a code owner July 9, 2026 13:49
Copilot AI review requested due to automatic review settings July 9, 2026 13:49
@github-project-automation github-project-automation Bot moved this to Todo in PDK Jul 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates unit test expectations to align with SDK beta.29 validation behavior, reducing brittleness around generated SDK exception messages while keeping unsupported-carrier handling covered via Carrier::isSupported().

Changes:

  • Relax CapabilitiesService::getContractDefinitions() invalid-carrier assertion to avoid matching the full generated SDK exception message.
  • Update Carrier model tests to treat unknown carrier names as “unsupported” rather than expecting a constructor exception.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tests/Unit/SdkApi/Service/CoreApi/Shipment/CapabilitiesServiceTest.php Adjusts invalid-carrier assertion to avoid coupling tests to SDK-generated exception message details.
tests/Unit/Carrier/Model/CarrierTest.php Updates behavior expectation for unknown carriers to be “unsupported” via Carrier::isSupported().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.25%. Comparing base (ae17c4e) to head (4bdf2f6).

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #503      +/-   ##
============================================
+ Coverage     94.21%   94.25%   +0.03%     
  Complexity     2350     2350              
============================================
  Files           350      350              
  Lines          7538     7538              
============================================
+ Hits           7102     7105       +3     
+ Misses          436      433       -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@myparcel-bot myparcel-bot Bot added the approved (Auto) label Jul 9, 2026
@NabDevs
NabDevs enabled auto-merge July 9, 2026 14:00
@NabDevs
NabDevs added this pull request to the merge queue Jul 9, 2026
Merged via the queue into main with commit ae28336 Jul 9, 2026
21 checks passed
@NabDevs
NabDevs deleted the fix/sdk-beta29-test-expectations branch July 9, 2026 14:08
@github-project-automation github-project-automation Bot moved this from Todo to Done in PDK Jul 9, 2026
myparcel-bot Bot added a commit that referenced this pull request Jul 9, 2026
## [4.2.1](v4.2.0...v4.2.1) (2026-07-09)

### 🐛 Bug Fixes

* harden container cache handling ([#499](#499)) ([ae17c4e](ae17c4e))
* update sdk beta test expectations ([#503](#503)) ([ae28336](ae28336))
@myparcel-bot

myparcel-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 4.2.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@myparcel-bot myparcel-bot Bot added the released label Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants