@dhis2-ui/header-bar 9.5.0-alpha.1 → 9.5.0
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/build/cjs/__e2e__/stories/common.js +10 -199
- package/build/cjs/__e2e__/stories/modulesWithSpecialCharacters.js +204 -0
- package/build/cjs/features/common/index.js +3 -3
- package/build/cjs/features/the_headerbar_can_display_online_status/the_headerbar_displays_online_status.js +21 -23
- package/build/cjs/features/the_headerbar_conditionally_renders_notification_icons/the_headerbar_conditionally_renders_notification_icons.js +10 -10
- package/build/cjs/features/the_headerbar_contains_a_menu_to_all_apps/common.js +2 -2
- package/build/cjs/features/the_headerbar_contains_a_menu_to_all_apps/the_app_menu_closes_when_the_user_clicks_outside.js +3 -5
- package/build/cjs/features/the_headerbar_contains_a_menu_to_all_apps/the_headerbar_contains_a_menu_icon.js +2 -4
- package/build/cjs/features/the_headerbar_contains_a_menu_to_all_apps/the_user_will_be_offered_a_menu_with_5_apps.js +4 -4
- package/build/cjs/features/the_headerbar_contains_a_profile_menu/common.js +3 -3
- package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_headerbar_shows_a_text_icon_if_the_user_does_not_have_an_avatar.js +5 -7
- package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_headerbar_shows_an_image_icon_if_the_user_has_an_avatar.js +5 -5
- package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_menu_is_closed_by_default.js +2 -3
- package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_menu_opens.js +3 -5
- package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_profile_menu_closes_when_the_user_clicks_outside.js +2 -4
- package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_user_can_edit_his_profile.js +2 -4
- package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_user_can_go_to_his_account.js +2 -4
- package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_user_can_go_to_the_about_dhis2_page.js +2 -4
- package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_user_can_go_to_the_help_page.js +2 -4
- package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_user_can_go_to_the_settings.js +2 -4
- package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_user_can_log_out.js +7 -7
- package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_user_name_and_email_are_displayed.js +3 -5
- package/build/cjs/features/the_headerbar_displays_a_link_to_interpretations_and_an_unread_count/the_headerbar_displays_a_link_to_the_interpretations.js +2 -4
- package/build/cjs/features/the_headerbar_displays_a_link_to_interpretations_and_an_unread_count/there_are_no_unread_interpretations.js +3 -5
- package/build/cjs/features/the_headerbar_displays_a_link_to_interpretations_and_an_unread_count/there_are_some_unread_interpretations.js +2 -4
- package/build/cjs/features/the_headerbar_displays_a_link_to_messages_and_an_unread_count/the_headerbar_displays_a_link_to_the_messages.js +2 -4
- package/build/cjs/features/the_headerbar_displays_a_link_to_messages_and_an_unread_count/there_are_no_unread_messages.js +3 -5
- package/build/cjs/features/the_headerbar_displays_a_link_to_messages_and_an_unread_count/there_are_some_unread_messages.js +2 -4
- package/build/cjs/features/the_headerbar_should_contain_a_logo_that_links_to_the_homepage/headerbar_contains_logo.js +3 -3
- package/build/cjs/features/the_headerbar_should_display_app_update_notification/index.js +11 -11
- package/build/cjs/features/the_headerbar_should_display_debug_version_infos/index.js +20 -20
- package/build/cjs/features/the_headerbar_should_display_the_title_provided_by_the_backend_and_the_app/the_headerbar_displays_the_custom_title.js +3 -3
- package/build/cjs/features/the_search_should_escape_regexp_character/common.js +2 -2
- package/build/cjs/features/the_search_should_escape_regexp_character/the_modules_do_not_contain_items_with_special_chars.js +3 -5
- package/build/cjs/features/the_search_should_escape_regexp_character/the_user_searches_for_an_app_with_a_regex_character.js +5 -7
- package/build/cjs/locales/lo/translations.json +11 -11
- package/build/es/__e2e__/stories/common.js +1 -197
- package/build/es/__e2e__/stories/modulesWithSpecialCharacters.js +197 -0
- package/build/es/features/common/index.js +1 -1
- package/build/es/features/the_headerbar_can_display_online_status/the_headerbar_displays_online_status.js +4 -5
- package/build/es/features/the_headerbar_conditionally_renders_notification_icons/the_headerbar_conditionally_renders_notification_icons.js +1 -1
- package/build/es/features/the_headerbar_contains_a_menu_to_all_apps/common.js +1 -1
- package/build/es/features/the_headerbar_contains_a_menu_to_all_apps/the_app_menu_closes_when_the_user_clicks_outside.js +1 -2
- package/build/es/features/the_headerbar_contains_a_menu_to_all_apps/the_headerbar_contains_a_menu_icon.js +1 -2
- package/build/es/features/the_headerbar_contains_a_menu_to_all_apps/the_user_will_be_offered_a_menu_with_5_apps.js +1 -1
- package/build/es/features/the_headerbar_contains_a_profile_menu/common.js +1 -1
- package/build/es/features/the_headerbar_contains_a_profile_menu/the_headerbar_shows_a_text_icon_if_the_user_does_not_have_an_avatar.js +1 -2
- package/build/es/features/the_headerbar_contains_a_profile_menu/the_headerbar_shows_an_image_icon_if_the_user_has_an_avatar.js +1 -1
- package/build/es/features/the_headerbar_contains_a_profile_menu/the_menu_is_closed_by_default.js +1 -1
- package/build/es/features/the_headerbar_contains_a_profile_menu/the_menu_opens.js +1 -2
- package/build/es/features/the_headerbar_contains_a_profile_menu/the_profile_menu_closes_when_the_user_clicks_outside.js +1 -2
- package/build/es/features/the_headerbar_contains_a_profile_menu/the_user_can_edit_his_profile.js +1 -2
- package/build/es/features/the_headerbar_contains_a_profile_menu/the_user_can_go_to_his_account.js +1 -2
- package/build/es/features/the_headerbar_contains_a_profile_menu/the_user_can_go_to_the_about_dhis2_page.js +1 -2
- package/build/es/features/the_headerbar_contains_a_profile_menu/the_user_can_go_to_the_help_page.js +1 -2
- package/build/es/features/the_headerbar_contains_a_profile_menu/the_user_can_go_to_the_settings.js +1 -2
- package/build/es/features/the_headerbar_contains_a_profile_menu/the_user_can_log_out.js +3 -3
- package/build/es/features/the_headerbar_contains_a_profile_menu/the_user_name_and_email_are_displayed.js +1 -2
- package/build/es/features/the_headerbar_displays_a_link_to_interpretations_and_an_unread_count/the_headerbar_displays_a_link_to_the_interpretations.js +1 -2
- package/build/es/features/the_headerbar_displays_a_link_to_interpretations_and_an_unread_count/there_are_no_unread_interpretations.js +1 -2
- package/build/es/features/the_headerbar_displays_a_link_to_interpretations_and_an_unread_count/there_are_some_unread_interpretations.js +1 -2
- package/build/es/features/the_headerbar_displays_a_link_to_messages_and_an_unread_count/the_headerbar_displays_a_link_to_the_messages.js +1 -2
- package/build/es/features/the_headerbar_displays_a_link_to_messages_and_an_unread_count/there_are_no_unread_messages.js +1 -2
- package/build/es/features/the_headerbar_displays_a_link_to_messages_and_an_unread_count/there_are_some_unread_messages.js +1 -2
- package/build/es/features/the_headerbar_should_contain_a_logo_that_links_to_the_homepage/headerbar_contains_logo.js +1 -1
- package/build/es/features/the_headerbar_should_display_app_update_notification/index.js +1 -1
- package/build/es/features/the_headerbar_should_display_debug_version_infos/index.js +1 -1
- package/build/es/features/the_headerbar_should_display_the_title_provided_by_the_backend_and_the_app/the_headerbar_displays_the_custom_title.js +1 -1
- package/build/es/features/the_search_should_escape_regexp_character/common.js +1 -1
- package/build/es/features/the_search_should_escape_regexp_character/the_modules_do_not_contain_items_with_special_chars.js +1 -2
- package/build/es/features/the_search_should_escape_regexp_character/the_user_searches_for_an_app_with_a_regex_character.js +2 -3
- package/build/es/locales/lo/translations.json +11 -11
- package/package.json +15 -15
- package/build/cjs/features/the_headerbar_contains_a_menu_to_all_apps/the_menu_is_closed_by_default.js +0 -11
- package/build/es/features/the_headerbar_contains_a_menu_to_all_apps/the_menu_is_closed_by_default.js +0 -6
|
@@ -3,7 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.mockOfflineInterface = exports.defaultModules = exports.dataProviderData = exports.createDecoratorProvider = exports.createDecoratorCustomDataProviderHeaderBar = exports.applicationTitle = void 0;
|
|
7
|
+
Object.defineProperty(exports, "modulesWithSpecialCharacters", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _modulesWithSpecialCharacters.modulesWithSpecialCharacters;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
exports.providerConfig = void 0;
|
|
7
14
|
|
|
8
15
|
var _appRuntime = require("@dhis2/app-runtime");
|
|
9
16
|
|
|
@@ -11,6 +18,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
18
|
|
|
12
19
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
20
|
|
|
21
|
+
var _modulesWithSpecialCharacters = require("./modulesWithSpecialCharacters.js");
|
|
22
|
+
|
|
14
23
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
24
|
|
|
16
25
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -83,204 +92,6 @@ const defaultModules = [{
|
|
|
83
92
|
description: 'DHIS2 Legacy Dashboard App'
|
|
84
93
|
}];
|
|
85
94
|
exports.defaultModules = defaultModules;
|
|
86
|
-
const modulesWithSpecialCharacters = [{
|
|
87
|
-
name: '/',
|
|
88
|
-
namespace: '//',
|
|
89
|
-
defaultAction: '..//.action',
|
|
90
|
-
displayName: 'A / character',
|
|
91
|
-
icon: '../icons/dhis-web-dashboard.png',
|
|
92
|
-
description: ''
|
|
93
|
-
}, {
|
|
94
|
-
name: '-',
|
|
95
|
-
namespace: '/-',
|
|
96
|
-
defaultAction: '../-.action',
|
|
97
|
-
displayName: 'A - character',
|
|
98
|
-
icon: '../icons/dhis-web-dashboard.png',
|
|
99
|
-
description: ''
|
|
100
|
-
}, {
|
|
101
|
-
name: '(',
|
|
102
|
-
namespace: '/(',
|
|
103
|
-
defaultAction: '../(.action',
|
|
104
|
-
displayName: 'A ( character',
|
|
105
|
-
icon: '../icons/dhis-web-data-visualizer.png',
|
|
106
|
-
description: ''
|
|
107
|
-
}, {
|
|
108
|
-
name: ')',
|
|
109
|
-
namespace: '/)',
|
|
110
|
-
defaultAction: '../).action',
|
|
111
|
-
displayName: 'A ) character',
|
|
112
|
-
icon: '../icons/dhis-web-data-visualizer.png',
|
|
113
|
-
description: ''
|
|
114
|
-
}, {
|
|
115
|
-
name: '[',
|
|
116
|
-
namespace: '/[',
|
|
117
|
-
defaultAction: '../[.action',
|
|
118
|
-
displayName: 'A [ character',
|
|
119
|
-
icon: '../icons/dhis-web-data-visualizer.png',
|
|
120
|
-
description: ''
|
|
121
|
-
}, {
|
|
122
|
-
name: ']',
|
|
123
|
-
namespace: '/]',
|
|
124
|
-
defaultAction: '../].action',
|
|
125
|
-
displayName: 'A ] character',
|
|
126
|
-
icon: '../icons/dhis-web-data-visualizer.png',
|
|
127
|
-
description: ''
|
|
128
|
-
}, {
|
|
129
|
-
name: '{',
|
|
130
|
-
namespace: '/{',
|
|
131
|
-
defaultAction: '../{.action',
|
|
132
|
-
displayName: 'A { character',
|
|
133
|
-
icon: '../icons/dhis-web-data-visualizer.png',
|
|
134
|
-
description: ''
|
|
135
|
-
}, {
|
|
136
|
-
name: '}',
|
|
137
|
-
namespace: '/}',
|
|
138
|
-
defaultAction: '../}.action',
|
|
139
|
-
displayName: 'A } character',
|
|
140
|
-
icon: '../icons/dhis-web-data-visualizer.png',
|
|
141
|
-
description: ''
|
|
142
|
-
}, {
|
|
143
|
-
name: '*',
|
|
144
|
-
namespace: '/*',
|
|
145
|
-
defaultAction: '../*.action',
|
|
146
|
-
displayName: 'A * character',
|
|
147
|
-
icon: '../icons/dhis-web-data-visualizer.png',
|
|
148
|
-
description: ''
|
|
149
|
-
}, {
|
|
150
|
-
name: '+',
|
|
151
|
-
namespace: '/+',
|
|
152
|
-
defaultAction: '../+.action',
|
|
153
|
-
displayName: 'A + character',
|
|
154
|
-
icon: '../icons/dhis-web-data-visualizer.png',
|
|
155
|
-
description: ''
|
|
156
|
-
}, {
|
|
157
|
-
name: '?',
|
|
158
|
-
namespace: '/?',
|
|
159
|
-
defaultAction: '../?.action',
|
|
160
|
-
displayName: 'A ? character',
|
|
161
|
-
icon: '../icons/dhis-web-data-visualizer.png',
|
|
162
|
-
description: ''
|
|
163
|
-
}, {
|
|
164
|
-
name: '.',
|
|
165
|
-
namespace: '/.',
|
|
166
|
-
defaultAction: '../..action',
|
|
167
|
-
displayName: 'A . character',
|
|
168
|
-
icon: '../icons/dhis-web-data-visualizer.png',
|
|
169
|
-
description: ''
|
|
170
|
-
}, {
|
|
171
|
-
name: ',',
|
|
172
|
-
namespace: '/,',
|
|
173
|
-
defaultAction: '../,.action',
|
|
174
|
-
displayName: 'A , character',
|
|
175
|
-
icon: '../icons/dhis-web-data-visualizer.png',
|
|
176
|
-
description: ''
|
|
177
|
-
}, {
|
|
178
|
-
name: '^',
|
|
179
|
-
namespace: '/^',
|
|
180
|
-
defaultAction: '../^.action',
|
|
181
|
-
displayName: 'A ^ character',
|
|
182
|
-
icon: '../icons/dhis-web-data-visualizer.png',
|
|
183
|
-
description: ''
|
|
184
|
-
}, {
|
|
185
|
-
name: '$',
|
|
186
|
-
namespace: '/$',
|
|
187
|
-
defaultAction: '../$.action',
|
|
188
|
-
displayName: 'A $ character',
|
|
189
|
-
icon: '../icons/dhis-web-data-visualizer.png',
|
|
190
|
-
description: ''
|
|
191
|
-
}, {
|
|
192
|
-
name: '|',
|
|
193
|
-
namespace: '/|',
|
|
194
|
-
defaultAction: '../|.action',
|
|
195
|
-
displayName: 'A | character',
|
|
196
|
-
icon: '../icons/dhis-web-data-visualizer.png',
|
|
197
|
-
description: ''
|
|
198
|
-
}, {
|
|
199
|
-
name: '#',
|
|
200
|
-
namespace: '/#',
|
|
201
|
-
defaultAction: '../#.action',
|
|
202
|
-
displayName: 'A # character',
|
|
203
|
-
icon: '../icons/dhis-web-data-visualizer.png',
|
|
204
|
-
description: ''
|
|
205
|
-
}, {
|
|
206
|
-
name: '\\s',
|
|
207
|
-
namespace: '/\\s',
|
|
208
|
-
defaultAction: '../\\s.action',
|
|
209
|
-
displayName: 'A \\s character',
|
|
210
|
-
icon: '../icons/dhis-web-data-visualizer.png',
|
|
211
|
-
description: ''
|
|
212
|
-
}, {
|
|
213
|
-
name: '\\',
|
|
214
|
-
namespace: '/\\',
|
|
215
|
-
defaultAction: '../\\.action',
|
|
216
|
-
displayName: 'A \\ character',
|
|
217
|
-
icon: '../icons/dhis-web-data-visualizer.png',
|
|
218
|
-
description: ''
|
|
219
|
-
}, {
|
|
220
|
-
name: 'dhis-web-dashboard',
|
|
221
|
-
namespace: '/dhis-web-dashboard',
|
|
222
|
-
defaultAction: '../dhis-web-dashboard/index.action',
|
|
223
|
-
displayName: 'Dashboard',
|
|
224
|
-
icon: '../icons/dhis-web-dashboard.png',
|
|
225
|
-
description: ''
|
|
226
|
-
}, {
|
|
227
|
-
name: 'dhis-web-capture',
|
|
228
|
-
namespace: '/dhis-web-capture',
|
|
229
|
-
defaultAction: '../dhis-web-capture/index.action',
|
|
230
|
-
displayName: 'Capture',
|
|
231
|
-
icon: '../icons/dhis-web-capture.png',
|
|
232
|
-
description: ''
|
|
233
|
-
}, {
|
|
234
|
-
name: 'dhis-web-maintenance',
|
|
235
|
-
namespace: '/dhis-web-maintenance',
|
|
236
|
-
defaultAction: '../dhis-web-maintenance/index.action',
|
|
237
|
-
displayName: 'Maintenance',
|
|
238
|
-
icon: '../icons/dhis-web-maintenance.png',
|
|
239
|
-
description: ''
|
|
240
|
-
}, {
|
|
241
|
-
name: 'dhis-web-maps',
|
|
242
|
-
namespace: '/dhis-web-maps',
|
|
243
|
-
defaultAction: '../dhis-web-maps/index.action',
|
|
244
|
-
displayName: 'Maps',
|
|
245
|
-
icon: '../icons/dhis-web-maps.png',
|
|
246
|
-
description: ''
|
|
247
|
-
}, {
|
|
248
|
-
name: 'dhis-web-event-reports',
|
|
249
|
-
namespace: '/dhis-web-event-reports',
|
|
250
|
-
defaultAction: '../dhis-web-event-reports/index.action',
|
|
251
|
-
displayName: 'Event Reports',
|
|
252
|
-
icon: '../icons/dhis-web-event-reports.png',
|
|
253
|
-
description: ''
|
|
254
|
-
}, {
|
|
255
|
-
name: 'dhis-web-interpretation',
|
|
256
|
-
namespace: '/dhis-web-interpretation',
|
|
257
|
-
defaultAction: '../dhis-web-interpretation/index.action',
|
|
258
|
-
displayName: 'Interpretations',
|
|
259
|
-
icon: '../icons/dhis-web-interpretation.png',
|
|
260
|
-
description: ''
|
|
261
|
-
}, {
|
|
262
|
-
name: 'dhis-web-import-export',
|
|
263
|
-
namespace: '/dhis-web-import-export',
|
|
264
|
-
defaultAction: '../dhis-web-import-export/index.action',
|
|
265
|
-
displayName: 'Import/Export',
|
|
266
|
-
icon: '../icons/dhis-web-importexport.png',
|
|
267
|
-
description: ''
|
|
268
|
-
}, {
|
|
269
|
-
name: 'WHO Metadata browser',
|
|
270
|
-
namespace: 'WHO Metadata browser',
|
|
271
|
-
defaultAction: 'https://debug.dhis2.org/dev/api/apps/WHO-Metadata-browser/index.html',
|
|
272
|
-
displayName: '',
|
|
273
|
-
icon: 'https://debug.dhis2.org/dev/api/apps/WHO-Metadata-browser/icons/medicine-48.png',
|
|
274
|
-
description: ''
|
|
275
|
-
}, {
|
|
276
|
-
name: 'Dashboard Classic',
|
|
277
|
-
namespace: 'Dashboard Classic',
|
|
278
|
-
defaultAction: 'https://debug.dhis2.org/dev/api/apps/Dashboard-Classic/index.html',
|
|
279
|
-
displayName: '',
|
|
280
|
-
icon: 'https://debug.dhis2.org/dev/api/apps/Dashboard-Classic/icon.png',
|
|
281
|
-
description: 'DHIS2 Legacy Dashboard App'
|
|
282
|
-
}];
|
|
283
|
-
exports.modulesWithSpecialCharacters = modulesWithSpecialCharacters;
|
|
284
95
|
const applicationTitle = 'Foobar';
|
|
285
96
|
exports.applicationTitle = applicationTitle;
|
|
286
97
|
const dataProviderData = {
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.modulesWithSpecialCharacters = void 0;
|
|
7
|
+
const modulesWithSpecialCharacters = [{
|
|
8
|
+
name: '/',
|
|
9
|
+
namespace: '//',
|
|
10
|
+
defaultAction: '..//.action',
|
|
11
|
+
displayName: 'A / character',
|
|
12
|
+
icon: '../icons/dhis-web-dashboard.png',
|
|
13
|
+
description: ''
|
|
14
|
+
}, {
|
|
15
|
+
name: '-',
|
|
16
|
+
namespace: '/-',
|
|
17
|
+
defaultAction: '../-.action',
|
|
18
|
+
displayName: 'A - character',
|
|
19
|
+
icon: '../icons/dhis-web-dashboard.png',
|
|
20
|
+
description: ''
|
|
21
|
+
}, {
|
|
22
|
+
name: '(',
|
|
23
|
+
namespace: '/(',
|
|
24
|
+
defaultAction: '../(.action',
|
|
25
|
+
displayName: 'A ( character',
|
|
26
|
+
icon: '../icons/dhis-web-data-visualizer.png',
|
|
27
|
+
description: ''
|
|
28
|
+
}, {
|
|
29
|
+
name: ')',
|
|
30
|
+
namespace: '/)',
|
|
31
|
+
defaultAction: '../).action',
|
|
32
|
+
displayName: 'A ) character',
|
|
33
|
+
icon: '../icons/dhis-web-data-visualizer.png',
|
|
34
|
+
description: ''
|
|
35
|
+
}, {
|
|
36
|
+
name: '[',
|
|
37
|
+
namespace: '/[',
|
|
38
|
+
defaultAction: '../[.action',
|
|
39
|
+
displayName: 'A [ character',
|
|
40
|
+
icon: '../icons/dhis-web-data-visualizer.png',
|
|
41
|
+
description: ''
|
|
42
|
+
}, {
|
|
43
|
+
name: ']',
|
|
44
|
+
namespace: '/]',
|
|
45
|
+
defaultAction: '../].action',
|
|
46
|
+
displayName: 'A ] character',
|
|
47
|
+
icon: '../icons/dhis-web-data-visualizer.png',
|
|
48
|
+
description: ''
|
|
49
|
+
}, {
|
|
50
|
+
name: '{',
|
|
51
|
+
namespace: '/{',
|
|
52
|
+
defaultAction: '../{.action',
|
|
53
|
+
displayName: 'A { character',
|
|
54
|
+
icon: '../icons/dhis-web-data-visualizer.png',
|
|
55
|
+
description: ''
|
|
56
|
+
}, {
|
|
57
|
+
name: '}',
|
|
58
|
+
namespace: '/}',
|
|
59
|
+
defaultAction: '../}.action',
|
|
60
|
+
displayName: 'A } character',
|
|
61
|
+
icon: '../icons/dhis-web-data-visualizer.png',
|
|
62
|
+
description: ''
|
|
63
|
+
}, {
|
|
64
|
+
name: '*',
|
|
65
|
+
namespace: '/*',
|
|
66
|
+
defaultAction: '../*.action',
|
|
67
|
+
displayName: 'A * character',
|
|
68
|
+
icon: '../icons/dhis-web-data-visualizer.png',
|
|
69
|
+
description: ''
|
|
70
|
+
}, {
|
|
71
|
+
name: '+',
|
|
72
|
+
namespace: '/+',
|
|
73
|
+
defaultAction: '../+.action',
|
|
74
|
+
displayName: 'A + character',
|
|
75
|
+
icon: '../icons/dhis-web-data-visualizer.png',
|
|
76
|
+
description: ''
|
|
77
|
+
}, {
|
|
78
|
+
name: '?',
|
|
79
|
+
namespace: '/?',
|
|
80
|
+
defaultAction: '../?.action',
|
|
81
|
+
displayName: 'A ? character',
|
|
82
|
+
icon: '../icons/dhis-web-data-visualizer.png',
|
|
83
|
+
description: ''
|
|
84
|
+
}, {
|
|
85
|
+
name: '.',
|
|
86
|
+
namespace: '/.',
|
|
87
|
+
defaultAction: '../..action',
|
|
88
|
+
displayName: 'A . character',
|
|
89
|
+
icon: '../icons/dhis-web-data-visualizer.png',
|
|
90
|
+
description: ''
|
|
91
|
+
}, {
|
|
92
|
+
name: ',',
|
|
93
|
+
namespace: '/,',
|
|
94
|
+
defaultAction: '../,.action',
|
|
95
|
+
displayName: 'A , character',
|
|
96
|
+
icon: '../icons/dhis-web-data-visualizer.png',
|
|
97
|
+
description: ''
|
|
98
|
+
}, {
|
|
99
|
+
name: '^',
|
|
100
|
+
namespace: '/^',
|
|
101
|
+
defaultAction: '../^.action',
|
|
102
|
+
displayName: 'A ^ character',
|
|
103
|
+
icon: '../icons/dhis-web-data-visualizer.png',
|
|
104
|
+
description: ''
|
|
105
|
+
}, {
|
|
106
|
+
name: '$',
|
|
107
|
+
namespace: '/$',
|
|
108
|
+
defaultAction: '../$.action',
|
|
109
|
+
displayName: 'A $ character',
|
|
110
|
+
icon: '../icons/dhis-web-data-visualizer.png',
|
|
111
|
+
description: ''
|
|
112
|
+
}, {
|
|
113
|
+
name: '|',
|
|
114
|
+
namespace: '/|',
|
|
115
|
+
defaultAction: '../|.action',
|
|
116
|
+
displayName: 'A | character',
|
|
117
|
+
icon: '../icons/dhis-web-data-visualizer.png',
|
|
118
|
+
description: ''
|
|
119
|
+
}, {
|
|
120
|
+
name: '#',
|
|
121
|
+
namespace: '/#',
|
|
122
|
+
defaultAction: '../#.action',
|
|
123
|
+
displayName: 'A # character',
|
|
124
|
+
icon: '../icons/dhis-web-data-visualizer.png',
|
|
125
|
+
description: ''
|
|
126
|
+
}, {
|
|
127
|
+
name: '\\s',
|
|
128
|
+
namespace: '/\\s',
|
|
129
|
+
defaultAction: '../\\s.action',
|
|
130
|
+
displayName: 'A \\s character',
|
|
131
|
+
icon: '../icons/dhis-web-data-visualizer.png',
|
|
132
|
+
description: ''
|
|
133
|
+
}, {
|
|
134
|
+
name: '\\',
|
|
135
|
+
namespace: '/\\',
|
|
136
|
+
defaultAction: '../\\.action',
|
|
137
|
+
displayName: 'A \\ character',
|
|
138
|
+
icon: '../icons/dhis-web-data-visualizer.png',
|
|
139
|
+
description: ''
|
|
140
|
+
}, {
|
|
141
|
+
name: 'dhis-web-dashboard',
|
|
142
|
+
namespace: '/dhis-web-dashboard',
|
|
143
|
+
defaultAction: '../dhis-web-dashboard/index.action',
|
|
144
|
+
displayName: 'Dashboard',
|
|
145
|
+
icon: '../icons/dhis-web-dashboard.png',
|
|
146
|
+
description: ''
|
|
147
|
+
}, {
|
|
148
|
+
name: 'dhis-web-capture',
|
|
149
|
+
namespace: '/dhis-web-capture',
|
|
150
|
+
defaultAction: '../dhis-web-capture/index.action',
|
|
151
|
+
displayName: 'Capture',
|
|
152
|
+
icon: '../icons/dhis-web-capture.png',
|
|
153
|
+
description: ''
|
|
154
|
+
}, {
|
|
155
|
+
name: 'dhis-web-maintenance',
|
|
156
|
+
namespace: '/dhis-web-maintenance',
|
|
157
|
+
defaultAction: '../dhis-web-maintenance/index.action',
|
|
158
|
+
displayName: 'Maintenance',
|
|
159
|
+
icon: '../icons/dhis-web-maintenance.png',
|
|
160
|
+
description: ''
|
|
161
|
+
}, {
|
|
162
|
+
name: 'dhis-web-maps',
|
|
163
|
+
namespace: '/dhis-web-maps',
|
|
164
|
+
defaultAction: '../dhis-web-maps/index.action',
|
|
165
|
+
displayName: 'Maps',
|
|
166
|
+
icon: '../icons/dhis-web-maps.png',
|
|
167
|
+
description: ''
|
|
168
|
+
}, {
|
|
169
|
+
name: 'dhis-web-event-reports',
|
|
170
|
+
namespace: '/dhis-web-event-reports',
|
|
171
|
+
defaultAction: '../dhis-web-event-reports/index.action',
|
|
172
|
+
displayName: 'Event Reports',
|
|
173
|
+
icon: '../icons/dhis-web-event-reports.png',
|
|
174
|
+
description: ''
|
|
175
|
+
}, {
|
|
176
|
+
name: 'dhis-web-interpretation',
|
|
177
|
+
namespace: '/dhis-web-interpretation',
|
|
178
|
+
defaultAction: '../dhis-web-interpretation/index.action',
|
|
179
|
+
displayName: 'Interpretations',
|
|
180
|
+
icon: '../icons/dhis-web-interpretation.png',
|
|
181
|
+
description: ''
|
|
182
|
+
}, {
|
|
183
|
+
name: 'dhis-web-import-export',
|
|
184
|
+
namespace: '/dhis-web-import-export',
|
|
185
|
+
defaultAction: '../dhis-web-import-export/index.action',
|
|
186
|
+
displayName: 'Import/Export',
|
|
187
|
+
icon: '../icons/dhis-web-importexport.png',
|
|
188
|
+
description: ''
|
|
189
|
+
}, {
|
|
190
|
+
name: 'WHO Metadata browser',
|
|
191
|
+
namespace: 'WHO Metadata browser',
|
|
192
|
+
defaultAction: 'https://debug.dhis2.org/dev/api/apps/WHO-Metadata-browser/index.html',
|
|
193
|
+
displayName: '',
|
|
194
|
+
icon: 'https://debug.dhis2.org/dev/api/apps/WHO-Metadata-browser/icons/medicine-48.png',
|
|
195
|
+
description: ''
|
|
196
|
+
}, {
|
|
197
|
+
name: 'Dashboard Classic',
|
|
198
|
+
namespace: 'Dashboard Classic',
|
|
199
|
+
defaultAction: 'https://debug.dhis2.org/dev/api/apps/Dashboard-Classic/index.html',
|
|
200
|
+
displayName: '',
|
|
201
|
+
icon: 'https://debug.dhis2.org/dev/api/apps/Dashboard-Classic/icon.png',
|
|
202
|
+
description: 'DHIS2 Legacy Dashboard App'
|
|
203
|
+
}];
|
|
204
|
+
exports.modulesWithSpecialCharacters = modulesWithSpecialCharacters;
|
|
@@ -5,17 +5,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.webCommons = exports.baseUrl = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
|
|
9
9
|
|
|
10
10
|
const baseUrl = 'https://domain.tld/';
|
|
11
11
|
exports.baseUrl = baseUrl;
|
|
12
12
|
const webCommons = 'https://domain.tld/dhis-web-commons/';
|
|
13
13
|
exports.webCommons = webCommons;
|
|
14
|
-
(0,
|
|
14
|
+
(0, _cypressCucumberPreprocessor.Before)(() => {
|
|
15
15
|
cy.intercept('GET', "".concat(baseUrl, "api/fileResources/avatarId/data"), {
|
|
16
16
|
fixture: 'HeaderBar/avatar.png'
|
|
17
17
|
}).as('avatar');
|
|
18
18
|
});
|
|
19
|
-
(0,
|
|
19
|
+
(0, _cypressCucumberPreprocessor.Given)('the HeaderBar loads without an error', () => {
|
|
20
20
|
cy.visitStory('HeaderBarTesting', 'Default');
|
|
21
21
|
});
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
require("../common/index.js");
|
|
3
|
+
var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
|
|
6
4
|
|
|
7
5
|
// see https://github.com/cypress-io/cypress/issues/17723#issuecomment-1457064322
|
|
8
6
|
const goOffline = () => {
|
|
@@ -18,34 +16,34 @@ const goOnline = () => {
|
|
|
18
16
|
.then(() => cy.intercept('*')).then(() => cy.window().then(win => win.dispatchEvent(new Event('online'))));
|
|
19
17
|
};
|
|
20
18
|
|
|
21
|
-
(0,
|
|
19
|
+
(0, _cypressCucumberPreprocessor.Before)(() => {
|
|
22
20
|
goOnline();
|
|
23
21
|
});
|
|
24
|
-
(0,
|
|
25
|
-
(0,
|
|
22
|
+
(0, _cypressCucumberPreprocessor.After)(() => goOnline());
|
|
23
|
+
(0, _cypressCucumberPreprocessor.Given)('the HeaderBar loads without error with showOnlineStatus configured', () => {
|
|
26
24
|
cy.visitStory('HeaderBarTesting', 'Show Online Status');
|
|
27
25
|
});
|
|
28
|
-
(0,
|
|
26
|
+
(0, _cypressCucumberPreprocessor.Given)('the HeaderBar loads without error when PWA is enabled', () => {
|
|
29
27
|
cy.visitStory('HeaderBarTesting', 'PWA Enabled');
|
|
30
28
|
});
|
|
31
|
-
(0,
|
|
29
|
+
(0, _cypressCucumberPreprocessor.Given)('the HeaderBar loads and is PWA enabled so online status messages will be visible', () => {
|
|
32
30
|
cy.visitStory('HeaderBarTesting', 'Online Status Messaging With PWA Enabled');
|
|
33
31
|
});
|
|
34
|
-
(0,
|
|
32
|
+
(0, _cypressCucumberPreprocessor.Given)('the viewport is narrower than 480px', () => {
|
|
35
33
|
cy.viewport(460, 660);
|
|
36
34
|
});
|
|
37
|
-
(0,
|
|
35
|
+
(0, _cypressCucumberPreprocessor.Then)('the HeaderBar does not render online status', () => {
|
|
38
36
|
cy.get('[data-test="headerbar-online-status"]').should('not.exist');
|
|
39
37
|
});
|
|
40
|
-
(0,
|
|
38
|
+
(0, _cypressCucumberPreprocessor.Then)('the HeaderBar renders online status', () => {
|
|
41
39
|
cy.get('[data-test="headerbar-online-status"]').should('exist');
|
|
42
40
|
});
|
|
43
|
-
(0,
|
|
41
|
+
(0, _cypressCucumberPreprocessor.Then)('the HeaderBar displays only the desktop status badge', () => {
|
|
44
42
|
// This assumes default viewport size: 1000x660
|
|
45
43
|
cy.get('[data-test="headerbar-online-status"].badge').should('be.visible');
|
|
46
44
|
cy.get('[data-test="headerbar-online-status"].bar').should('not.be.visible');
|
|
47
45
|
});
|
|
48
|
-
(0,
|
|
46
|
+
(0, _cypressCucumberPreprocessor.Then)('the status badge shows online', () => {
|
|
49
47
|
cy.get('[data-test="headerbar-online-status"].badge .label').should($label => {
|
|
50
48
|
expect($label.text()).to.equal('Online');
|
|
51
49
|
});
|
|
@@ -53,14 +51,14 @@ const goOnline = () => {
|
|
|
53
51
|
expect($icon).to.have.class('online');
|
|
54
52
|
});
|
|
55
53
|
});
|
|
56
|
-
(0,
|
|
54
|
+
(0, _cypressCucumberPreprocessor.Then)('the HeaderBar displays only the mobile status bar', () => {
|
|
57
55
|
cy.get('[data-test="headerbar-online-status"].bar').should('be.visible');
|
|
58
56
|
cy.get('[data-test="headerbar-online-status"].badge').should('not.be.visible');
|
|
59
57
|
});
|
|
60
|
-
(0,
|
|
58
|
+
(0, _cypressCucumberPreprocessor.Given)('the browser goes offline', () => {
|
|
61
59
|
goOffline();
|
|
62
60
|
});
|
|
63
|
-
(0,
|
|
61
|
+
(0, _cypressCucumberPreprocessor.Then)('the status badge shows offline', () => {
|
|
64
62
|
cy.get('[data-test="headerbar-online-status"].badge .label').should($label => {
|
|
65
63
|
expect($label.text()).to.equal('Offline');
|
|
66
64
|
});
|
|
@@ -68,25 +66,25 @@ const goOnline = () => {
|
|
|
68
66
|
expect($icon).to.have.class('offline');
|
|
69
67
|
});
|
|
70
68
|
});
|
|
71
|
-
(0,
|
|
69
|
+
(0, _cypressCucumberPreprocessor.Then)('no online status message text is displayed', () => {
|
|
72
70
|
cy.get('[data-test="headerbar-online-status"] .info').should('not.exist');
|
|
73
71
|
cy.get('[data-test="headerbar-online-status"] .info-dense').should('not.exist');
|
|
74
72
|
});
|
|
75
|
-
(0,
|
|
73
|
+
(0, _cypressCucumberPreprocessor.When)('an online status message is sent', () => {
|
|
76
74
|
cy.get('button').contains('display online status message').click();
|
|
77
75
|
});
|
|
78
|
-
(0,
|
|
76
|
+
(0, _cypressCucumberPreprocessor.When)('an online status message is removed', () => {
|
|
79
77
|
cy.get('button').contains('remove online status message').click();
|
|
80
78
|
});
|
|
81
|
-
(0,
|
|
79
|
+
(0, _cypressCucumberPreprocessor.Then)('an online status message is displayed', () => {
|
|
82
80
|
cy.get('[data-test="headerbar-online-status"] .info').should('include.text', '8 offline events');
|
|
83
81
|
});
|
|
84
|
-
(0,
|
|
82
|
+
(0, _cypressCucumberPreprocessor.Then)('an online status message is displayed with formatting for small screens', () => {
|
|
85
83
|
cy.get('[data-test="headerbar-online-status"] .info-dense').should('include.text', '8 offline events');
|
|
86
84
|
});
|
|
87
|
-
(0,
|
|
85
|
+
(0, _cypressCucumberPreprocessor.Then)('last online text is displayed in the status badge', () => {
|
|
88
86
|
cy.get('[data-test="headerbar-online-status"].badge .info').should('include.text', 'Last online');
|
|
89
87
|
});
|
|
90
|
-
(0,
|
|
88
|
+
(0, _cypressCucumberPreprocessor.Then)('last online text is displayed in the mobile status bar', () => {
|
|
91
89
|
cy.get('[data-test="headerbar-online-status"].bar .info-dense').should('include.text', 'Last online');
|
|
92
90
|
});
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
|
|
4
4
|
|
|
5
|
-
(0,
|
|
5
|
+
(0, _cypressCucumberPreprocessor.Given)('the user has the ALL authority', () => {
|
|
6
6
|
cy.visitStory('HeaderBarTesting', 'User Has All Authority');
|
|
7
7
|
});
|
|
8
|
-
(0,
|
|
8
|
+
(0, _cypressCucumberPreprocessor.Given)('the user has the M_dhis-web-interpretation and M_dhis-web-messaging authority', () => {
|
|
9
9
|
cy.visitStory('HeaderBarTesting', 'User Has Web Interpretation And Messaging Authority');
|
|
10
10
|
});
|
|
11
|
-
(0,
|
|
11
|
+
(0, _cypressCucumberPreprocessor.Given)('the user has the M_dhis-web-interpretation authority', () => {
|
|
12
12
|
cy.visitStory('HeaderBarTesting', 'User Has Web Interpretation Authority');
|
|
13
13
|
});
|
|
14
|
-
(0,
|
|
14
|
+
(0, _cypressCucumberPreprocessor.Given)('the user has the M_dhis-web-messaging authority', () => {
|
|
15
15
|
cy.visitStory('HeaderBarTesting', 'User Has Web Messaging Authority');
|
|
16
16
|
});
|
|
17
|
-
(0,
|
|
17
|
+
(0, _cypressCucumberPreprocessor.Given)('the user has authority for none of the apps', () => {
|
|
18
18
|
cy.visitStory('HeaderBarTesting', 'User Has No Authorities');
|
|
19
19
|
});
|
|
20
|
-
(0,
|
|
20
|
+
(0, _cypressCucumberPreprocessor.Then)('the messaging app icon is not rendered', () => {
|
|
21
21
|
cy.get('[data-test="headerbar-messages"]').should('not.exist');
|
|
22
22
|
});
|
|
23
|
-
(0,
|
|
23
|
+
(0, _cypressCucumberPreprocessor.Then)('the messaging app icon is rendered', () => {
|
|
24
24
|
cy.get('[data-test="headerbar-messages"]').should('exist');
|
|
25
25
|
});
|
|
26
|
-
(0,
|
|
26
|
+
(0, _cypressCucumberPreprocessor.Then)('the interpretations app icon is not rendered', () => {
|
|
27
27
|
cy.get('[data-test="headerbar-interpretations"]').should('not.exist');
|
|
28
28
|
});
|
|
29
|
-
(0,
|
|
29
|
+
(0, _cypressCucumberPreprocessor.Then)('the interpretations app icon is rendered', () => {
|
|
30
30
|
cy.get('[data-test="headerbar-interpretations"]').should('exist');
|
|
31
31
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
|
|
4
4
|
|
|
5
|
-
(0,
|
|
5
|
+
(0, _cypressCucumberPreprocessor.Then)('the HeaderBar dos not display the app menu', () => {
|
|
6
6
|
cy.get('[data-test="headerbar-apps-menu"]').should('not.exist');
|
|
7
7
|
});
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("
|
|
3
|
+
var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
(0, _steps.When)('the user opens the menu', () => {
|
|
5
|
+
(0, _cypressCucumberPreprocessor.When)('the user opens the menu', () => {
|
|
8
6
|
cy.get('[data-test="headerbar-apps-icon"]').click();
|
|
9
7
|
});
|
|
10
|
-
(0,
|
|
8
|
+
(0, _cypressCucumberPreprocessor.When)('the user clicks outside of the menu', () => {
|
|
11
9
|
cy.get('[data-test="headerbar-title"]').click();
|
|
12
10
|
});
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("
|
|
3
|
+
var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
(0, _steps.Then)('the HeaderBar displays a menu icon', () => {
|
|
5
|
+
(0, _cypressCucumberPreprocessor.Then)('the HeaderBar displays a menu icon', () => {
|
|
8
6
|
cy.get('[data-test="headerbar-apps-icon"]').should('exist');
|
|
9
7
|
});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
|
|
4
4
|
|
|
5
|
-
(0,
|
|
5
|
+
(0, _cypressCucumberPreprocessor.When)('the user clicks on the menu icons', () => {
|
|
6
6
|
cy.get('[data-test="headerbar-apps-icon"]').click();
|
|
7
7
|
});
|
|
8
|
-
(0,
|
|
8
|
+
(0, _cypressCucumberPreprocessor.Then)('the menu opens', () => {
|
|
9
9
|
cy.get('[data-test="headerbar-apps-menu"]').should('be.visible');
|
|
10
10
|
});
|
|
11
|
-
(0,
|
|
11
|
+
(0, _cypressCucumberPreprocessor.Then)('contains items with links', () => {
|
|
12
12
|
cy.get('[data-test="headerbar-apps-menu-list"]').find('a').its('length').should('be.greaterThan', 0);
|
|
13
13
|
});
|