diff --git a/packages/developer-portal/src/components/pages/__tests__/__snapshots__/developer-submit-app-successfully.tsx.snap b/packages/developer-portal/src/components/pages/__tests__/__snapshots__/developer-submit-app-successfully.tsx.snap new file mode 100644 index 0000000000..7a4e1c3cc5 --- /dev/null +++ b/packages/developer-portal/src/components/pages/__tests__/__snapshots__/developer-submit-app-successfully.tsx.snap @@ -0,0 +1,77 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`DeveloperSubmitAppSuccessfully renders correctly 1`] = ` + + + + + My Apps + + + Submit another app + + + } + isCard={true} + title="Success" + > +

+ Your App has now been registered and can be accessed by clicking on ‘My Apps’ below. +

+
+

+ You will be directed to the ‘My Apps’ page where you will be able to access the ‘Client ID’ of your App (required for authentication) and or make any changes to your App by clicking ‘Edit Details’. +

+
+

+ + Currently, your App is only visible to you + + and will not be available in the Marketplace until you have made it ‘Listed’. When you are ready to do this, click on ‘Edit Detail’ and tick the ‘Is Listed’ check box located in the ‘Marketplace Status’ section. +

+
+

+ + Please note: + + Any changes you make now to your App (including making it ‘Listed’) will require approval. These are called ‘Revisions’. All revisions will be sent to our Admin department and whilst your App is being reviewed, you will not be able to make any further changes and the App will be marked as ‘Pending Revision’. +

+
+

+ Once you have ‘Listed’ your application, and any revisions have been approved, your app will be live in the Marketplace and available for install by customers. +

+
+

+ For any issues or support, please visit the + + ‘Help’ + + page. +

+
+
+
+
+`; diff --git a/packages/developer-portal/src/components/pages/app-detail/__tests__/__snapshots__/app-detail.test.tsx.snap b/packages/developer-portal/src/components/pages/app-detail/__tests__/__snapshots__/app-detail.test.tsx.snap index 18e70acc7c..b4e835f279 100644 --- a/packages/developer-portal/src/components/pages/app-detail/__tests__/__snapshots__/app-detail.test.tsx.snap +++ b/packages/developer-portal/src/components/pages/app-detail/__tests__/__snapshots__/app-detail.test.tsx.snap @@ -18,7 +18,7 @@ exports[`DeveloperAppDetail should match a snapshot 1`] = ` Array [ Object { "key": "developerAppDetailRoute", - "pathname": "/developer/apps/:appid", + "pathname": "/apps/:appid", }, ] } @@ -34,7 +34,7 @@ exports[`DeveloperAppDetail should match a snapshot 1`] = ` Object { "hash": "", "key": "developerAppDetailRoute", - "pathname": "/developer/apps/:appid", + "pathname": "/apps/:appid", "search": "", }, ], @@ -47,7 +47,7 @@ exports[`DeveloperAppDetail should match a snapshot 1`] = ` "location": Object { "hash": "", "key": "developerAppDetailRoute", - "pathname": "/developer/apps/:appid", + "pathname": "/apps/:appid", "search": "", }, "push": [Function], diff --git a/packages/developer-portal/src/components/pages/app-detail/__tests__/__snapshots__/app-management.test.tsx.snap b/packages/developer-portal/src/components/pages/app-detail/__tests__/__snapshots__/app-management.test.tsx.snap index bc2329c333..0e70fb8c94 100644 --- a/packages/developer-portal/src/components/pages/app-detail/__tests__/__snapshots__/app-management.test.tsx.snap +++ b/packages/developer-portal/src/components/pages/app-detail/__tests__/__snapshots__/app-management.test.tsx.snap @@ -18,7 +18,7 @@ exports[`ManageApp should match snapshot 1`] = ` Array [ Object { "key": "developerAppDetailRoute", - "pathname": "/developer/apps/:appid", + "pathname": "/apps/:appid", }, ] } @@ -34,7 +34,7 @@ exports[`ManageApp should match snapshot 1`] = ` Object { "hash": "", "key": "developerAppDetailRoute", - "pathname": "/developer/apps/:appid", + "pathname": "/apps/:appid", "search": "", }, ], @@ -47,7 +47,7 @@ exports[`ManageApp should match snapshot 1`] = ` "location": Object { "hash": "", "key": "developerAppDetailRoute", - "pathname": "/developer/apps/:appid", + "pathname": "/apps/:appid", "search": "", }, "push": [Function], diff --git a/packages/developer-portal/src/components/pages/app-detail/__tests__/app-content.test.tsx b/packages/developer-portal/src/components/pages/app-detail/__tests__/app-content.test.tsx index 838c60027e..4df67ccad0 100644 --- a/packages/developer-portal/src/components/pages/app-detail/__tests__/app-content.test.tsx +++ b/packages/developer-portal/src/components/pages/app-detail/__tests__/app-content.test.tsx @@ -74,7 +74,7 @@ describe('AppContent', () => { const spyOpenUrl = jest.spyOn(window, 'open') const fn = handleOpenAppPreview(appId) fn() - expect(spyOpenUrl).toBeCalledWith('developer/apps/appId/preview', '_blank') + expect(spyOpenUrl).toBeCalledWith('/apps/appId/preview', '_blank') }) }) diff --git a/packages/developer-portal/src/components/pages/app-detail/app-content.tsx b/packages/developer-portal/src/components/pages/app-detail/app-content.tsx index f442c6243c..c4f751c87a 100644 --- a/packages/developer-portal/src/components/pages/app-detail/app-content.tsx +++ b/packages/developer-portal/src/components/pages/app-detail/app-content.tsx @@ -1,4 +1,5 @@ import * as React from 'react' +import routes from '@/constants/routes' import dayjs from 'dayjs' import { Dispatch } from 'redux' import { GET_ALL_PAGE_SIZE } from '@/constants/paginator' @@ -55,7 +56,7 @@ export const handleUninstallSuccess = ({ } export const handleOpenAppPreview = (appId: string) => () => { - const url = `developer/apps/${appId}/preview` + const url = routes.DEVELOPER_APP_PREVIEW.replace(':appId', appId) window.open(url, '_blank') } diff --git a/packages/developer-portal/src/components/pages/apps/__tests__/__snapshots__/apps.test.tsx.snap b/packages/developer-portal/src/components/pages/apps/__tests__/__snapshots__/apps.test.tsx.snap index c0f1c608df..4b01f7b804 100644 --- a/packages/developer-portal/src/components/pages/apps/__tests__/__snapshots__/apps.test.tsx.snap +++ b/packages/developer-portal/src/components/pages/apps/__tests__/__snapshots__/apps.test.tsx.snap @@ -18,7 +18,7 @@ exports[`Login should match a snapshot 1`] = ` Array [ Object { "key": "developerHomeRoute", - "pathname": "/developer/apps", + "pathname": "/apps", }, ] } @@ -34,7 +34,7 @@ exports[`Login should match a snapshot 1`] = ` Object { "hash": "", "key": "developerHomeRoute", - "pathname": "/developer/apps", + "pathname": "/apps", "search": "", }, ], @@ -47,7 +47,7 @@ exports[`Login should match a snapshot 1`] = ` "location": Object { "hash": "", "key": "developerHomeRoute", - "pathname": "/developer/apps", + "pathname": "/apps", "search": "", }, "push": [Function], diff --git a/packages/developer-portal/src/components/pages/authentication/__test__/__snapshots__/authentication.test.tsx.snap b/packages/developer-portal/src/components/pages/authentication/__test__/__snapshots__/authentication.test.tsx.snap index 716a909317..3342388725 100644 --- a/packages/developer-portal/src/components/pages/authentication/__test__/__snapshots__/authentication.test.tsx.snap +++ b/packages/developer-portal/src/components/pages/authentication/__test__/__snapshots__/authentication.test.tsx.snap @@ -27,7 +27,7 @@ exports[`Authentication renderClientModal should match snapshot 1`] = ` Desktop diff --git a/packages/developer-portal/src/components/pages/desktop/__tests__/__snapshots__/desktop.test.tsx.snap b/packages/developer-portal/src/components/pages/desktop/__tests__/__snapshots__/desktop.test.tsx.snap index b620ff5bf8..01e6e19ed9 100644 --- a/packages/developer-portal/src/components/pages/desktop/__tests__/__snapshots__/desktop.test.tsx.snap +++ b/packages/developer-portal/src/components/pages/desktop/__tests__/__snapshots__/desktop.test.tsx.snap @@ -53,7 +53,7 @@ exports[`DeveloperDesktopPage should match snapshot 1`] = ` To learn more about what’s possible with the Desktop API, please visit the diff --git a/packages/developer-portal/src/components/pages/edit-app/__tests__/__snapshots__/developer-edit-app.test.tsx.snap b/packages/developer-portal/src/components/pages/edit-app/__tests__/__snapshots__/developer-edit-app.test.tsx.snap index 2b4cb6c5b5..600ad7e9e1 100644 --- a/packages/developer-portal/src/components/pages/edit-app/__tests__/__snapshots__/developer-edit-app.test.tsx.snap +++ b/packages/developer-portal/src/components/pages/edit-app/__tests__/__snapshots__/developer-edit-app.test.tsx.snap @@ -95,7 +95,7 @@ exports[`DeveloperSubmitApp should match a snapshot when pendingRevisions = true "entries": Array [ Object { "hash": "", - "pathname": "/developer/apps/undefined", + "pathname": "/apps/undefined", "search": "", "state": undefined, }, @@ -108,7 +108,7 @@ exports[`DeveloperSubmitApp should match a snapshot when pendingRevisions = true "listen": [Function], "location": Object { "hash": "", - "pathname": "/developer/apps/undefined", + "pathname": "/apps/undefined", "search": "", "state": undefined, }, @@ -119,12 +119,12 @@ exports[`DeveloperSubmitApp should match a snapshot when pendingRevisions = true > diff --git a/packages/developer-portal/src/components/pages/edit-app/__tests__/developer-edit-app.test.tsx b/packages/developer-portal/src/components/pages/edit-app/__tests__/developer-edit-app.test.tsx index 049afb6bc3..a457cbea49 100644 --- a/packages/developer-portal/src/components/pages/edit-app/__tests__/developer-edit-app.test.tsx +++ b/packages/developer-portal/src/components/pages/edit-app/__tests__/developer-edit-app.test.tsx @@ -222,7 +222,7 @@ describe('DeveloperSubmitApp', () => { const fn = handleOpenAppPreview(params) fn() expect(spyLocalStorageSetItem).toBeCalledWith('developer-preview-app', expected) - expect(spyOpenUrl).toBeCalledWith('developer/apps/appId/preview', '_blank') + expect(spyOpenUrl).toBeCalledWith('/apps/appId/preview', '_blank') }) }) diff --git a/packages/developer-portal/src/components/pages/edit-app/developer-edit-app.tsx b/packages/developer-portal/src/components/pages/edit-app/developer-edit-app.tsx index 84858cec06..5487169733 100644 --- a/packages/developer-portal/src/components/pages/edit-app/developer-edit-app.tsx +++ b/packages/developer-portal/src/components/pages/edit-app/developer-edit-app.tsx @@ -1,4 +1,5 @@ import * as React from 'react' +import routes from '@/constants/routes' import { Redirect } from 'react-router-dom' import { History } from 'history' import { useHistory, useParams } from 'react-router' @@ -293,7 +294,7 @@ export const handleOpenAppPreview = ({ media, } - const url = `developer/apps/${appId}/preview` + const url = routes.DEVELOPER_APP_PREVIEW.replace(':appId', appId) localStorage.setItem('developer-preview-app', JSON.stringify(appDetailState)) window.open(url, '_blank') } diff --git a/packages/developer-portal/src/components/pages/login/__tests__/__snapshots__/login.test.tsx.snap b/packages/developer-portal/src/components/pages/login/__tests__/__snapshots__/login.test.tsx.snap index bcad241754..9856fe4ae2 100644 --- a/packages/developer-portal/src/components/pages/login/__tests__/__snapshots__/login.test.tsx.snap +++ b/packages/developer-portal/src/components/pages/login/__tests__/__snapshots__/login.test.tsx.snap @@ -18,7 +18,7 @@ exports[`Login should match a snapshot 1`] = ` Array [ Object { "key": "loginRoute", - "pathname": "/developer/login", + "pathname": "/login", }, ] } @@ -34,7 +34,7 @@ exports[`Login should match a snapshot 1`] = ` Object { "hash": "", "key": "loginRoute", - "pathname": "/developer/login", + "pathname": "/login", "search": "", }, ], @@ -47,7 +47,7 @@ exports[`Login should match a snapshot 1`] = ` "location": Object { "hash": "", "key": "loginRoute", - "pathname": "/developer/login", + "pathname": "/login", "search": "", }, "push": [Function], diff --git a/packages/developer-portal/src/components/pages/login/login.tsx b/packages/developer-portal/src/components/pages/login/login.tsx index 8e99915b5c..c4c1c503b3 100644 --- a/packages/developer-portal/src/components/pages/login/login.tsx +++ b/packages/developer-portal/src/components/pages/login/login.tsx @@ -33,8 +33,8 @@ export const handleShowNotificationAfterPasswordChanged = ( export const onLoginButtonClick = (isFirtTimeLogin: boolean) => { return () => { - const redirectRoute = getDefaultRoute(isFirtTimeLogin) - redirectToLogin(window.reapit.config.cognitoClientId, redirectRoute, 'DEVELOPER') + // const redirectRoute = getDefaultRoute(isFirtTimeLogin) + redirectToLogin(window.reapit.config.cognitoClientId, 'http://localhost:8080/developer/apps', 'DEVELOPER') } } diff --git a/packages/developer-portal/src/components/pages/register/__tests__/__snapshots__/register.test.tsx.snap b/packages/developer-portal/src/components/pages/register/__tests__/__snapshots__/register.test.tsx.snap index 1fcfcd529d..5db3cb6ddd 100644 --- a/packages/developer-portal/src/components/pages/register/__tests__/__snapshots__/register.test.tsx.snap +++ b/packages/developer-portal/src/components/pages/register/__tests__/__snapshots__/register.test.tsx.snap @@ -513,14 +513,14 @@ exports[`Register should match a snapshot 1`] = ` > Already have an account? Login diff --git a/packages/developer-portal/src/components/pages/settings/__tests__/__snapshots__/tabs.test.tsx.snap b/packages/developer-portal/src/components/pages/settings/__tests__/__snapshots__/tabs.test.tsx.snap index cfad30cae9..eba83d449c 100644 --- a/packages/developer-portal/src/components/pages/settings/__tests__/__snapshots__/tabs.test.tsx.snap +++ b/packages/developer-portal/src/components/pages/settings/__tests__/__snapshots__/tabs.test.tsx.snap @@ -21,19 +21,19 @@ exports[`Tabs should match a snapshot 1`] = ` "active": false, "displayText": "Profile", "onTabClick": [Function], - "tabIdentifier": "/developer/settings/", + "tabIdentifier": "/settings/", }, Object { "active": false, "displayText": "Organisation", "onTabClick": [Function], - "tabIdentifier": "/developer/settings/organisation", + "tabIdentifier": "/settings/organisation", }, Object { "active": false, "displayText": "Billing", "onTabClick": [Function], - "tabIdentifier": "/developer/settings/billing", + "tabIdentifier": "/settings/billing", }, ] } @@ -45,12 +45,12 @@ exports[`Tabs should match a snapshot 1`] = `