hyperswitch
hyperswitch copied to clipboard
ci(cypress): verify existence of `payment_id` after redirection
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:
since i asked cypress to throw an error if payment_id exist, it threw me an error:
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