hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

🧪(test): Verify Payment Operations test cases

Open shreyT19 opened this issue 1 year ago • 4 comments

This commit adds a new test case for the Payment Operations page. The test verifies the presence of default elements on the page, such as the search box, time range dropdown, filter options, and buttons. The test ensures that the page is functioning correctly and displays the expected elements.

Refactor commands.js

This commit refactors the commands.js file by adding new custom commands. The new commands include getByTestId, clickOnElementWithText, and navigateFromSideMenu. These commands enhance the readability and reusability of the test code by providing convenient shortcuts for common actions.

Type of Change

  • [ ] Bugfix
  • [ ] New feature
  • [x] Enhancement
  • [ ] Refactoring
  • [ ] Dependency updates
  • [ ] Documentation
  • [ ] CI/CD

Description

resolves https://github.com/juspay/hyperswitch/issues/6133

Additional Changes

  • [ ] This PR modifies the API contract
  • [ ] This PR modifies the database schema
  • [ ] This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Checklist

  • [ ] I formatted the code cargo +nightly fmt --all
  • [ ] I addressed lints thrown by cargo clippy
  • [ ] I reviewed the submitted code
  • [ ] I added unit tests for my changes where possible

shreyT19 avatar Oct 02 '24 22:10 shreyT19

Review changes with SemanticDiff.

Analyzed 2 of 2 files.

Filename Status
:heavy_check_mark: cypress-tests/cypress/support/commands.js Analyzed
:heavy_check_mark: cypress-tests/cypress/e2e/PaymentTest/00022-PaymentOperations.cy.js Analyzed

semanticdiff-com[bot] avatar Oct 02 '24 22:10 semanticdiff-com[bot]

Hey @shreyT19 Kindly link the issue to PR

gorakhnathy7 avatar Oct 03 '24 05:10 gorakhnathy7

Hey @gorakhnathy7 Can you please guide me on how to link a pull request to an issue? I am unable to find the option for some reason. It used to be the development option on the right but there seems to be no option there

shreyT19 avatar Oct 03 '24 08:10 shreyT19

you can update the description by putting closes #<issue_number>

pixincreate avatar Oct 03 '24 08:10 pixincreate

Also i am getting error while trying to run cypress in headless mode : CypressError:cy.request()must be provided a fully qualifiedurl- one that begins withhttp. By default cy.request()will use either the current window's origin or thebaseUrlincypress.config.js. Neither of those values were present.

shreyT19 avatar Oct 04 '24 04:10 shreyT19

Hey @shreyT19, I do not think the PR is in right place. Control center is where you need to raise the PR instead given the parent issue is in that repository.

Cypress in control center does not a README of its own at the moment, you can refer to the README of either Cypress v1 or Cypress v2 for detailed guide.

CC: @JeevaRamu0104 @prajwalnl0

pixincreate avatar Oct 04 '24 05:10 pixincreate

Hey, thanks for pointing out! I'll make a PR in the control center repo.

shreyT19 avatar Oct 04 '24 05:10 shreyT19