hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

[CYPRESS]: Check the payment details on the payment operation page.

Open JeevaRamu0104 opened this issue 5 months ago • 2 comments


Title: Comprehensive Test Cases for "Payment Operations" Page


Description:

This task is to write and execute automated test cases for various UI elements and functionalities on the "Payment Operations" page. The tests should validate that key UI elements are present and that core functionalities operate as expected.

Objective:

Ensure that the "Payment Operations" page displays all key elements and that interactions like searching, filtering, and report generation work as intended. The task will include multiple test cases covering these areas.


Test Cases:

Test Case 1: Verify Default Elements on "Payment Operations" Page

  • Pre-requisites: User must be logged in.
  • Steps:
    1. Navigate to the "Payment Operations" page using the side menu.
    2. Verify the search box is present with the placeholder "Search payment id."
    3. Verify the dropdown to select the time range is present.
    4. Verify the "Add Filters" button is present and visible.
    5. Verify the "Generate reports" button is present and visible.
    6. Verify the "Customize columns" button is present and visible.
  • Expected Results:
    • Redirects to "Payment Operations" page.
    • Search box should be present with placeholder "Search payment id."
    • Dropdown should be visible.
    • "Add Filters" button should be present and visible.
    • "Generate reports" button should be present and visible.
    • "Customize columns" button should be present and visible.

Test Case 2: Verify No Payments Message

  • Pre-requisites: Payment Operations page should have no payments.
  • Steps:
    1. Login to an existing user account.
    2. Navigate to the "Payment Operations" page.
  • Expected Results:
    • The page should display a message: "There are no payments as of now."

Test Case 3: Verify Payments Displayed

  • Pre-requisites: Make 3 payments.
  • Steps:
    1. Login to the application.
    2. Navigate to the "Payment Operations" page.
  • Expected Results:
    • 3 payments should be present in the table with valid payment details.
    • The table should contain the following columns:
      • S.No
      • Payment ID
      • Connector
      • Connector Transaction ID
      • Amount
      • Payment Status
      • Payment Method
      • Payment Method Type
      • Card Network
      • Customer Email
      • Merchant Order Reference Id
      • Description
      • Metadata
      • Created

Test Case 4: Customize Columns in Payments Table

  • Pre-requisites: Make a payment.
  • Steps:
    1. Login to the application.
    2. Navigate to the "Payment Operations" page.
    3. Click on the "Customize Columns" button.
    4. Verify that the following column names are present:
      • Merchant Order Reference Id
      • Metadata
      • Payment Status
      • Payment Method Type
      • Payment Method
      • Payment ID
      • Customer Email
      • Description
      • Created
      • Connector Transaction ID
      • Connector
      • Amount
      • AmountCapturable
      • Authentication Type
      • Profile Id
      • Capture Method
      • Client Secret
      • Currency
      • Customer ID
      • Merchant ID
      • Setup Future Usage
      • Attempt count
    5. Select all columns.
    6. Click on "22 Columns selected."
    7. Click on the "Customize Columns" button.
    8. Unselect all optional columns:
      • AmountCapturable
      • Authentication Type
      • Profile Id
      • Capture Method
      • Client Secret
      • Currency
      • Customer ID
      • Merchant ID
      • Setup Future Usage
      • Attempt count
    9. Click on "12 Columns selected."
  • Expected Results:
    • All selected columns should be present and visible in the payments table.
    • Only the selected columns should be visible after unselecting optional columns.

Test Case 5: Search Columns in "Customize Columns" List

  • Pre-requisites: User is logged in.
  • Steps:
    1. Navigate to the "Payment Operations" page.
    2. Click on the "Customize Columns" button.
    3. Verify that the search bar has the placeholder "Search in 22 options."
    4. Search for any available column names such as "Merchant," "Profile," "Payments."
  • Expected Results:
    • Resulting column names should contain the search string.

Test Case 6: Search Invalid Columns in "Customize Columns" List

  • Pre-requisites: User is logged in.
  • Steps:
    1. Navigate to the "Payment Operations" page.
    2. Click on the "Customize Columns" button.
    3. Verify that the search bar has the placeholder "Search in 22 options."
    4. Search for invalid column names such as "abacd," "something," "createdAt."
  • Expected Results:
    • "No matching records found" text should be shown.
    • Clicking on the "X" button should clear the search text and display all column names.

Test Case 7: Search for Payment Using Existing Payment ID

  • Pre-requisites: Make a payment.
  • Steps:
    1. Login to the application.
    2. Navigate to the "Payment Operations" page.
    3. Enter an existing payment ID into the search bar.
  • Test Data: {{payment_id}}
  • Expected Results:
    • Payments table should contain one row with valid payment details.

Test Case 8: Search for Payment Using Invalid Payment ID

  • Pre-requisites: User is logged in.
  • Steps:
    1. Navigate to the "Payment Operations" page.
    2. Enter an invalid payment ID or string into the search bar.
  • Test Data: "abacd," "something," "createdAt"
  • Expected Results:
    • "There are no payments as of now" text should be displayed.
    • "Customize columns" button should not be present.

Test Case 9: Verify Time Range Filters

  • Pre-requisites: Make a payment.
  • Steps:
    1. Login to the application.
    2. Navigate to the "Payment Operations" page.
    3. Verify the default time range is "Last 30 Days."
    4. Click on the time range dropdown and select various options: "Last 30 Mins," "Last 1 Hour," "Last 2 Hours," etc.
  • Expected Results:
    • For each selected time range, verify the payments are displayed accordingly.
    • "Customize columns" button visibility should be checked based on the presence of payments.

Test Case 10: Verify "Custom Range" in Time Range Filters

  • Pre-requisites: Make a payment.
  • Steps:
    1. Login to the application.
    2. Navigate to the "Payment Operations" page.
    3. Select "Custom Range" in the time range dropdown.
    4. Select a custom date range and click "Apply."
  • Expected Results:
    • Payments within the selected range should be displayed.
    • The selected time range should be displayed when the dropdown is minimized.

Test Case 11: Generate Payment Reports

  • Pre-requisites: Make a payment.
  • Steps:
    1. Login to the application.
    2. Navigate to the "Payment Operations" page.
    3. Click on "Generate Reports."
    4. Select a time range and click "Generate."
  • Expected Results:
    • A "Generate Payment Reports" popup should appear.
    • An "Email sent" popup should appear.
    • Check mail inbox for a CSV file with payment details.

Test Case 12: Verify "Copy to Clipboard" Button for Payment ID

  • Pre-requisites: Make a payment.
  • Steps:
    1. Login to the application.
    2. Navigate to the "Payment Operations" page.
    3. Click on the "Copy" button beside a payment ID.
    4. Paste the copied ID in the payment search box and hit "Enter."
  • Expected Results:
    • Payment ID should be copied to the clipboard.
    • The ID should appear in the search box, and the resulting entry should contain the same payment ID.

Test Case 13: Verify "Open in New Tab" Button for Payment ID

  • Pre-requisites: Make a payment.
  • Steps:
    1. Login to the application.
    2. Navigate to the "Payment Operations" page.
    3. Click on the "Open in new tab" button beside a payment ID.
  • Expected Results:
    • The payment page should open in a new tab.

Acceptance Criteria:

  1. All test cases should pass with the expected results.
  2. Each test case must verify the required functionality or UI element.
  3. The tests should be included in the regression suite and executed in the CI/CD pipeline.

JeevaRamu0104 avatar Sep 13 '24 07:09 JeevaRamu0104