hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

[CYPRESS_FRAMEWORK] Verify URL after redirection

Open pixincreate opened this issue 1 year ago • 5 comments

Description:

Cypress is the testing framework that Hyperswitch uses to run automated tests as it helps test both backend as well as frontend in a single shot that includes redirection flows like 3ds and bank redirect.

Redirection tests in Cypress at present do not validate the end URL. This can lead to unnecessary complication and false positives when running tests that involve redirection say, 3ds tests, bank redirect tests, bank transfer tests and etc.,

The task is to refactor the verifyReturnUrl function in redirection handler to validate the URL

Getting started:

Go through the README for guidelines on file structure, formatting and instructions on how to set up and run Cypress.

Possible implementation:

  • Refactor the verifyReturnUrl function in redirection handler support file
  • Verify that redirection_url has status that equates to either succeeded or processing. Fail the test otherwise

Example: Below is the redirection_url that has the terminal status of the payment after redirection. verifyReturnUrl function should parse redirection_url and validate the status.

redirection_url: https://duckduckgo.com/?payment_id=pay_K29MmxZKI9rDhhSY7sb8&status=succeeded

Additional info:

  • Language: Javascript
  • Difficulty: Easy

Submission Process:

  • Ask the maintainers for assignment of the issue, you can request for assignment by commenting on the issue itself.
  • Once assigned, submit a pull request (PR).
  • Maintainers will review and provide feedback, if any.
  • Maintainers can unassign issues due to inactivity, read more here.

Refer here for Terms and conditions for the contest.

pixincreate avatar Sep 16 '24 17:09 pixincreate

Hi, I'd like to attempt this, please assign @gorakhnathy7 And are there any prerequisites for this issue?

ShatilKhan avatar Sep 27 '24 18:09 ShatilKhan

Hey @ShatilKhan I see you have requested two issues to be assigned. But, we can only assign you one issue at a time, let me know which one you want to pick first. Thanks!

gorakhnathy7 avatar Sep 28 '24 03:09 gorakhnathy7

Hi @gorakhnathy7 @pixincreate , I would like to work on this issue. Please assign it to me.

Ankesh2004 avatar Oct 01 '24 06:10 Ankesh2004

@gorakhnathy7 I have created the pull request please review it , and tell me if any corrections are required.

Ankesh2004 avatar Oct 01 '24 10:10 Ankesh2004

Sure @Ankesh2004 Kindly wait for it to reviewed from the relevant folks, Thanks for your patience.

gorakhnathy7 avatar Oct 02 '24 09:10 gorakhnathy7