diff --git a/app/src/App/fhir-apps.tsx b/app/src/App/fhir-apps.tsx index 2db3c804e..086ace84b 100644 --- a/app/src/App/fhir-apps.tsx +++ b/app/src/App/fhir-apps.tsx @@ -216,7 +216,7 @@ const FHIRApps = () => { disableLoginProtection={DISABLE_LOGIN_PROTECTION} exact path={DATA_IMPORT_LIST_URL} - permissions={['WebDataImport.read']} + permissions={['DataImport.read']} component={DataImportList} /> { disableLoginProtection={DISABLE_LOGIN_PROTECTION} exact path={`${DATA_IMPORT_CREATE_URL}`} - permissions={['WebDataImport.create']} + permissions={['DataImport.create']} component={StartDataImport} /> { exact path={`${DATA_IMPORT_DETAIL_URL}/:${'workflowId'}`} {...patientProps} - permissions={['WebDataImport.read']} + permissions={['DataImport.read']} component={ImportDetailViewDetails} /> { exact path={`${DATA_IMPORT_LIST_URL}/:${'workflowId'}`} {...patientProps} - permissions={['WebDataImport.read']} + permissions={['DataImport.read']} component={DataImportList} /> { ); // before resolving get oauth state request, the user is logged out - expect(wrapper.text()).toMatchInlineSnapshot(`"AdministrationLogin"`); + expect(wrapper.text()).toMatchInlineSnapshot(`"AdministrationData ImportsLogin"`); await act(async () => { await flushPromises(); @@ -175,7 +175,7 @@ describe('App - authenticated', () => { ); // before resolving get oauth state request, the user is logged out expect(wrapper.text()).toMatchInlineSnapshot( - `"AdministrationdemoWelcome to OpenSRPUser ManagementQuestionnaire Management"` + `"AdministrationData ImportsdemoWelcome to OpenSRPUser ManagementQuestionnaire ManagementData Imports"` ); await act(async () => { diff --git a/app/src/configs/dispatchConfig.ts b/app/src/configs/dispatchConfig.ts index d62aa52eb..1085b7494 100644 --- a/app/src/configs/dispatchConfig.ts +++ b/app/src/configs/dispatchConfig.ts @@ -4,6 +4,7 @@ import { ProjectCode, setAllConfigs, getAllConfigs, + clientIdConfig, } from '@opensrp/pkg-config'; import { BACKEND_ACTIVE, @@ -17,6 +18,7 @@ import { AUTHZ_STRATEGY, COMMODITIES_LIST_RESOURCE_ID, FHIR_INVENTORY_LIST_ID, + OPENSRP_CLIENT_ID, } from './env'; import { URL_BACKEND_LOGIN, URL_REACT_LOGIN } from '../constants'; @@ -26,6 +28,7 @@ const defaultvalues = getAllConfigs(); const configObject: ConfigState = { ...defaultvalues, + [clientIdConfig]: OPENSRP_CLIENT_ID, languageCode: LANGUAGE_CODE as LanguageCode, projectCode: PROJECT_CODE as ProjectCode, appLoginURL: APP_LOGIN_URL, diff --git a/app/src/containers/ConnectedSidebar/tests/__snapshots__/index.test.tsx.snap b/app/src/containers/ConnectedSidebar/tests/__snapshots__/index.test.tsx.snap index 2fd2bec0b..8800dcb24 100644 --- a/app/src/containers/ConnectedSidebar/tests/__snapshots__/index.test.tsx.snap +++ b/app/src/containers/ConnectedSidebar/tests/__snapshots__/index.test.tsx.snap @@ -83,6 +83,16 @@ Array [ , + } + > + + Data Imports + + , ] `; @@ -169,6 +179,16 @@ Array [ , + } + > + + Data Imports + + , ] `; @@ -300,6 +320,16 @@ Object { + } + > + + Data Imports + + , null, @@ -389,5 +419,15 @@ Array [ , + } + > + + Data Imports + + , ] `; diff --git a/app/src/containers/pages/Home/tests/Home.test.tsx b/app/src/containers/pages/Home/tests/Home.test.tsx index a6898b014..1363d3c60 100644 --- a/app/src/containers/pages/Home/tests/Home.test.tsx +++ b/app/src/containers/pages/Home/tests/Home.test.tsx @@ -66,6 +66,7 @@ describe('containers/pages/Home', () => { 'Location Management', 'Organization Management', 'Questionnaire Management', + 'Data Imports', ]); links.forEach((link) => { expect(link).toMatchSnapshot(link.textContent ?? undefined); diff --git a/app/src/containers/pages/Home/tests/__snapshots__/Home.test.tsx.snap b/app/src/containers/pages/Home/tests/__snapshots__/Home.test.tsx.snap index d9c45804b..1c2f9da1a 100644 --- a/app/src/containers/pages/Home/tests/__snapshots__/Home.test.tsx.snap +++ b/app/src/containers/pages/Home/tests/__snapshots__/Home.test.tsx.snap @@ -1,5 +1,16 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`containers/pages/Home renders Home correctly & changes Title of page 2: Data Imports 1`] = ` + +`; + exports[`containers/pages/Home renders Home correctly & changes Title of page 2: Location Management 1`] = `