-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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): Add 3DS flow test for connectors #4454
Conversation
"connector_metadata": { | ||
"noon": { | ||
"order_category": "pay" | ||
} | ||
}, |
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.
Could you move this connector specific metadata to connector utils?
"connector_metadata": { | ||
"noon": { | ||
"order_category": "pay" | ||
} | ||
}, |
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.
same here, move this to connector utils
@@ -9,7 +9,7 @@ | |||
"api_key": "api-key", | |||
"key1": "value1" | |||
}, | |||
"test_mode": false, | |||
"test_mode": true, |
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.
Wouldn't this affect other connectors? From what I know, this is needed only for specific connectors like Mollie
?
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.
No test_mode should be true only for sandbox and for all connector.
It wont affect any connectors if its true
} | ||
|
||
else { | ||
// If connectorId is not "adyen", wait for 10 seconds |
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 think we can change the comment to something like:
// If connectorId is not "adyen", wait for 10 seconds | |
// If connectorId is neither of adyen, trustpay, nmi, stripe, bankofamerica or cybersource, wait for 10 seconds |
else if (globalState.get("connectorId") === "trustpay" ) { | ||
cy.get('form[name="challengeForm"]',{ timeout: 10000 }).should('exist').then(form => { | ||
cy.get('#outcomeSelect').select('Approve').should('have.value', 'Y') | ||
cy.get('button[type="submit"]').click(); | ||
}) | ||
} | ||
else if (globalState.get("connectorId") === "nmi" || globalState.get("connectorId") === "noon") { | ||
cy.get('iframe',{ timeout: 100000 }) | ||
.its('0.contentDocument.body') | ||
.within((body) => { | ||
cy.get('iframe',{ timeout: 10000 }) | ||
.its('0.contentDocument.body') | ||
.within((body) => { | ||
cy.get('form[name="cardholderInput"]',{ timeout: 10000 }).should('exist').then(form => { | ||
cy.get('input[name="challengeDataEntry"]').click().type("1234"); | ||
cy.get('input[value="SUBMIT"]').click(); | ||
}) | ||
}) | ||
}) | ||
} | ||
|
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, can we have this if else block to be in alphabetical order of connector names for easier look ups? We will anyway move this to a separate file so that we can have all redirection in one place.
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.
Sure I made the change
🤦♂️ |
Type of Change
Description
Added 3ds flow testcases for adyen,nmi,cybersource,bankofamerica,trustpay connector in cypress.
Additional Changes
Motivation and Context
3DS testcases were failing in pipeline
How did you test it?
Adyen
cybersource
Bankofamerica
trustpay
Testcases running for entire changes
Cybersource
Checklist
cargo +nightly fmt --all
cargo clippy