New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci(cypress): Trustpay collection fix #4410
base: refactor-cypress-for-more-control
Are you sure you want to change the base?
ci(cypress): Trustpay collection fix #4410
Conversation
…en-capture-status-handle * 'main' of github.com:juspay/hyperswitch: ci(cypress): Add save card flow (#4327)
…en-capture-status-handle * 'main' of github.com:juspay/hyperswitch: feat(router): add retrieve poll status api (#4358)
…press-for-more-control * 'main' of github.com:juspay/hyperswitch: feat(payments): add amount and connector id filter in list (#4354) feat(connector): [NMI] External 3DS flow for Cards (#4385) test(cypress): Update ConnectorAuth Details (#4386) chore(version): 2024.04.18.0 fix(router): make payment_instrument optional (#4389) fix(config): remove `merchant_business_country` from the connector configs as enums can not be handled in this toml file (#4383) feat(payment_link): Add support for saved payment method option for payment link (#4373)
d7c9e96
to
1a792e0
Compare
@@ -25,7 +25,7 @@ | |||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) | |||
|
|||
// commands.js or your custom support file | |||
import ConnectorAuthDetails from "../../../.github/secrets/creds.json"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pixincreate We can add the path as env then everyone would just export the path instead of updating it here!
We can take up that change in this pr may be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@likhinbopanna is the change mentioned above is done?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have just reverted the connectorAuthDetails and that is done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take this up and update it on my PR or raise another PR targeting this branch so that no conflicts would occur...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also @likhinbopanna Could you add the test screenshot of assertions added for trustpay?
@@ -25,7 +25,7 @@ | |||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) | |||
|
|||
// commands.js or your custom support file | |||
import ConnectorAuthDetails from "../../../.github/secrets/creds.json"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pixincreate We can add the path as env then everyone would just export the path instead of updating it here!
We can take up that change in this pr may be?
if (response.body.hasOwnProperty("status")) { | ||
expect(response.body).to.have.property("status"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we have a check for status code, if it is 2xx, they we always expect status, if 4xx, we ll always expect error code and message
else if(response.body.error.type === "invalid_request") { | ||
if(response.body.error.message === "Payment method type not supported") { | ||
expect(response.body.error).to.deep.equal(Errors.paymentMethodErrors[globalState.get("connectorId")].paymentMethodUnsupportedError); | ||
} | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move this to manual
else if block, since we are explicitly saying Manual Capture for trustpay is not supported
0db9ca3
to
fb73ec0
Compare
Type of Change
Description
Fixed manual capture flow for Trustpay collection in cypress tool as manual capture is not supported for Trustpay and I've fixed the assertion since Trustpay and Bluesnap don't support mandates
Additional Changes
Motivation and Context
Trustpay and bluesnap collections were failing in cypress automation
How did you test it?
Checklist
cargo +nightly fmt --all
cargo clippy