diff --git a/packages/developer-portal/src/components/pages/authentication/__test__/authentication.test.tsx b/packages/developer-portal/src/components/pages/authentication/__test__/authentication.test.tsx index f1d1969d94..6d085dd435 100644 --- a/packages/developer-portal/src/components/pages/authentication/__test__/authentication.test.tsx +++ b/packages/developer-portal/src/components/pages/authentication/__test__/authentication.test.tsx @@ -58,9 +58,10 @@ describe('Authentication', () => { }) describe('onMarketplaceButtonClick', () => { it('should run correctly', () => { - const fn = onMarketplaceButtonClick(history) - fn() - expect(history.replace).toBeCalledWith(Routes.CLIENT) + jest.spyOn(window, 'open') + onMarketplaceButtonClick() + expect(window.open).toBeCalledWith(window.reapit.config.marketplaceUrl, '_self') + ;(window.open as jest.Mock).mockReset() }) }) describe('onRegisterButtonClick', () => { diff --git a/packages/developer-portal/src/components/pages/authentication/authentication.tsx b/packages/developer-portal/src/components/pages/authentication/authentication.tsx index d5923e3ee8..89d10f40f2 100644 --- a/packages/developer-portal/src/components/pages/authentication/authentication.tsx +++ b/packages/developer-portal/src/components/pages/authentication/authentication.tsx @@ -27,10 +27,8 @@ export const onRegisterButtonClick = (history: History) => { } } -export const onMarketplaceButtonClick = (history: History) => { - return () => { - history.replace(Routes.CLIENT) - } +export const onMarketplaceButtonClick = () => { + window.open(window.reapit.config.marketplaceUrl, '_self') } export const onLogoutButtonClick = (dispatch: Dispatch) => { @@ -77,7 +75,7 @@ export const renderDeveloperModal = (history, dispatch) => { footerItems={ <> - + }