@mbehenri/openmrs-esm-opentms-meet-app 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc +1 -1
- package/.husky/pre-commit +2 -2
- package/.husky/pre-push +0 -0
- package/.turbo.json +1 -1
- package/README.md +25 -14
- package/__mocks__/react-i18next.js +9 -14
- package/dist/147.js +1 -0
- package/dist/147.js.map +1 -0
- package/dist/184.js +2 -0
- package/dist/184.js.LICENSE.txt +14 -0
- package/dist/184.js.map +1 -0
- package/dist/197.js +1 -0
- package/dist/23.js +1 -0
- package/dist/23.js.map +1 -0
- package/dist/26.js +1 -0
- package/dist/26.js.map +1 -0
- package/dist/282.js +2 -0
- package/dist/282.js.LICENSE.txt +32 -0
- package/dist/282.js.map +1 -0
- package/dist/300.js +1 -0
- package/dist/335.js +1 -0
- package/dist/353.js +1 -0
- package/dist/353.js.map +1 -0
- package/dist/471.js +1 -0
- package/dist/471.js.map +1 -0
- package/dist/509.js +2 -0
- package/dist/509.js.LICENSE.txt +54 -0
- package/dist/509.js.map +1 -0
- package/dist/51.js +1 -0
- package/dist/51.js.map +1 -0
- package/dist/540.js +2 -0
- package/dist/540.js.LICENSE.txt +9 -0
- package/dist/540.js.map +1 -0
- package/dist/55.js +1 -0
- package/dist/652.js +1 -0
- package/dist/739.js +1 -0
- package/dist/739.js.map +1 -0
- package/dist/740.js +1 -0
- package/dist/740.js.map +1 -0
- package/dist/852.js +1 -0
- package/dist/852.js.map +1 -0
- package/dist/897.js +2 -0
- package/dist/897.js.LICENSE.txt +24 -0
- package/dist/897.js.map +1 -0
- package/dist/91.js +1 -0
- package/dist/91.js.map +1 -0
- package/dist/961.js +2 -0
- package/dist/961.js.LICENSE.txt +19 -0
- package/dist/961.js.map +1 -0
- package/dist/99.js +1 -0
- package/dist/b8b28cec32e885bb.png +0 -0
- package/dist/main.js +1 -0
- package/dist/main.js.map +1 -0
- package/dist/openmrs-esm-opentms-meet-app.js +1 -0
- package/dist/openmrs-esm-opentms-meet-app.js.buildmanifest.json +678 -0
- package/dist/openmrs-esm-opentms-meet-app.js.map +1 -0
- package/dist/routes.json +1 -0
- package/e2e/pages/index.ts +1 -1
- package/e2e/pages/root-page.ts +32 -0
- package/e2e/specs/template-app.spec.ts +23 -0
- package/e2e/support/github/Dockerfile +1 -1
- package/e2e/support/github/docker-compose.yml +2 -2
- package/e2e/support/github/run-e2e-docker-env.sh +13 -25
- package/jest.config.js +11 -9
- package/package.json +44 -45
- package/prettier.config.js +8 -0
- package/src/components/Appointment/index.scss +1 -1
- package/src/components/Appointment/index.tsx +1 -5
- package/src/components/Demand/form.tsx +1 -5
- package/src/components/Demand/tab.scss +1 -1
- package/src/components/Demand/tab.tsx +1 -4
- package/src/components/EmptyLayout/index.scss +1 -1
- package/src/config-schema.ts +14 -20
- package/src/dashboard.meta.ts +7 -8
- package/src/extensions/AppointmentTabExt.tsx +17 -0
- package/src/{Extensions → extensions}/DemandTabExt.tsx +2 -2
- package/src/{Extensions → extensions}/MeetIframeExt.tsx +2 -2
- package/src/{Extensions → extensions}/ValidateDemandFormExt.tsx +5 -6
- package/src/index.ts +10 -35
- package/src/pages/home/home.component.tsx +4 -7
- package/src/privileges/doctor.ts +211 -212
- package/src/repositories/TypeRepository.ts +1 -1
- package/src/repositories/env.ts +1 -2
- package/src/root.component.tsx +8 -20
- package/src/root.scss +5 -5
- package/src/root.test.tsx +9 -17
- package/src/routes.json +6 -11
- package/{i18next-parser.config.js → tools/i18next-parser.config.js} +19 -19
- package/tools/setup-tests.ts +1 -0
- package/tools/update-openmrs-deps.mjs +43 -0
- package/translations/am.json +24 -0
- package/translations/en.json +24 -1
- package/tsconfig.json +1 -1
- package/webpack.config.js +1 -1
- package/.yarn/install-state.gz +0 -0
- package/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs +0 -541
- package/.yarn/releases/yarn-3.6.1.cjs +0 -874
- package/.yarnrc.yml +0 -9
- package/e2e/pages/home-page.ts +0 -9
- package/e2e/specs/sample-test.spec.ts +0 -11
- package/src/Extensions/AppointmentTabExt.tsx +0 -23
package/src/privileges/doctor.ts
CHANGED
|
@@ -1,213 +1,212 @@
|
|
|
1
|
-
|
|
2
1
|
export const actions = [
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
]
|
|
2
|
+
"Edit Patient Identifiers",
|
|
3
|
+
"Remove Problems",
|
|
4
|
+
"View Order Types",
|
|
5
|
+
"View Global Properties",
|
|
6
|
+
"Edit Problems",
|
|
7
|
+
"View Concept Proposals",
|
|
8
|
+
"Add Relationships",
|
|
9
|
+
"View Locations",
|
|
10
|
+
"Manage OWA",
|
|
11
|
+
"Preview Forms",
|
|
12
|
+
"Manage HL7 Messages",
|
|
13
|
+
"View Patient Programs",
|
|
14
|
+
"Manage Concept Reference Terms",
|
|
15
|
+
"Manage Order Set Attribute Types",
|
|
16
|
+
"Delete HL7 Inbound Archive",
|
|
17
|
+
"Manage Concept Map Types",
|
|
18
|
+
"Add Encounters",
|
|
19
|
+
"View Patients",
|
|
20
|
+
"Generate Batch of Identifiers",
|
|
21
|
+
"Manage Person Attribute Types",
|
|
22
|
+
"Manage Auto Generation Options",
|
|
23
|
+
"Edit Encounters",
|
|
24
|
+
"Manage Field Types",
|
|
25
|
+
"Add Orders",
|
|
26
|
+
"View Programs",
|
|
27
|
+
"Manage Visit Attribute Types",
|
|
28
|
+
"Manage Forms",
|
|
29
|
+
"View Concept Datatypes",
|
|
30
|
+
"Add Concept Proposals",
|
|
31
|
+
"Manage Identifier Types",
|
|
32
|
+
"Update HL7 Inbound Exception",
|
|
33
|
+
"Get Order Frequencies",
|
|
34
|
+
"Manage Implementation Id",
|
|
35
|
+
"Manage Relationships",
|
|
36
|
+
"Manage Programs",
|
|
37
|
+
"Upload Batch of Identifiers",
|
|
38
|
+
"Remove Allergies",
|
|
39
|
+
"Manage Order Sets",
|
|
40
|
+
"Add Problems",
|
|
41
|
+
"View Observations",
|
|
42
|
+
"Add Visits",
|
|
43
|
+
"View Forms",
|
|
44
|
+
"Add Patients",
|
|
45
|
+
"View Problems",
|
|
46
|
+
"Add People",
|
|
47
|
+
"Add HL7 Source",
|
|
48
|
+
"Get Concept Attribute Types",
|
|
49
|
+
"Add Observations",
|
|
50
|
+
"Manage Visit Types",
|
|
51
|
+
"View Roles",
|
|
52
|
+
"Add Patient Programs",
|
|
53
|
+
"Edit Visits",
|
|
54
|
+
"Delete Patient Programs",
|
|
55
|
+
"View Encounters",
|
|
56
|
+
"View Privileges",
|
|
57
|
+
"Manage Providers",
|
|
58
|
+
"View Field Types",
|
|
59
|
+
"Delete People",
|
|
60
|
+
"Delete Users",
|
|
61
|
+
"Manage Encounter Roles",
|
|
62
|
+
"Delete Patients",
|
|
63
|
+
"Patient Dashboard - View Forms Section",
|
|
64
|
+
"View People",
|
|
65
|
+
"Get Diagnoses Attribute Types",
|
|
66
|
+
"Manage Address Hierarchy",
|
|
67
|
+
"Add Patient Identifiers",
|
|
68
|
+
"Edit Cohorts",
|
|
69
|
+
"Get Notes",
|
|
70
|
+
"Delete HL7 Inbound Exception",
|
|
71
|
+
"Get Visit Types",
|
|
72
|
+
"Get HL7 Inbound Exception",
|
|
73
|
+
"Manage Concepts",
|
|
74
|
+
"Get Visit Attribute Types",
|
|
75
|
+
"Get Visits",
|
|
76
|
+
"Get Providers",
|
|
77
|
+
"Get Location Attribute Types",
|
|
78
|
+
"Get Encounter Roles",
|
|
79
|
+
"Add HL7 Inbound Archive",
|
|
80
|
+
"Get HL7 Source",
|
|
81
|
+
"View Orders",
|
|
82
|
+
"Get HL7 Inbound Archive",
|
|
83
|
+
"Get HL7 Inbound Queue",
|
|
84
|
+
"Delete Patient Identifiers",
|
|
85
|
+
"View Relationship Types",
|
|
86
|
+
"Manage Global Properties",
|
|
87
|
+
"Manage Modules",
|
|
88
|
+
"Update HL7 Source",
|
|
89
|
+
"View Patient Cohorts",
|
|
90
|
+
"Manage Metadata Mapping",
|
|
91
|
+
"Edit Conditions",
|
|
92
|
+
"Delete Cohorts",
|
|
93
|
+
"Assign System Developer Role",
|
|
94
|
+
"Edit Users",
|
|
95
|
+
"Delete Concept Proposals",
|
|
96
|
+
"Get Concept Datatypes",
|
|
97
|
+
"Get Concept Classes",
|
|
98
|
+
"Edit Notes",
|
|
99
|
+
"Get Roles",
|
|
100
|
+
"Get Care Settings",
|
|
101
|
+
"Get Privileges",
|
|
102
|
+
"Get Order Types",
|
|
103
|
+
"Get Field Types",
|
|
104
|
+
"Get Concept Sources",
|
|
105
|
+
"Get Relationship Types",
|
|
106
|
+
"Manage Encounter Types",
|
|
107
|
+
"Get Identifier Types",
|
|
108
|
+
"Manage Scheduler",
|
|
109
|
+
"Get Forms",
|
|
110
|
+
"Get Orders",
|
|
111
|
+
"Get Global Properties",
|
|
112
|
+
"Manage Locations",
|
|
113
|
+
"Get Patient Programs",
|
|
114
|
+
"Get People",
|
|
115
|
+
"Patient Dashboard - View Overview Section",
|
|
116
|
+
"Delete Diagnoses",
|
|
117
|
+
"Get Person Attribute Types",
|
|
118
|
+
"Get Database Changes",
|
|
119
|
+
"Form Entry",
|
|
120
|
+
"Get Relationships",
|
|
121
|
+
"Get Allergies",
|
|
122
|
+
"Get Problems",
|
|
123
|
+
"Edit Diagnoses",
|
|
124
|
+
"Delete Orders",
|
|
125
|
+
"Get Programs",
|
|
126
|
+
"Get Concept Reference Terms",
|
|
127
|
+
"Purge Field Types",
|
|
128
|
+
"View Data Entry Statistics",
|
|
129
|
+
"Manage Address Templates",
|
|
130
|
+
"Upload XSN",
|
|
131
|
+
"Get Concept Map Types",
|
|
132
|
+
"Add HL7 Inbound Exception",
|
|
133
|
+
"Manage Identifier Sources",
|
|
134
|
+
"Get Conditions",
|
|
135
|
+
"Update HL7 Inbound Archive",
|
|
136
|
+
"Add Allergies",
|
|
137
|
+
"Manage Search Index",
|
|
138
|
+
"Manage Concept Classes",
|
|
139
|
+
"View Patient Identifiers",
|
|
140
|
+
"Manage Order Frequencies",
|
|
141
|
+
"Patient Overview - View Relationships",
|
|
142
|
+
"Patient Dashboard - View Demographics Section",
|
|
143
|
+
"Patient Overview - View Programs",
|
|
144
|
+
"Patient Overview - View Problem List",
|
|
145
|
+
"Patient Overview - View Allergies",
|
|
146
|
+
"View Administration Functions",
|
|
147
|
+
"Get Encounters",
|
|
148
|
+
"Get Users",
|
|
149
|
+
"Get Locations",
|
|
150
|
+
"View Encounter Types",
|
|
151
|
+
"Get Encounter Types",
|
|
152
|
+
"Get Patients",
|
|
153
|
+
"Get Observations",
|
|
154
|
+
"Get Patient Cohorts",
|
|
155
|
+
"Manage Location Attribute Types",
|
|
156
|
+
"View Identifier Types",
|
|
157
|
+
"Get Patient Identifiers",
|
|
158
|
+
"View Metadata Via Mapping",
|
|
159
|
+
"Add Users",
|
|
160
|
+
"Edit User Passwords",
|
|
161
|
+
"View Navigation Menu",
|
|
162
|
+
"Get Concepts",
|
|
163
|
+
"Delete Encounters",
|
|
164
|
+
"Get Concept Proposals",
|
|
165
|
+
"Edit People",
|
|
166
|
+
"Manage RESTWS",
|
|
167
|
+
"Edit Concept Proposals",
|
|
168
|
+
"Manage Concept Stop Words",
|
|
169
|
+
"Manage Location Tags",
|
|
170
|
+
"Manage Concept Sources",
|
|
171
|
+
"Manage Order Types",
|
|
172
|
+
"Edit Allergies",
|
|
173
|
+
"Patient Dashboard - View Encounters Section",
|
|
174
|
+
"Add Cohorts",
|
|
175
|
+
"Delete Notes",
|
|
176
|
+
"Manage Concept Datatypes",
|
|
177
|
+
"Delete Conditions",
|
|
178
|
+
"Manage Relationship Types",
|
|
179
|
+
"Edit Orders",
|
|
180
|
+
"Get Order Set Attribute Types",
|
|
181
|
+
"Get Diagnoses",
|
|
182
|
+
"View Relationships",
|
|
183
|
+
"Manage Alerts",
|
|
184
|
+
"Manage FormEntry XSN",
|
|
185
|
+
"View Unpublished Forms",
|
|
186
|
+
"Configure Visits",
|
|
187
|
+
"Patient Overview - View Patient Actions",
|
|
188
|
+
"Get Order Sets",
|
|
189
|
+
"Delete Visits",
|
|
190
|
+
"Patient Dashboard - View Patient Summary",
|
|
191
|
+
"Delete HL7 Inbound Queue",
|
|
192
|
+
"Delete Relationships",
|
|
193
|
+
"Edit Observations",
|
|
194
|
+
"View Concepts",
|
|
195
|
+
"Edit Patient Programs",
|
|
196
|
+
"View Person Attribute Types",
|
|
197
|
+
"View RESTWS",
|
|
198
|
+
"Patient Dashboard - View Graphs Section",
|
|
199
|
+
"Delete Observations",
|
|
200
|
+
"Patient Dashboard - View Regimen Section",
|
|
201
|
+
"Manage Concept Attribute Types",
|
|
202
|
+
"Manage Concept Name tags",
|
|
203
|
+
"View Users",
|
|
204
|
+
"View Allergies",
|
|
205
|
+
"View Concept Sources",
|
|
206
|
+
"Add HL7 Inbound Queue",
|
|
207
|
+
"Manage Roles",
|
|
208
|
+
"Update HL7 Inbound Queue",
|
|
209
|
+
"Edit Relationships",
|
|
210
|
+
"Edit Patients",
|
|
211
|
+
"View Concept Classes",
|
|
212
|
+
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type TypeRepository = "good" | "fake";
|
|
1
|
+
export type TypeRepository = "good" | "fake";
|
package/src/repositories/env.ts
CHANGED
package/src/root.component.tsx
CHANGED
|
@@ -8,39 +8,27 @@
|
|
|
8
8
|
* https://openmrs.github.io/openmrs-esm-core/#/main/config
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import React, { useEffect } from
|
|
12
|
-
import { BrowserRouter, Route, Routes } from
|
|
13
|
-
import { Home } from
|
|
14
|
-
import { useConfig } from
|
|
15
|
-
import env from
|
|
11
|
+
import React, { useEffect } from 'react';
|
|
12
|
+
// import { BrowserRouter, Route, Routes } from 'react-router-dom';
|
|
13
|
+
import { Home } from './pages/home/home.component';
|
|
14
|
+
import { useConfig } from '@openmrs/esm-framework';
|
|
15
|
+
import env from './repositories/env';
|
|
16
16
|
// import { useTranslation } from "react-i18next";
|
|
17
17
|
//import styles from "./root.scss";
|
|
18
18
|
|
|
19
19
|
const Root: React.FC = () => {
|
|
20
|
-
// const { t } = useTranslation();
|
|
21
|
-
//const basename = window.getOpenmrsSpaBase() + "home/opencare";
|
|
22
|
-
const basename = window.getOpenmrsSpaBase() + "opencare";
|
|
23
|
-
|
|
24
20
|
//recupération de la configuration
|
|
25
21
|
const conf = useConfig();
|
|
26
22
|
|
|
27
23
|
// update env variable
|
|
28
24
|
useEffect(() => {
|
|
29
|
-
env.
|
|
30
|
-
env.
|
|
31
|
-
env.API_BASE_URL = conf["API_BASE_URL"];
|
|
25
|
+
env.API_SECURE = conf['API_SECURE'];
|
|
26
|
+
env.API_BASE_URL = conf['API_BASE_URL'];
|
|
32
27
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
33
28
|
return () => {};
|
|
34
29
|
}, [conf]);
|
|
35
30
|
|
|
36
|
-
return
|
|
37
|
-
<BrowserRouter basename={basename}>
|
|
38
|
-
<Routes>
|
|
39
|
-
{/* Route de la page d'acceuil */}
|
|
40
|
-
<Route path="/home" element={<Home />} />
|
|
41
|
-
</Routes>
|
|
42
|
-
</BrowserRouter>
|
|
43
|
-
);
|
|
31
|
+
return <Home />;
|
|
44
32
|
};
|
|
45
33
|
|
|
46
34
|
export default Root;
|
package/src/root.scss
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
@use '@carbon/
|
|
2
|
-
@use '@carbon/
|
|
1
|
+
@use '@carbon/layout';
|
|
2
|
+
@use '@carbon/type';
|
|
3
3
|
|
|
4
4
|
.container {
|
|
5
|
-
padding:
|
|
5
|
+
padding: layout.$spacing-07;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.welcome {
|
|
9
9
|
@include type.type-style('heading-04');
|
|
10
|
-
margin:
|
|
10
|
+
margin: layout.$spacing-05 0;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.explainer {
|
|
14
|
-
margin-bottom:
|
|
14
|
+
margin-bottom: layout.$spacing-07;
|
|
15
15
|
}
|
package/src/root.test.tsx
CHANGED
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
* Kent C. Dodds is the inventor of `@testing-library`:
|
|
22
22
|
* https://testing-library.com/docs/guiding-principles
|
|
23
23
|
*/
|
|
24
|
-
import React from
|
|
25
|
-
import { render, screen } from
|
|
26
|
-
import { useConfig } from
|
|
27
|
-
import { type Config } from
|
|
28
|
-
import Root from
|
|
24
|
+
import React from 'react';
|
|
25
|
+
import { render, screen } from '@testing-library/react';
|
|
26
|
+
import { useConfig } from '@openmrs/esm-framework';
|
|
27
|
+
import { type Config } from './config-schema';
|
|
28
|
+
import Root from './root.component';
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* This is an idiomatic way of dealing with mocked files. Note that
|
|
@@ -34,21 +34,13 @@ import Root from "./root.component";
|
|
|
34
34
|
* mock file. This line just tells TypeScript that the object is, in
|
|
35
35
|
* fact, a mock, and so will have methods like `mockReturnValue`.
|
|
36
36
|
*/
|
|
37
|
-
const mockUseConfig =
|
|
37
|
+
const mockUseConfig = jest.mocked(useConfig<Config>);
|
|
38
38
|
|
|
39
|
-
it(
|
|
40
|
-
const config: Config = {
|
|
41
|
-
API_HOST: "localhost",
|
|
42
|
-
API_PASSWORD: "Admin123",
|
|
43
|
-
API_PORT: "8010",
|
|
44
|
-
API_USER: "admin",
|
|
45
|
-
API_SECURE: false,
|
|
46
|
-
};
|
|
39
|
+
it('renders a landing page for the opentms app', () => {
|
|
40
|
+
const config: Config = { API_BASE_URL: 'http://localhost:8080', API_SECURE: '*******************' };
|
|
47
41
|
mockUseConfig.mockReturnValue(config);
|
|
48
42
|
|
|
49
43
|
render(<Root />);
|
|
50
44
|
|
|
51
|
-
expect(
|
|
52
|
-
screen.getByRole("heading", { name: /welcome to the o3 opencare app/i })
|
|
53
|
-
).toBeInTheDocument();
|
|
45
|
+
expect(screen.getByRole('heading', { name: /Welcome to opentms app/i })).toBeInTheDocument();
|
|
54
46
|
});
|
package/src/routes.json
CHANGED
|
@@ -7,22 +7,17 @@
|
|
|
7
7
|
"extensions": [
|
|
8
8
|
{
|
|
9
9
|
"component": "demandtab",
|
|
10
|
-
"name": "
|
|
11
|
-
"slot": "
|
|
10
|
+
"name": "opentms-demand-tab",
|
|
11
|
+
"slot": "service-queues-dashboard-slot"
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
"component": "appointmenttab",
|
|
15
|
-
"name": "
|
|
15
|
+
"name": "opentms-appointment-tab",
|
|
16
16
|
"slot": "patient-chart-appointments-dashboard-slot"
|
|
17
17
|
},
|
|
18
|
-
{
|
|
19
|
-
"component": "root",
|
|
20
|
-
"name": "opencare-dashboard",
|
|
21
|
-
"slot": "opencare-dashboard-slot"
|
|
22
|
-
},
|
|
23
18
|
{
|
|
24
19
|
"component": "meetiframe",
|
|
25
|
-
"name": "
|
|
20
|
+
"name": "opentms-meet-iframe",
|
|
26
21
|
"meta": {
|
|
27
22
|
"title": {
|
|
28
23
|
"key": "meetWorkspace",
|
|
@@ -32,13 +27,13 @@
|
|
|
32
27
|
},
|
|
33
28
|
{
|
|
34
29
|
"component": "validatedemandform",
|
|
35
|
-
"name": "
|
|
30
|
+
"name": "opentms-validate-demand-form"
|
|
36
31
|
}
|
|
37
32
|
],
|
|
38
33
|
"pages": [
|
|
39
34
|
{
|
|
40
35
|
"component": "root",
|
|
41
|
-
"route": "
|
|
36
|
+
"route": "root"
|
|
42
37
|
}
|
|
43
38
|
]
|
|
44
39
|
}
|