-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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): Added Config Testcases #6622
base: main
Are you sure you want to change the base?
Conversation
Changed Files |
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.
minor nit picks so that the code is more readable.
]; | ||
let req_data = data["Request"]; | ||
let res_data = data["Response"]; | ||
cy.citForMandatesCallTest( | ||
fixtures.citConfirmBody, | ||
req_data, | ||
res_data, | ||
0, | ||
true, | ||
"automatic", | ||
"setup_mandate", | ||
globalState | ||
); | ||
if (should_continue) |
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.
]; | |
let req_data = data["Request"]; | |
let res_data = data["Response"]; | |
cy.citForMandatesCallTest( | |
fixtures.citConfirmBody, | |
req_data, | |
res_data, | |
0, | |
true, | |
"automatic", | |
"setup_mandate", | |
globalState | |
); | |
if (should_continue) | |
]; | |
let req_data = data["Request"]; | |
let res_data = data["Response"]; | |
cy.citForMandatesCallTest( | |
fixtures.citConfirmBody, | |
req_data, | |
res_data, | |
0, | |
true, | |
"automatic", | |
"setup_mandate", | |
globalState | |
); | |
if (should_continue) |
false, //collect_shipping_address_from_wallet_connector | ||
false, //always_collect_billing_address_from_wallet_connector | ||
false, //always_collect_shipping_address_from_wallet_connector |
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.
false, //collect_shipping_address_from_wallet_connector | |
false, //always_collect_billing_address_from_wallet_connector | |
false, //always_collect_shipping_address_from_wallet_connector | |
false, // collect_shipping_address_from_wallet_connector | |
false, // always_collect_billing_address_from_wallet_connector | |
false, // always_collect_shipping_address_from_wallet_connector |
false, //collect_shipping_address_from_wallet_connector | ||
false, //always_collect_billing_address_from_wallet_connector | ||
false, //always_collect_shipping_address_from_wallet_connector |
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.
false, //collect_shipping_address_from_wallet_connector | |
false, //always_collect_billing_address_from_wallet_connector | |
false, //always_collect_shipping_address_from_wallet_connector | |
false, // collect_shipping_address_from_wallet_connector | |
false, // always_collect_billing_address_from_wallet_connector | |
false, // always_collect_shipping_address_from_wallet_connector |
false, //collect_shipping_address_from_wallet_connector | ||
false, //always_collect_billing_address_from_wallet_connector | ||
false, //always_collect_shipping_address_from_wallet_connector |
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.
false, //collect_shipping_address_from_wallet_connector | |
false, //always_collect_billing_address_from_wallet_connector | |
false, //always_collect_shipping_address_from_wallet_connector | |
false, // collect_shipping_address_from_wallet_connector | |
false, // always_collect_billing_address_from_wallet_connector | |
false, // always_collect_shipping_address_from_wallet_connector |
import getConnectorDetails, * as utils from "../PaymentUtils/Utils"; | ||
let globalState; | ||
describe("Config Tests", () => { |
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.
import getConnectorDetails, * as utils from "../PaymentUtils/Utils"; | |
let globalState; | |
describe("Config Tests", () => { | |
import getConnectorDetails, * as utils from "../PaymentUtils/Utils"; | |
let globalState; | |
describe("Config Tests", () => { |
false, //collect_shipping_address_from_wallet_connector | ||
true, //always_collect_billing_address_from_wallet_connector | ||
false, //always_collect_shipping_address_from_wallet_connector |
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.
false, //collect_shipping_address_from_wallet_connector | |
true, //always_collect_billing_address_from_wallet_connector | |
false, //always_collect_shipping_address_from_wallet_connector | |
false, // collect_shipping_address_from_wallet_connector | |
true, // always_collect_billing_address_from_wallet_connector | |
false, // always_collect_shipping_address_from_wallet_connector |
]["PaymentIntentOffSession"]; | ||
let req_data = data["Request"]; | ||
let res_data = data["Response"]; | ||
cy.createPaymentIntentTest( | ||
fixtures.createPaymentBody, | ||
req_data, | ||
res_data, | ||
"no_three_ds", | ||
"automatic", | ||
globalState | ||
); | ||
if (should_continue) |
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.
]["PaymentIntentOffSession"]; | |
let req_data = data["Request"]; | |
let res_data = data["Response"]; | |
cy.createPaymentIntentTest( | |
fixtures.createPaymentBody, | |
req_data, | |
res_data, | |
"no_three_ds", | |
"automatic", | |
globalState | |
); | |
if (should_continue) | |
]["PaymentIntentOffSession"]; | |
let req_data = data["Request"]; | |
let res_data = data["Response"]; | |
cy.createPaymentIntentTest( | |
fixtures.createPaymentBody, | |
req_data, | |
res_data, | |
"no_three_ds", | |
"automatic", | |
globalState | |
); | |
if (should_continue) |
false, //collect_shipping_address_from_wallet_connector | ||
false, //always_collect_billing_address_from_wallet_connector | ||
false, //always_collect_shipping_address_from_wallet_connector | ||
globalState |
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.
false, //collect_shipping_address_from_wallet_connector | |
false, //always_collect_billing_address_from_wallet_connector | |
false, //always_collect_shipping_address_from_wallet_connector | |
globalState | |
false, // collect_shipping_address_from_wallet_connector | |
false, // always_collect_billing_address_from_wallet_connector | |
false, // always_collect_shipping_address_from_wallet_connector | |
globalState |
]["PaymentIntentOffSession"]; | ||
let req_data = data["Request"]; | ||
let res_data = data["Response"]; | ||
cy.createPaymentIntentTest( | ||
fixtures.createPaymentBody, | ||
req_data, | ||
res_data, | ||
"no_three_ds", | ||
"automatic", | ||
globalState | ||
); | ||
if (should_continue) | ||
should_continue = utils.should_continue_further(res_data); | ||
}); | ||
it("payment_methods-call-test", () => { |
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.
]["PaymentIntentOffSession"]; | |
let req_data = data["Request"]; | |
let res_data = data["Response"]; | |
cy.createPaymentIntentTest( | |
fixtures.createPaymentBody, | |
req_data, | |
res_data, | |
"no_three_ds", | |
"automatic", | |
globalState | |
); | |
if (should_continue) | |
should_continue = utils.should_continue_further(res_data); | |
}); | |
it("payment_methods-call-test", () => { | |
]["PaymentIntentOffSession"]; | |
let req_data = data["Request"]; | |
let res_data = data["Response"]; | |
cy.createPaymentIntentTest( | |
fixtures.createPaymentBody, | |
req_data, | |
res_data, | |
"no_three_ds", | |
"automatic", | |
globalState | |
); | |
if (should_continue) | |
should_continue = utils.should_continue_further(res_data); | |
}); | |
it("payment_methods-call-test", () => { |
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 all this into a single file? preferably business-profile.json
and keep them all as objects like we've done in v2
? that way you will not have the need to keep multiple files for one area viz., business-profile
.
at present, we've 2 files namely,
- `create-business-profile.json
update-business-profile.json
and both of these have at max 3 lines.
we can merge them into one and call them via objects in .cy.js
files.
Type of Change
Description
Added below config related testcases in cypress
"collect_shipping_details_from_wallet_connector"
"collect_billing_details_from_wallet_connector"
"always_collect_billing_details_from_wallet_connector"
"always_collect_shipping_details_from_wallet_connector"
Additional Changes
Motivation and Context
To validate the config changes in automation
How did you test it?
Ran locally
Checklist
cargo +nightly fmt --all
cargo clippy