juspay / hyperswitch-web

Hyperswitch Web SDK: A Rescript powered React library for seamless payment integration and customization.
https://hyperswitch.io/
Apache License 2.0
53 stars 59 forks source link

test: add e2e test for card payment for Adyen connector successful flow #749

Open shubhamchasing opened 1 month ago

shubhamchasing commented 1 month ago

Type of Change

Description

Closes: hyperswitch/issues/6082

  1. Added command getIframeElement as cy.iframe as it can only be applied to exactly one iframe at a time edit: using cy.iframe see comment #issuecomment-2436324828
  2. Added e2e test cases for successful card payment for the Adyen connector

    How did you test it?

    Screenshot from 2024-10-24 07-51-44

Checklist

semanticdiff-com[bot] commented 1 month ago

Review changes with  SemanticDiff

Changed Files
| File | Status | | :--- | :--- | | [](https://app.semanticdiff.com/gh/juspay/hyperswitch-web/pull/749/changes#cypress-tests/cypress/support/types.ts)  [cypress\-tests/cypress/support/types\.ts](https://app.semanticdiff.com/gh/juspay/hyperswitch-web/pull/749/changes#cypress-tests/cypress/support/types.ts) | [](https://app.semanticdiff.com/gh/juspay/hyperswitch-web/pull/749/changes#cypress-tests/cypress/support/types.ts)  100% smaller | | [](https://app.semanticdiff.com/gh/juspay/hyperswitch-web/pull/749/changes#cypress-tests/cypress/support/utils.ts)  [cypress\-tests/cypress/support/utils\.ts](https://app.semanticdiff.com/gh/juspay/hyperswitch-web/pull/749/changes#cypress-tests/cypress/support/utils.ts) | [](https://app.semanticdiff.com/gh/juspay/hyperswitch-web/pull/749/changes#cypress-tests/cypress/support/utils.ts)  29% smaller | | [](https://app.semanticdiff.com/gh/juspay/hyperswitch-web/pull/749/changes#cypress-tests/cypress/e2e/adyen-card-flow-e2e-test.cy.ts)  [cypress\-tests/cypress/e2e/adyen\-card\-flow\-e2e\-test\.cy\.ts](https://app.semanticdiff.com/gh/juspay/hyperswitch-web/pull/749/changes#cypress-tests/cypress/e2e/adyen-card-flow-e2e-test.cy.ts) | [](https://app.semanticdiff.com/gh/juspay/hyperswitch-web/pull/749/changes#cypress-tests/cypress/e2e/adyen-card-flow-e2e-test.cy.ts)  0% smaller |
shubhamchasing commented 1 month ago

@Sanskar2001 please review

shubhamchasing commented 1 month ago

I wanna highlight one thing previously I used get because cy.iframe sometimes gives error with iframe selector .adyen-checkout__iframe, I could not find out any specific reason for it but with iframe selector .adyen-checkout__iframe--threeDSIframe it is working fine. I have made the necessary changes.

@Sanskar2001 @seekshiva please look at it, thank you!

Error while using .adyen-checkout__iframe Screenshot from 2024-10-25 00-27-43

shubhamchasing commented 3 weeks ago

I will look requested changes in a few days.

shubhamchasing commented 2 weeks ago

@Sanskar2001 can you please respond to my comments, I wanna close this PR soon

Sanskar2001 commented 2 weeks ago

@Sanskar2001 can you please respond to my comments, I wanna close this PR soon

Hey @shubhamchasing, your task involved testing a normal card payment i.e. no 3DS flow meaning you don't have to test the redirection flow to Adyen Simulator. This task is assigned to someone else.

Could you please resolve the comments and take a pull from main, so that we can proceed?

Thanks!

shubhamchasing commented 2 weeks ago

@Sanskar2001 is there any issue from the backend because I am getting 403 error, I also tried new creds too but issue persit

Sanskar2001 commented 2 weeks ago

@Sanskar2001 is there any issue from the backend because I am getting 403 error, I also tried new creds too but issue persit

@shubhamchasing Yes, there is some maintenance going on. Please try again in some time.

Sanskar2001 commented 2 weeks ago

@Sanskar2001 is there any issue from the backend because I am getting 403 error, I also tried new creds too but issue persit

@shubhamchasing Yes, there is some maintenance going on. Please try again in some time.

@shubhamchasing The maintenance is over. You can start working on it now.

shubhamchasing commented 2 weeks ago

@Sanskar2001 please review

shubhamchasing commented 1 week ago

@Sanskar2001 @seekshiva hey guys please review

shubhamchasing commented 1 week ago

Requested changes are done