Skip to content

feat(Cypress): Add routing test #4768

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

Merged
merged 9 commits into from
Jun 7, 2024
Merged

feat(Cypress): Add routing test #4768

merged 9 commits into from
Jun 7, 2024

Conversation

Sakilmostak
Copy link
Contributor

Type of Change

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

Description

Add service level test for Routing

Additional Changes

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

Motivation and Context

How did you test it?

Tested through Cypress
Screenshot 2024-05-27 at 1 04 52 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

@Sakilmostak Sakilmostak added C-feature Category: Feature request or enhancement C-test Category: Tests labels May 26, 2024
@Sakilmostak Sakilmostak self-assigned this May 26, 2024
@Sakilmostak Sakilmostak requested review from a team as code owners May 26, 2024 19:35
Base automatically changed from service_level_test to main June 4, 2024 12:00
Comment on lines +19 to +34
cy.createConnectorWithNameCallTest(
createConnectorBody,
"adyen",
"payment_processor",
globalState,
);
});

it("stripe-connector-create-call-test", () => {
cy.createConnectorWithNameCallTest(
createConnectorBody,
"stripe",
"payment_processor",
globalState,
);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this function used at multiple places?
If only added for routing test cases still it should be configurable, once discuss this with @vspecky

Copy link
Member

@vspecky vspecky left a comment

Choose a reason for hiding this comment

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

LGTM

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.

Other than that, LGTM

before("seed global state", () => {
cy.task("getGlobalState").then((state) => {
globalState = new State(state);
console.log("seeding globalState -> " + JSON.stringify(globalState));
Copy link
Member

Choose a reason for hiding this comment

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

Can you please remove all the console logs that exposes globalState.
That includes cy.task("cli_log") stuffs as well. Let's keep that them only for debugging.

});
});
after("flush global state", () => {
console.log("flushing globalState -> " + JSON.stringify(globalState));
Copy link
Member

Choose a reason for hiding this comment

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

Here as well.

before("seed global state", () => {
cy.task("getGlobalState").then((state) => {
globalState = new State(state);
console.log("seeding globalState -> " + JSON.stringify(globalState));
Copy link
Member

Choose a reason for hiding this comment

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

Here as well.

});
});
after("flush global state", () => {
console.log("flushing globalState -> " + JSON.stringify(globalState));
Copy link
Member

Choose a reason for hiding this comment

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

Here as well.

before("seed global state", () => {
cy.task("getGlobalState").then((state) => {
globalState = new State(state);
console.log("seeding globalState -> " + JSON.stringify(globalState));
Copy link
Member

Choose a reason for hiding this comment

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

Here as well.

});

after("flush global state", () => {
console.log("flushing globalState -> " + JSON.stringify(globalState));
Copy link
Member

Choose a reason for hiding this comment

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

Here as well.

Comment on lines +20 to +24
console.log("seeding globalState -> " + JSON.stringify(globalState));
cy.task(
"cli_log",
"SEEDING GLOBAL STATE -> " + JSON.stringify(globalState),
);
Copy link
Member

Choose a reason for hiding this comment

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

Remove these

Comment on lines +31 to +34
cy.task(
"cli_log",
" FLUSHING GLOBAL STATE -> " + JSON.stringify(globalState),
);
Copy link
Member

Choose a reason for hiding this comment

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

Remvoe L29 and these.

@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Jun 7, 2024
Merged via the queue into main with commit 39d46fd Jun 7, 2024
10 checks passed
@Gnanasundari24 Gnanasundari24 deleted the cypress_routing_test branch June 7, 2024 10:08
pixincreate added a commit that referenced this pull request Jun 7, 2024
…o cypress-payout-fix

* 'main' of github.com:juspay/hyperswitch:
  feat(Cypress): Add routing test (#4768)
  feat(connector): [BOA] Handle refund status 201 (#4908)

* 'main' of github.com:juspay/hyperswitch:
  feat(Cypress): Add routing test (#4768)
  feat(connector): [BOA] Handle refund status 201 (#4908)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: Feature request or enhancement C-test Category: Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants