hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

ci(cypress): verify existence of `payment_id` after redirection

Open pixincreate opened this issue 9 months ago • 1 comments

Type of Change

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

Description

This PR adds a check in Cypress redirectionHandler to verify that payment_id exists after the redirection completes without which it throws an error!

Additional Changes

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

Motivation and Context

We need to check if we get payment_id in return url after the redirection completes.

How did you test it?

tested by inverting the check:

image

since i asked cypress to throw an error if payment_id exist, it threw me an error:

image

so, the check works as expected.

Checklist

  • [x] I formatted the code npm run format
  • [x] I addressed lints thrown by npm run lint
  • [x] I reviewed the submitted code
  • [ ] I added unit tests for my changes where possible

pixincreate avatar Mar 27 '25 13:03 pixincreate

Review changes with  SemanticDiff

Changed Files
File Status
  cypress-tests/cypress/support/redirectionHandler.js  64% smaller

semanticdiff-com[bot] avatar Mar 27 '25 13:03 semanticdiff-com[bot]