diff --git a/CHANGELOG.md b/CHANGELOG.md index 0777d5464..014233db3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,55 @@ All notable changes to this project will be documented in this file. See [conven - - - +## 2024.10.08.0 + +### Features + +- Add auto retries in payment settings ([#1551](https://github.com/juspay/hyperswitch-control-center/pull/1551)) ([`78479fa`](https://github.com/juspay/hyperswitch-control-center/commit/78479fade99cc04b115a8c40924ade9c9ae38606)) + +### Miscellaneous Tasks + +- Ran prettier command to format unformatted file ([#1566](https://github.com/juspay/hyperswitch-control-center/pull/1566)) ([`66e2063`](https://github.com/juspay/hyperswitch-control-center/commit/66e206350e60989068206c29ffd63d30fad7f094)) + +**Full Changelog:** [`2024.10.07.1...2024.10.08.0`](https://github.com/juspay/hyperswitch-control-center/compare/2024.10.07.1...2024.10.08.0) + +- - - + +## 2024.10.07.1 + +### Features + +- Payments overview section ([#1552](https://github.com/juspay/hyperswitch-control-center/pull/1552)) ([`06dae63`](https://github.com/juspay/hyperswitch-control-center/commit/06dae6364e3cb481a1321bb302f29f4052b8c338)) + +### Bug Fixes + +- Prod x feature deployment ([#127](https://github.com/juspay/hyperswitch-control-center/pull/127)) ([`6a9e9ab`](https://github.com/juspay/hyperswitch-control-center/commit/6a9e9abd0c492e59eebe5c4ad4c0b1e47a736513)) +- Api not getting called due to user permission data not updated ([#1565](https://github.com/juspay/hyperswitch-control-center/pull/1565)) ([`ad7d230`](https://github.com/juspay/hyperswitch-control-center/commit/ad7d23080039e77758fd52330bad664590d6d4f3)) + +### Refactors + +- Code changes ([#1550](https://github.com/juspay/hyperswitch-control-center/pull/1550)) ([`ba9ead3`](https://github.com/juspay/hyperswitch-control-center/commit/ba9ead301fc0d2d2a01c2e2410fb8dd88a4e3551)) + +**Full Changelog:** [`2024.10.07.0...2024.10.07.1`](https://github.com/juspay/hyperswitch-control-center/compare/2024.10.07.0...2024.10.07.1) + +- - - + +## 2024.10.07.0 + +### Features + +- Compare function ([#1542](https://github.com/juspay/hyperswitch-control-center/pull/1542)) ([`938ccc7`](https://github.com/juspay/hyperswitch-control-center/commit/938ccc7bc2e83cf149b6c9660d28dd3275b6a128)) +- Added graphs header ([#1539](https://github.com/juspay/hyperswitch-control-center/pull/1539)) ([`583ddf2`](https://github.com/juspay/hyperswitch-control-center/commit/583ddf2f3672d2bc04cabd9e6b6eb848e1e5dfca)) +- Add scroll for merchant, org, and profile dropdowns ([#1537](https://github.com/juspay/hyperswitch-control-center/pull/1537)) ([`3bee31c`](https://github.com/juspay/hyperswitch-control-center/commit/3bee31cbb86952b4ece81902f7f9ff0d6cd6670c)) + +### Testing + +- Creation of dummy connector using cypress ([#1497](https://github.com/juspay/hyperswitch-control-center/pull/1497)) ([`f040964`](https://github.com/juspay/hyperswitch-control-center/commit/f040964457cdd557bf5c8a414d72ce265a51e741)) + +**Full Changelog:** [`2024.10.04.0...2024.10.07.0`](https://github.com/juspay/hyperswitch-control-center/compare/2024.10.04.0...2024.10.07.0) + +- - - + ## 2024.10.04.0 ### Miscellaneous Tasks diff --git a/config/config.toml b/config/config.toml index bf8043abf..80696aa4f 100644 --- a/config/config.toml +++ b/config/config.toml @@ -48,3 +48,4 @@ new_analytics=false down_time=false tax_processor=true transaction_view=false +x_feature_route=false diff --git a/cypress/e2e/connector/connector.cy.js b/cypress/e2e/connector/connector.cy.js new file mode 100644 index 000000000..3241f2d5e --- /dev/null +++ b/cypress/e2e/connector/connector.cy.js @@ -0,0 +1,72 @@ +describe("connector", () => { + const username = `cypress${Math.round(+new Date() / 1000)}@gmail.com`; + const password = "Cypress98#"; + + // Login before each testcase + beforeEach(() => { + cy.visit("http://localhost:9000/dashboard/login"); + cy.url().should("include", "/login"); + cy.get("[data-testid=card-header]").should( + "contain", + "Hey there, Welcome back!", + ); + cy.get("[data-testid=card-subtitle]") + .should("contain", "Sign up") + .click({ force: true }); + cy.url().should("include", "/register"); + cy.get("[data-testid=auth-submit-btn]").should("exist"); + cy.get("[data-testid=tc-text]").should("exist"); + cy.get("[data-testid=footer]").should("exist"); + + cy.get("[data-testid=email]").type(username); + cy.get("[data-testid=password]").type(password); + cy.get('button[type="submit"]').click({ force: true }); + cy.get("[data-testid=skip-now]").click({ force: true }); + + cy.url().should("include", "/dashboard/home"); + }); + + it("Create a dummy connector", () => { + cy.url().should("include", "/dashboard/home"); + + cy.get('[data-form-label="Business name"]').should("exist"); + cy.get("[data-testid=merchant_name]").type("test_business"); + cy.get("[data-button-for=startExploring]").click(); + cy.reload(true); + cy.get("[data-testid=connectors]").click(); + cy.get("[data-testid=paymentprocessors]").click(); + cy.contains("Payment Processors").should("be.visible"); + cy.contains("Connect a Dummy Processor").should("be.visible"); + cy.get("[data-button-for=connectNow]").click({ + force: true, + }); + cy.get('[data-component="modal:Connect a Dummy Processor"]', { + timeout: 10000, + }) + .find("button") + .should("have.length", 4); + cy.contains("Stripe Dummy").should("be.visible"); + cy.get('[data-testid="stripe_test"]').find("button").click({ force: true }); + cy.url().should("include", "/dashboard/connectors"); + cy.contains("Credentials").should("be.visible"); + cy.get("[name=connector_account_details\\.api_key]") + .clear() + .type("dummy_api_key"); + cy.get("[name=connector_label]").clear().type("stripe_test_default_label"); + cy.get("[data-button-for=connectAndProceed]").click(); + cy.get("[data-testid=credit_select_all]").click(); + cy.get("[data-testid=credit_mastercard]").click(); + cy.get("[data-testid=debit_cartesbancaires]").click(); + cy.get("[data-testid=pay_later_klarna]").click(); + cy.get("[data-testid=wallet_we_chat_pay]").click(); + cy.get("[data-button-for=proceed]").click(); + cy.get('[data-toast="Connector Created Successfully!"]', { + timeout: 10000, + }).click(); + cy.get("[data-button-for=done]").click(); + cy.url().should("include", "/dashboard/connectors"); + cy.contains("stripe_test_default_label") + .scrollIntoView() + .should("be.visible"); + }); +}); diff --git a/public/hyperswitch/assets/smart-retry.svg b/public/hyperswitch/assets/smart-retry.svg new file mode 100644 index 000000000..71c3b8ebb --- /dev/null +++ b/public/hyperswitch/assets/smart-retry.svg @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/AdvancedSearchComponent.res b/src/components/AdvancedSearchComponent.res index 642f4c069..e49b4d708 100644 --- a/src/components/AdvancedSearchComponent.res +++ b/src/components/AdvancedSearchComponent.res @@ -17,11 +17,12 @@ let make = (~children, ~setData=?, ~entity: EntityType.entityType<'colType, 't>, let initialValueJson = JSON.Encode.object(Dict.make()) let showToast = ToastState.useShowToast() let (showModal, setShowModal) = React.useState(_ => false) + let {xFeatureRoute} = HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom let onSubmit = (values, form: ReactFinalForm.formApi) => { open Promise - fetchApi(url, ~bodyStr=JSON.stringify(values), ~method_=Post) + fetchApi(url, ~bodyStr=JSON.stringify(values), ~method_=Post, ~xFeatureRoute) ->then(res => res->Fetch.Response.json) ->then(json => { let jsonData = json->JSON.Decode.object->Option.flatMap(dict => dict->Dict.get("rows")) diff --git a/src/components/AdvancedSearchModal.res b/src/components/AdvancedSearchModal.res index 85f04c83a..30b8cab47 100644 --- a/src/components/AdvancedSearchModal.res +++ b/src/components/AdvancedSearchModal.res @@ -20,6 +20,7 @@ module AdvanceSearch = { let fetchApi = AuthHooks.useApiFetcher() let initialValueJson = JSON.Encode.object(Dict.make()) let showToast = ToastState.useShowToast() + let {xFeatureRoute} = HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom let onSubmit = (values, _) => { let otherQueries = switch values->JSON.Decode.object { @@ -41,7 +42,7 @@ module AdvanceSearch = { let finalUrl = otherQueries->isNonEmptyString ? `${url}?${otherQueries}` : url open Promise - fetchApi(finalUrl, ~bodyStr=JSON.stringify(initialValueJson), ~method_=Get) + fetchApi(finalUrl, ~bodyStr=JSON.stringify(initialValueJson), ~method_=Get, ~xFeatureRoute) ->then(res => res->Fetch.Response.json) ->then(json => { switch JSON.Classify.classify(json) { diff --git a/src/components/CustomizeNotificationsModal.res b/src/components/CustomizeNotificationsModal.res index 629e241de..0c10e5dfa 100644 --- a/src/components/CustomizeNotificationsModal.res +++ b/src/components/CustomizeNotificationsModal.res @@ -32,7 +32,7 @@ let make = ( ~headerAlignmentClass="flex-row", ~customIcon=None, ) => { - let customHeight = btnRequired === false ? `h-full` : `h-screen` + let customHeight = btnRequired ? `h-screen` : `h-full` let customButton =