hyperswitch
hyperswitch copied to clipboard
[CYPRESS]: Use the SDK to process a payment.
Title: Verify Make and View a Test Payment
Description:
This task involves testing the "Make a test payment" feature from the homepage. The user will go through the checkout process, entering payment details and viewing the payment summary upon successful payment.
Test Case: Make and View a Test Payment
-
Pre-requisites: None
-
Steps:
- Go to the homepage.
- Click on "Try it out" in the "Make a test payment - Try our unified checkout" message box.
- Verify the user is redirected to the test checkout page.
- Select the currency from the dropdown (e.g., "EUR").
- Enter the amount (77) in the text box.
- Click on "Show preview".
- Verify that the SDK preview is rendered with the following elements:
- "Card number" text box
- "Expiry" text box
- "CVC" text box
- "Save card details" checkbox
- "Pay" button with the currency and amount
- Enter the test card details into the SDK:
- Card Number: 4242 4242 4242 4242
- Expiry: 01/27
- CVC: 492
- Verify that the card details are displayed correctly in the respective text boxes.
- Click on the "Pay" button.
- Verify that the "Payment Successful" message is displayed.
- Click on "Go to payment".
- Verify that the user is redirected to the payment details page.
-
Test Data:
- Currency: EUR
- Amount: 77
- Card Number: 4242 4242 4242 4242
- Expiry: 01/27
- CVC: 492
-
Expected Results:
- The user is redirected to the test checkout page after clicking "Try it out."
- The selected currency ("EUR") should be reflected in the dropdown.
- The amount (77) should be entered and displayed correctly in the text box.
- After clicking "Show preview," the SDK preview should be rendered with all necessary elements (card number, expiry, CVC, etc.).
- Test card details should be entered correctly, and the payment form should reflect the correct input.
- Upon clicking "Pay," a "Payment Successful" message should be displayed.
- The user should be redirected to the payment details page upon clicking "Go to payment."
Acceptance Criteria:
- The test checkout page is accessible from the homepage.
- The currency and amount are correctly entered and reflected in the form.
- The SDK preview renders with the appropriate fields.
- Payment details are correctly submitted, and the payment is processed successfully.
- The user can view the payment details page after successful payment.
This structured format ensures that all steps, test data, and expected outcomes are clearly defined for testing the payment process.