Skip to content
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

feat(cypress-test): include worldpay's request / response structure for test suite #6420

Merged
merged 6 commits into from
Oct 30, 2024

Conversation

kashif-m
Copy link
Contributor

Type of Change

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

Description

Described in #6316 point # 4 (read comments)

Additional Changes

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

Motivation and Context

Helps in sanity testing of Worldpay connector.

How did you test it?

Locally using npm run cypress:payments
Screenshot 2024-10-24 at 11 17 11 AM

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

@kashif-m kashif-m requested a review from a team as a code owner October 24, 2024 05:47
Copy link

semanticdiff-com bot commented Oct 24, 2024

@kashif-m kashif-m linked an issue Oct 24, 2024 that may be closed by this pull request
2 tasks
@pixincreate pixincreate added A-CI-CD Area: Continuous Integration/Deployment S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Oct 24, 2024
@pixincreate pixincreate added this to the October 2024 Release milestone Oct 24, 2024
Copy link
Member

@pixincreate pixincreate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this affects almost every connector out there, it would be great if you could run the test against all the connectors once to confirm. yes, multiple connectors do fail due to blockers that cypress cannot handle (at least, until now).

you can make use of scripts/execute_cypress.sh script and run against multiple connectors in parallel.

please refer to README to know more about running in parallel / multiple connectors at once.

Comment on lines +51 to +55
export function getConnectorFlowDetails(connectorData, commonData, key) {
let data = connectorData[key] === undefined ? commonData[key] : connectorData[key];
return data;
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we could do a deep merge of commons.js and <connector>.js in a safer way that does not overrides the existing configs from <connector>.js, this change would never be needed.

as discussed, deep merge will for sure add overhead, but would reduce complexity is what i feel.

this should also work, but i do think this will have a very limited scope of use.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does have a very limited scope as of now, we can remove this once we introduce custom deep merge (merge everything except Response). But we can let it be for now, since it's out of scope of this PR

@likhinbopanna likhinbopanna added this pull request to the merge queue Oct 30, 2024
Merged via the queue into main with commit 8372389 Oct 30, 2024
17 checks passed
@likhinbopanna likhinbopanna deleted the worldpay-cypress-test-cases branch October 30, 2024 10:11
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI-CD Area: Continuous Integration/Deployment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[REFACTOR] Worldpay payments integration
5 participants