hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

fix: Update PayPal Postman collection tests

Open ashx98 opened this issue 1 month ago • 2 comments

Type of Change

  • [ ] Bugfix
  • [ ] New feature
  • [x] Enhancement
  • [ ] Refactoring
  • [ ] Dependency updates
  • [ ] Documentation
  • [x] CI/CD

Description

Fixed invalid card number validation test (123456 instead of 4242424242424242)

  • Updated card expiry dates from 10/25 to 10/30 (cards were expired)
  • Fixed test assertions to expect 4xx error response instead of 2xx
  • Updated error validation to match actual API format (error.error_type)
  • Added detailed comments explaining all assertion changes

Additional Changes

  • [ ] This PR modifies the API contract
  • [ ] This PR modifies the database schema
  • [ ] This PR modifies application configuration/environment variables

Motivation and Context

Postman tests were failing for Paypal in jenkins.

How did you test it?

After the change ran the collection in postman. image

Checklist

  • [ ] I formatted the code cargo +nightly fmt --all
  • [ ] I addressed lints thrown by cargo clippy
  • [ ] I reviewed the submitted code
  • [ ] I added unit tests for my changes where possible

ashx98 avatar Nov 04 '25 12:11 ashx98

Review changes with  SemanticDiff

Changed Files
File Status
  postman/collection-dir/paypal/Flow Testcases/Variation Cases/Scenario1-Create payment with Invalid card details/Payments - Create(Invalid card number)/event.test.js  52% smaller
  postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/request.json  0% smaller
  postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario11-Create Partial Capture payment/Payments - Create/request.json  0% smaller
  postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Create/request.json  0% smaller
  postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Confirm/request.json  0% smaller
  postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture with confirm false/Payments - Create/request.json  0% smaller
  postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Create/request.json  0% smaller
  postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Create/request.json  0% smaller
  postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario8-Create payment with Manual capture with confirm false and surcharge_data/Payments - Confirm/request.json  0% smaller
  postman/collection-dir/paypal/Flow Testcases/QuickStart/Payments - Create/request.json  0% smaller
  postman/collection-dir/paypal/Flow Testcases/Variation Cases/Scenario1-Create payment with Invalid card details/Payments - Create(Invalid card number)/request.json  0% smaller
  postman/collection-dir/paypal/Flow Testcases/Variation Cases/Scenario1-Create payment with Invalid card details/Payments - Create(invalid CVV)/request.json  0% smaller
  postman/collection-dir/paypal/Flow Testcases/Variation Cases/Scenario3-Capture greater amount/Payments - Create/request.json  0% smaller
  postman/collection-dir/paypal/Flow Testcases/Variation Cases/Scenario4-Capture the succeeded payment/Payments - Create/request.json  0% smaller
  postman/collection-dir/paypal/Flow Testcases/Variation Cases/Scenario5-Void the success_slash_failure payment/Payments - Create/request.json  0% smaller
  postman/collection-dir/paypal/Flow Testcases/Variation Cases/Scenario8-Refund for unsuccessful payment/Payments - Create/request.json  0% smaller
  postman/collection-json/paypal.postman_collection.json  0% smaller

semanticdiff-com[bot] avatar Nov 04 '25 12:11 semanticdiff-com[bot]

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :warning: Please upload report for BASE (main@436893a). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10129   +/-   ##
=======================================
  Coverage        ?    3.89%           
=======================================
  Files           ?     1224           
  Lines           ?   303060           
  Branches        ?        0           
=======================================
  Hits            ?    11804           
  Misses          ?   291256           
  Partials        ?        0           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar Nov 04 '25 12:11 codecov[bot]