Skip to content

Conversation

pixincreate
Copy link
Member

@pixincreate pixincreate commented Jan 17, 2025

Type of Change

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

Description

  • enabled video recording for tests that fail
  • cybersource connector in github ci, randomly goes through frictionless flow without challenge which results in certain expected elements to go missing resulting in respective tests to fail
  • this pr forces cybersource to use frictionless card for 3ds
  • remove adyenplatform connector from running in github ci

closes #7058

Additional Changes

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

Motivation and Context

ci checks

How did you test it?

this issue is not reproducible in local but only in github ci. so, the ci check should never fail!

image

Checklist

  • I formatted the code npm run format
  • I addressed lints thrown by npm run lint
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

force it to wait until the page loads. this is more sophisticated,
reliable, and safer
@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 Jan 17, 2025
@pixincreate pixincreate added this to the December 2024 Release milestone Jan 17, 2025
@pixincreate pixincreate self-assigned this Jan 17, 2025
Copy link

semanticdiff-com bot commented Jan 17, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  cypress-tests/cypress/support/redirectionHandler.js  48% smaller
  .github/workflows/cypress-tests-runner.yml Unsupported file format
  cypress-tests/.gitignore Unsupported file format
  cypress-tests/cypress.config.js  0% smaller
  cypress-tests/cypress/e2e/PaymentUtils/Cybersource.js  0% smaller
  cypress-tests/cypress/support/e2e.js  0% smaller

…urce-inconsistency

* 'main' of github.com:juspay/hyperswitch:
  chore(version): 2025.01.20.0
  fix(relay): populate connector metadata in the refunds flow (#7045)
  fix(connector): [NETCETERA] add accept-language in browser_information for netcetera authentication request (#7059)
  chore: Update readme with juspay's vision, product offering, architecture diagram, setup steps and output (#7024)
  chore: update creds (#7054)
@@ -14,7 +14,7 @@ env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
PAYMENTS_CONNECTORS: "cybersource stripe"
PAYOUTS_CONNECTORS: "adyenplatform wise"
PAYOUTS_CONNECTORS: "wise"
Copy link
Member Author

Choose a reason for hiding this comment

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

we've removed adyenplatform from running since connector throws 5xx

Comment on lines +32 to +43
on("after:spec", (spec, results) => {
if (results && results.video) {
// Do we have failures for any retry attempts?
const failures = results.tests.some((test) =>
test.attempts.some((attempt) => attempt.state === "failed")
);
if (!failures) {
// delete the video if the spec passed and no tests retried
fs.unlinkSync(results.video);
}
}
});
Copy link
Member Author

Choose a reason for hiding this comment

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

we've enabled video recording in L63. Since we do not want to keep the whole recording but only for the tests that fail, this section is necessary to keep the report clean

@@ -12,7 +12,7 @@ const successfulNo3DSCardDetails = {
};

const successfulThreeDSTestCardDetails = {
card_number: "4000000000001091",
card_number: "4000000000002701",
Copy link
Member Author

@pixincreate pixincreate Jan 20, 2025

Choose a reason for hiding this comment

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

this card forces cybersource 3ds to go through the friction less flow

Comment on lines 317 to 319
} else if (connectorId === "cybersource") {
cy.url({ timeout: TIMEOUT }).should("include", expected_url.origin);
return;
Copy link
Member Author

Choose a reason for hiding this comment

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

frictionless flow.

@likhinbopanna, do you think we need return here?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not necessarily

…urce-inconsistency

* 'main' of github.com:juspay/hyperswitch:
  refactor(payment-link): use shouldRemoveBeforeUnloadEvents flag for handling removal of beforeunload events through SDK (#7072)
  refactor(router): refactor ctp flow to fetch mca_id and get the connector creds instead of connector_name (#6859)
@pixincreate pixincreate force-pushed the fix-cybersource-inconsistency branch from 39e1481 to f74edab Compare January 20, 2025 17:15
@pixincreate pixincreate marked this pull request as ready for review January 20, 2025 17:38
@pixincreate pixincreate requested review from a team as code owners January 20, 2025 17:38
likhinbopanna
likhinbopanna previously approved these changes Jan 20, 2025
This reverts commit f74edab.
likhinbopanna
likhinbopanna previously approved these changes Jan 20, 2025
SanchithHegde
SanchithHegde previously approved these changes Jan 20, 2025
Copy link
Member

@SanchithHegde SanchithHegde left a comment

Choose a reason for hiding this comment

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

CI workflow changes look good to me!

});
} else if (connectorId === "cybersource") {
cy.url({ timeout: TIMEOUT }).should("include", expected_url.origin);
return; // this is mandatory, else refunds section will fail with unhandled promise rejections even though it is handled
Copy link
Member Author

Choose a reason for hiding this comment

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

i want this to be removed. will consider this as a separate pr

@likhinbopanna likhinbopanna removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Jan 21, 2025
@likhinbopanna likhinbopanna added this pull request to the merge queue Jan 21, 2025
Merged via the queue into main with commit 90c932a Jan 21, 2025
18 of 20 checks passed
@likhinbopanna likhinbopanna deleted the fix-cybersource-inconsistency branch January 21, 2025 07:06
pixincreate added a commit that referenced this pull request Jan 24, 2025
…d-memory-cache

* 'main' of github.com:juspay/hyperswitch: (38 commits)
  fix(cypress): uncaught exceptions thrown by `hyperswitch.io` (#7092)
  ci(workflows): Add code coverage reporting for v2 (#6884)
  chore(version): 2025.01.23.0
  refactor: [CYBERSOURCE, BANKOFAMERICA, WELLSFARGO] Move code to crate hyperswitch_connectors (#6908)
  Documentation edits made through Mintlify web editor
  chore: enable 128-column-tables feature for diesel crate (#6857)
  feat(connector): [ADYEN ] Consume transaction id for PaymentsPreProcessing error (#7061)
  chore(version): 2025.01.22.0
  feat(routing): Integrate global success rates (#6950)
  feat(email): Add mailhog by default in docker-compose for local smtp server (#6869)
  refactor: check allowed payment method types in enabled options (#7019)
  feat(router): add payment method-specific features to connector feature list (#6963)
  Refactor: Customer email and browser Information (#7034)
  feat(connectors): fiuu,novalnet,worldpay - extend NTI flows (#6946)
  fix(cypress): address cybersource redirection inconsistency (#7057)
  chore(version): 2025.01.21.0
  refactor(payment-link): use shouldRemoveBeforeUnloadEvents flag for handling removal of beforeunload events through SDK (#7072)
  refactor(router): refactor ctp flow to fetch mca_id and get the connector creds instead of connector_name (#6859)
  chore(version): 2025.01.20.0
  fix(relay): populate connector metadata in the refunds flow (#7045)
  ...
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.

fix cybersource cypress redirection
3 participants