Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add store_for_future_use Property and Update Tests #156

Merged

Conversation

armando-rodriguez-cko
Copy link
Contributor

feat: Add store_for_future_use Property and Update Tests

Description:

This PR enhances the Checkout SDK for Ruby by introducing a new store_for_future_use property in the NetworkTokenSource class and updating various test cases to improve coverage and skip unavailable scenarios. Additionally, this PR refines helper methods and test validations.


Key Changes:

  1. New Property:

    • Added store_for_future_use to the NetworkTokenSource class to enable token storage preferences.
  2. Test Updates:

    • Marked multiple tests as skipped using skip: 'unavailable' in:
      • InstrumentsIntegrationSpec
      • HostedPaymentsIntegrationSpec
      • PaymentsIntegrationSpec (Previous and APM)
      • TokensIntegrationSpec
    • Refined request_apm_payments_integration_spec:
      • Replaced error validation for KNET payment with response validation.
    • Updated create_hosted_payments_request to include display_name for payment descriptions.
    • Removed assertions for warnings in Hosted Payments and Payment Links tests.
  3. Helper Updates:

    • Changed the default expiry year in data_factory and payment helpers from 2025 to 2030.

Impact:

  • Functionality:
    • Provides better support for token management with the new store_for_future_use property.
    • Simplifies test execution by skipping unavailable tests while retaining the ability to revisit them in the future.
  • Test Coverage:
    • Enhanced validation for payment requests and improved readability of test cases.

Testing:

  • Verified store_for_future_use integration in related classes.
  • Validated updated test cases for correctness and alignment with the new property.
  • Ensured helper methods reflect updated expiry year for consistent test data.

Notes:

  • Future work may involve re-enabling skipped tests once the unavailable functionality is ready for integration.
  • Developers should adjust their integrations to utilise the store_for_future_use property if applicable.

- Introduced `store_for_future_use` property in `NetworkTokenSource`.
- Marked multiple test cases as skipped using `skip: 'unavailable'` across various specs.
- Updated expiry year in `data_factory` and helper files from 2025 to 2030.
- Enhanced `create_hosted_payments_request` to include `display_name` for better payment descriptions.
- Removed assertions for warnings in hosted payments and payment links tests.
- Refined `request_apm_payments_integration_spec` to validate the response instead of raising errors for specific cases.
@armando-rodriguez-cko armando-rodriguez-cko requested a review from a team January 27, 2025 10:55
@armando-rodriguez-cko armando-rodriguez-cko merged commit 5ae84f8 into master Jan 27, 2025
2 checks passed
@armando-rodriguez-cko armando-rodriguez-cko deleted the feature/INT-1540-INT-1541-previous-skip-tests branch January 27, 2025 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants