@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.
Files changed (75) hide show
  1. package/build/cjs/__e2e__/stories/common.js +10 -199
  2. package/build/cjs/__e2e__/stories/modulesWithSpecialCharacters.js +204 -0
  3. package/build/cjs/features/common/index.js +3 -3
  4. package/build/cjs/features/the_headerbar_can_display_online_status/the_headerbar_displays_online_status.js +21 -23
  5. package/build/cjs/features/the_headerbar_conditionally_renders_notification_icons/the_headerbar_conditionally_renders_notification_icons.js +10 -10
  6. package/build/cjs/features/the_headerbar_contains_a_menu_to_all_apps/common.js +2 -2
  7. package/build/cjs/features/the_headerbar_contains_a_menu_to_all_apps/the_app_menu_closes_when_the_user_clicks_outside.js +3 -5
  8. package/build/cjs/features/the_headerbar_contains_a_menu_to_all_apps/the_headerbar_contains_a_menu_icon.js +2 -4
  9. 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
  10. package/build/cjs/features/the_headerbar_contains_a_profile_menu/common.js +3 -3
  11. 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
  12. 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
  13. package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_menu_is_closed_by_default.js +2 -3
  14. package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_menu_opens.js +3 -5
  15. package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_profile_menu_closes_when_the_user_clicks_outside.js +2 -4
  16. package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_user_can_edit_his_profile.js +2 -4
  17. package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_user_can_go_to_his_account.js +2 -4
  18. package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_user_can_go_to_the_about_dhis2_page.js +2 -4
  19. package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_user_can_go_to_the_help_page.js +2 -4
  20. package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_user_can_go_to_the_settings.js +2 -4
  21. package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_user_can_log_out.js +7 -7
  22. package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_user_name_and_email_are_displayed.js +3 -5
  23. 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
  24. package/build/cjs/features/the_headerbar_displays_a_link_to_interpretations_and_an_unread_count/there_are_no_unread_interpretations.js +3 -5
  25. package/build/cjs/features/the_headerbar_displays_a_link_to_interpretations_and_an_unread_count/there_are_some_unread_interpretations.js +2 -4
  26. 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
  27. package/build/cjs/features/the_headerbar_displays_a_link_to_messages_and_an_unread_count/there_are_no_unread_messages.js +3 -5
  28. package/build/cjs/features/the_headerbar_displays_a_link_to_messages_and_an_unread_count/there_are_some_unread_messages.js +2 -4
  29. package/build/cjs/features/the_headerbar_should_contain_a_logo_that_links_to_the_homepage/headerbar_contains_logo.js +3 -3
  30. package/build/cjs/features/the_headerbar_should_display_app_update_notification/index.js +11 -11
  31. package/build/cjs/features/the_headerbar_should_display_debug_version_infos/index.js +20 -20
  32. 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
  33. package/build/cjs/features/the_search_should_escape_regexp_character/common.js +2 -2
  34. package/build/cjs/features/the_search_should_escape_regexp_character/the_modules_do_not_contain_items_with_special_chars.js +3 -5
  35. package/build/cjs/features/the_search_should_escape_regexp_character/the_user_searches_for_an_app_with_a_regex_character.js +5 -7
  36. package/build/cjs/locales/lo/translations.json +11 -11
  37. package/build/es/__e2e__/stories/common.js +1 -197
  38. package/build/es/__e2e__/stories/modulesWithSpecialCharacters.js +197 -0
  39. package/build/es/features/common/index.js +1 -1
  40. package/build/es/features/the_headerbar_can_display_online_status/the_headerbar_displays_online_status.js +4 -5
  41. package/build/es/features/the_headerbar_conditionally_renders_notification_icons/the_headerbar_conditionally_renders_notification_icons.js +1 -1
  42. package/build/es/features/the_headerbar_contains_a_menu_to_all_apps/common.js +1 -1
  43. package/build/es/features/the_headerbar_contains_a_menu_to_all_apps/the_app_menu_closes_when_the_user_clicks_outside.js +1 -2
  44. package/build/es/features/the_headerbar_contains_a_menu_to_all_apps/the_headerbar_contains_a_menu_icon.js +1 -2
  45. 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
  46. package/build/es/features/the_headerbar_contains_a_profile_menu/common.js +1 -1
  47. 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
  48. 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
  49. package/build/es/features/the_headerbar_contains_a_profile_menu/the_menu_is_closed_by_default.js +1 -1
  50. package/build/es/features/the_headerbar_contains_a_profile_menu/the_menu_opens.js +1 -2
  51. package/build/es/features/the_headerbar_contains_a_profile_menu/the_profile_menu_closes_when_the_user_clicks_outside.js +1 -2
  52. package/build/es/features/the_headerbar_contains_a_profile_menu/the_user_can_edit_his_profile.js +1 -2
  53. package/build/es/features/the_headerbar_contains_a_profile_menu/the_user_can_go_to_his_account.js +1 -2
  54. package/build/es/features/the_headerbar_contains_a_profile_menu/the_user_can_go_to_the_about_dhis2_page.js +1 -2
  55. package/build/es/features/the_headerbar_contains_a_profile_menu/the_user_can_go_to_the_help_page.js +1 -2
  56. package/build/es/features/the_headerbar_contains_a_profile_menu/the_user_can_go_to_the_settings.js +1 -2
  57. package/build/es/features/the_headerbar_contains_a_profile_menu/the_user_can_log_out.js +3 -3
  58. package/build/es/features/the_headerbar_contains_a_profile_menu/the_user_name_and_email_are_displayed.js +1 -2
  59. 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
  60. package/build/es/features/the_headerbar_displays_a_link_to_interpretations_and_an_unread_count/there_are_no_unread_interpretations.js +1 -2
  61. package/build/es/features/the_headerbar_displays_a_link_to_interpretations_and_an_unread_count/there_are_some_unread_interpretations.js +1 -2
  62. 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
  63. package/build/es/features/the_headerbar_displays_a_link_to_messages_and_an_unread_count/there_are_no_unread_messages.js +1 -2
  64. package/build/es/features/the_headerbar_displays_a_link_to_messages_and_an_unread_count/there_are_some_unread_messages.js +1 -2
  65. package/build/es/features/the_headerbar_should_contain_a_logo_that_links_to_the_homepage/headerbar_contains_logo.js +1 -1
  66. package/build/es/features/the_headerbar_should_display_app_update_notification/index.js +1 -1
  67. package/build/es/features/the_headerbar_should_display_debug_version_infos/index.js +1 -1
  68. 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
  69. package/build/es/features/the_search_should_escape_regexp_character/common.js +1 -1
  70. package/build/es/features/the_search_should_escape_regexp_character/the_modules_do_not_contain_items_with_special_chars.js +1 -2
  71. package/build/es/features/the_search_should_escape_regexp_character/the_user_searches_for_an_app_with_a_regex_character.js +2 -3
  72. package/build/es/locales/lo/translations.json +11 -11
  73. package/package.json +15 -15
  74. package/build/cjs/features/the_headerbar_contains_a_menu_to_all_apps/the_menu_is_closed_by_default.js +0 -11
  75. package/build/es/features/the_headerbar_contains_a_menu_to_all_apps/the_menu_is_closed_by_default.js +0 -6
@@ -2,6 +2,7 @@
2
2
  import { CustomDataProvider, Provider, useAlerts } from '@dhis2/app-runtime';
3
3
  import PropTypes from 'prop-types';
4
4
  import React, { useEffect } from 'react';
5
+ export { modulesWithSpecialCharacters } from './modulesWithSpecialCharacters.js';
5
6
  export const defaultModules = [{
6
7
  name: 'dhis-web-dashboard',
7
8
  namespace: '/dhis-web-dashboard',
@@ -66,203 +67,6 @@ export const defaultModules = [{
66
67
  icon: 'https://debug.dhis2.org/dev/api/apps/Dashboard-Classic/icon.png',
67
68
  description: 'DHIS2 Legacy Dashboard App'
68
69
  }];
69
- export const modulesWithSpecialCharacters = [{
70
- name: '/',
71
- namespace: '//',
72
- defaultAction: '..//.action',
73
- displayName: 'A / character',
74
- icon: '../icons/dhis-web-dashboard.png',
75
- description: ''
76
- }, {
77
- name: '-',
78
- namespace: '/-',
79
- defaultAction: '../-.action',
80
- displayName: 'A - character',
81
- icon: '../icons/dhis-web-dashboard.png',
82
- description: ''
83
- }, {
84
- name: '(',
85
- namespace: '/(',
86
- defaultAction: '../(.action',
87
- displayName: 'A ( character',
88
- icon: '../icons/dhis-web-data-visualizer.png',
89
- description: ''
90
- }, {
91
- name: ')',
92
- namespace: '/)',
93
- defaultAction: '../).action',
94
- displayName: 'A ) character',
95
- icon: '../icons/dhis-web-data-visualizer.png',
96
- description: ''
97
- }, {
98
- name: '[',
99
- namespace: '/[',
100
- defaultAction: '../[.action',
101
- displayName: 'A [ character',
102
- icon: '../icons/dhis-web-data-visualizer.png',
103
- description: ''
104
- }, {
105
- name: ']',
106
- namespace: '/]',
107
- defaultAction: '../].action',
108
- displayName: 'A ] character',
109
- icon: '../icons/dhis-web-data-visualizer.png',
110
- description: ''
111
- }, {
112
- name: '{',
113
- namespace: '/{',
114
- defaultAction: '../{.action',
115
- displayName: 'A { character',
116
- icon: '../icons/dhis-web-data-visualizer.png',
117
- description: ''
118
- }, {
119
- name: '}',
120
- namespace: '/}',
121
- defaultAction: '../}.action',
122
- displayName: 'A } character',
123
- icon: '../icons/dhis-web-data-visualizer.png',
124
- description: ''
125
- }, {
126
- name: '*',
127
- namespace: '/*',
128
- defaultAction: '../*.action',
129
- displayName: 'A * character',
130
- icon: '../icons/dhis-web-data-visualizer.png',
131
- description: ''
132
- }, {
133
- name: '+',
134
- namespace: '/+',
135
- defaultAction: '../+.action',
136
- displayName: 'A + character',
137
- icon: '../icons/dhis-web-data-visualizer.png',
138
- description: ''
139
- }, {
140
- name: '?',
141
- namespace: '/?',
142
- defaultAction: '../?.action',
143
- displayName: 'A ? character',
144
- icon: '../icons/dhis-web-data-visualizer.png',
145
- description: ''
146
- }, {
147
- name: '.',
148
- namespace: '/.',
149
- defaultAction: '../..action',
150
- displayName: 'A . character',
151
- icon: '../icons/dhis-web-data-visualizer.png',
152
- description: ''
153
- }, {
154
- name: ',',
155
- namespace: '/,',
156
- defaultAction: '../,.action',
157
- displayName: 'A , character',
158
- icon: '../icons/dhis-web-data-visualizer.png',
159
- description: ''
160
- }, {
161
- name: '^',
162
- namespace: '/^',
163
- defaultAction: '../^.action',
164
- displayName: 'A ^ character',
165
- icon: '../icons/dhis-web-data-visualizer.png',
166
- description: ''
167
- }, {
168
- name: '$',
169
- namespace: '/$',
170
- defaultAction: '../$.action',
171
- displayName: 'A $ character',
172
- icon: '../icons/dhis-web-data-visualizer.png',
173
- description: ''
174
- }, {
175
- name: '|',
176
- namespace: '/|',
177
- defaultAction: '../|.action',
178
- displayName: 'A | character',
179
- icon: '../icons/dhis-web-data-visualizer.png',
180
- description: ''
181
- }, {
182
- name: '#',
183
- namespace: '/#',
184
- defaultAction: '../#.action',
185
- displayName: 'A # character',
186
- icon: '../icons/dhis-web-data-visualizer.png',
187
- description: ''
188
- }, {
189
- name: '\\s',
190
- namespace: '/\\s',
191
- defaultAction: '../\\s.action',
192
- displayName: 'A \\s character',
193
- icon: '../icons/dhis-web-data-visualizer.png',
194
- description: ''
195
- }, {
196
- name: '\\',
197
- namespace: '/\\',
198
- defaultAction: '../\\.action',
199
- displayName: 'A \\ character',
200
- icon: '../icons/dhis-web-data-visualizer.png',
201
- description: ''
202
- }, {
203
- name: 'dhis-web-dashboard',
204
- namespace: '/dhis-web-dashboard',
205
- defaultAction: '../dhis-web-dashboard/index.action',
206
- displayName: 'Dashboard',
207
- icon: '../icons/dhis-web-dashboard.png',
208
- description: ''
209
- }, {
210
- name: 'dhis-web-capture',
211
- namespace: '/dhis-web-capture',
212
- defaultAction: '../dhis-web-capture/index.action',
213
- displayName: 'Capture',
214
- icon: '../icons/dhis-web-capture.png',
215
- description: ''
216
- }, {
217
- name: 'dhis-web-maintenance',
218
- namespace: '/dhis-web-maintenance',
219
- defaultAction: '../dhis-web-maintenance/index.action',
220
- displayName: 'Maintenance',
221
- icon: '../icons/dhis-web-maintenance.png',
222
- description: ''
223
- }, {
224
- name: 'dhis-web-maps',
225
- namespace: '/dhis-web-maps',
226
- defaultAction: '../dhis-web-maps/index.action',
227
- displayName: 'Maps',
228
- icon: '../icons/dhis-web-maps.png',
229
- description: ''
230
- }, {
231
- name: 'dhis-web-event-reports',
232
- namespace: '/dhis-web-event-reports',
233
- defaultAction: '../dhis-web-event-reports/index.action',
234
- displayName: 'Event Reports',
235
- icon: '../icons/dhis-web-event-reports.png',
236
- description: ''
237
- }, {
238
- name: 'dhis-web-interpretation',
239
- namespace: '/dhis-web-interpretation',
240
- defaultAction: '../dhis-web-interpretation/index.action',
241
- displayName: 'Interpretations',
242
- icon: '../icons/dhis-web-interpretation.png',
243
- description: ''
244
- }, {
245
- name: 'dhis-web-import-export',
246
- namespace: '/dhis-web-import-export',
247
- defaultAction: '../dhis-web-import-export/index.action',
248
- displayName: 'Import/Export',
249
- icon: '../icons/dhis-web-importexport.png',
250
- description: ''
251
- }, {
252
- name: 'WHO Metadata browser',
253
- namespace: 'WHO Metadata browser',
254
- defaultAction: 'https://debug.dhis2.org/dev/api/apps/WHO-Metadata-browser/index.html',
255
- displayName: '',
256
- icon: 'https://debug.dhis2.org/dev/api/apps/WHO-Metadata-browser/icons/medicine-48.png',
257
- description: ''
258
- }, {
259
- name: 'Dashboard Classic',
260
- namespace: 'Dashboard Classic',
261
- defaultAction: 'https://debug.dhis2.org/dev/api/apps/Dashboard-Classic/index.html',
262
- displayName: '',
263
- icon: 'https://debug.dhis2.org/dev/api/apps/Dashboard-Classic/icon.png',
264
- description: 'DHIS2 Legacy Dashboard App'
265
- }];
266
70
  export const applicationTitle = 'Foobar';
267
71
  export const dataProviderData = {
268
72
  'systemSettings/applicationTitle': {
@@ -0,0 +1,197 @@
1
+ export const modulesWithSpecialCharacters = [{
2
+ name: '/',
3
+ namespace: '//',
4
+ defaultAction: '..//.action',
5
+ displayName: 'A / character',
6
+ icon: '../icons/dhis-web-dashboard.png',
7
+ description: ''
8
+ }, {
9
+ name: '-',
10
+ namespace: '/-',
11
+ defaultAction: '../-.action',
12
+ displayName: 'A - character',
13
+ icon: '../icons/dhis-web-dashboard.png',
14
+ description: ''
15
+ }, {
16
+ name: '(',
17
+ namespace: '/(',
18
+ defaultAction: '../(.action',
19
+ displayName: 'A ( character',
20
+ icon: '../icons/dhis-web-data-visualizer.png',
21
+ description: ''
22
+ }, {
23
+ name: ')',
24
+ namespace: '/)',
25
+ defaultAction: '../).action',
26
+ displayName: 'A ) character',
27
+ icon: '../icons/dhis-web-data-visualizer.png',
28
+ description: ''
29
+ }, {
30
+ name: '[',
31
+ namespace: '/[',
32
+ defaultAction: '../[.action',
33
+ displayName: 'A [ character',
34
+ icon: '../icons/dhis-web-data-visualizer.png',
35
+ description: ''
36
+ }, {
37
+ name: ']',
38
+ namespace: '/]',
39
+ defaultAction: '../].action',
40
+ displayName: 'A ] character',
41
+ icon: '../icons/dhis-web-data-visualizer.png',
42
+ description: ''
43
+ }, {
44
+ name: '{',
45
+ namespace: '/{',
46
+ defaultAction: '../{.action',
47
+ displayName: 'A { character',
48
+ icon: '../icons/dhis-web-data-visualizer.png',
49
+ description: ''
50
+ }, {
51
+ name: '}',
52
+ namespace: '/}',
53
+ defaultAction: '../}.action',
54
+ displayName: 'A } character',
55
+ icon: '../icons/dhis-web-data-visualizer.png',
56
+ description: ''
57
+ }, {
58
+ name: '*',
59
+ namespace: '/*',
60
+ defaultAction: '../*.action',
61
+ displayName: 'A * character',
62
+ icon: '../icons/dhis-web-data-visualizer.png',
63
+ description: ''
64
+ }, {
65
+ name: '+',
66
+ namespace: '/+',
67
+ defaultAction: '../+.action',
68
+ displayName: 'A + character',
69
+ icon: '../icons/dhis-web-data-visualizer.png',
70
+ description: ''
71
+ }, {
72
+ name: '?',
73
+ namespace: '/?',
74
+ defaultAction: '../?.action',
75
+ displayName: 'A ? character',
76
+ icon: '../icons/dhis-web-data-visualizer.png',
77
+ description: ''
78
+ }, {
79
+ name: '.',
80
+ namespace: '/.',
81
+ defaultAction: '../..action',
82
+ displayName: 'A . character',
83
+ icon: '../icons/dhis-web-data-visualizer.png',
84
+ description: ''
85
+ }, {
86
+ name: ',',
87
+ namespace: '/,',
88
+ defaultAction: '../,.action',
89
+ displayName: 'A , character',
90
+ icon: '../icons/dhis-web-data-visualizer.png',
91
+ description: ''
92
+ }, {
93
+ name: '^',
94
+ namespace: '/^',
95
+ defaultAction: '../^.action',
96
+ displayName: 'A ^ character',
97
+ icon: '../icons/dhis-web-data-visualizer.png',
98
+ description: ''
99
+ }, {
100
+ name: '$',
101
+ namespace: '/$',
102
+ defaultAction: '../$.action',
103
+ displayName: 'A $ character',
104
+ icon: '../icons/dhis-web-data-visualizer.png',
105
+ description: ''
106
+ }, {
107
+ name: '|',
108
+ namespace: '/|',
109
+ defaultAction: '../|.action',
110
+ displayName: 'A | character',
111
+ icon: '../icons/dhis-web-data-visualizer.png',
112
+ description: ''
113
+ }, {
114
+ name: '#',
115
+ namespace: '/#',
116
+ defaultAction: '../#.action',
117
+ displayName: 'A # character',
118
+ icon: '../icons/dhis-web-data-visualizer.png',
119
+ description: ''
120
+ }, {
121
+ name: '\\s',
122
+ namespace: '/\\s',
123
+ defaultAction: '../\\s.action',
124
+ displayName: 'A \\s character',
125
+ icon: '../icons/dhis-web-data-visualizer.png',
126
+ description: ''
127
+ }, {
128
+ name: '\\',
129
+ namespace: '/\\',
130
+ defaultAction: '../\\.action',
131
+ displayName: 'A \\ character',
132
+ icon: '../icons/dhis-web-data-visualizer.png',
133
+ description: ''
134
+ }, {
135
+ name: 'dhis-web-dashboard',
136
+ namespace: '/dhis-web-dashboard',
137
+ defaultAction: '../dhis-web-dashboard/index.action',
138
+ displayName: 'Dashboard',
139
+ icon: '../icons/dhis-web-dashboard.png',
140
+ description: ''
141
+ }, {
142
+ name: 'dhis-web-capture',
143
+ namespace: '/dhis-web-capture',
144
+ defaultAction: '../dhis-web-capture/index.action',
145
+ displayName: 'Capture',
146
+ icon: '../icons/dhis-web-capture.png',
147
+ description: ''
148
+ }, {
149
+ name: 'dhis-web-maintenance',
150
+ namespace: '/dhis-web-maintenance',
151
+ defaultAction: '../dhis-web-maintenance/index.action',
152
+ displayName: 'Maintenance',
153
+ icon: '../icons/dhis-web-maintenance.png',
154
+ description: ''
155
+ }, {
156
+ name: 'dhis-web-maps',
157
+ namespace: '/dhis-web-maps',
158
+ defaultAction: '../dhis-web-maps/index.action',
159
+ displayName: 'Maps',
160
+ icon: '../icons/dhis-web-maps.png',
161
+ description: ''
162
+ }, {
163
+ name: 'dhis-web-event-reports',
164
+ namespace: '/dhis-web-event-reports',
165
+ defaultAction: '../dhis-web-event-reports/index.action',
166
+ displayName: 'Event Reports',
167
+ icon: '../icons/dhis-web-event-reports.png',
168
+ description: ''
169
+ }, {
170
+ name: 'dhis-web-interpretation',
171
+ namespace: '/dhis-web-interpretation',
172
+ defaultAction: '../dhis-web-interpretation/index.action',
173
+ displayName: 'Interpretations',
174
+ icon: '../icons/dhis-web-interpretation.png',
175
+ description: ''
176
+ }, {
177
+ name: 'dhis-web-import-export',
178
+ namespace: '/dhis-web-import-export',
179
+ defaultAction: '../dhis-web-import-export/index.action',
180
+ displayName: 'Import/Export',
181
+ icon: '../icons/dhis-web-importexport.png',
182
+ description: ''
183
+ }, {
184
+ name: 'WHO Metadata browser',
185
+ namespace: 'WHO Metadata browser',
186
+ defaultAction: 'https://debug.dhis2.org/dev/api/apps/WHO-Metadata-browser/index.html',
187
+ displayName: '',
188
+ icon: 'https://debug.dhis2.org/dev/api/apps/WHO-Metadata-browser/icons/medicine-48.png',
189
+ description: ''
190
+ }, {
191
+ name: 'Dashboard Classic',
192
+ namespace: 'Dashboard Classic',
193
+ defaultAction: 'https://debug.dhis2.org/dev/api/apps/Dashboard-Classic/index.html',
194
+ displayName: '',
195
+ icon: 'https://debug.dhis2.org/dev/api/apps/Dashboard-Classic/icon.png',
196
+ description: 'DHIS2 Legacy Dashboard App'
197
+ }];
@@ -1,4 +1,4 @@
1
- import { Before, Given } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Before, Given } from '@badeball/cypress-cucumber-preprocessor';
2
2
  export const baseUrl = 'https://domain.tld/';
3
3
  export const webCommons = 'https://domain.tld/dhis-web-commons/';
4
4
  Before(() => {
@@ -1,5 +1,4 @@
1
- import { Before, After, Given, Then, When, And } from 'cypress-cucumber-preprocessor/steps';
2
- import '../common/index.js'; // see https://github.com/cypress-io/cypress/issues/17723#issuecomment-1457064322
1
+ import { Before, After, Given, Then, When } from '@badeball/cypress-cucumber-preprocessor'; // see https://github.com/cypress-io/cypress/issues/17723#issuecomment-1457064322
3
2
 
4
3
  const goOffline = () => {
5
4
  cy.log('**go offline**') // stub every request with a StaticResponse to simulate network error
@@ -27,7 +26,7 @@ Given('the HeaderBar loads without error when PWA is enabled', () => {
27
26
  Given('the HeaderBar loads and is PWA enabled so online status messages will be visible', () => {
28
27
  cy.visitStory('HeaderBarTesting', 'Online Status Messaging With PWA Enabled');
29
28
  });
30
- And('the viewport is narrower than 480px', () => {
29
+ Given('the viewport is narrower than 480px', () => {
31
30
  cy.viewport(460, 660);
32
31
  });
33
32
  Then('the HeaderBar does not render online status', () => {
@@ -41,7 +40,7 @@ Then('the HeaderBar displays only the desktop status badge', () => {
41
40
  cy.get('[data-test="headerbar-online-status"].badge').should('be.visible');
42
41
  cy.get('[data-test="headerbar-online-status"].bar').should('not.be.visible');
43
42
  });
44
- And('the status badge shows online', () => {
43
+ Then('the status badge shows online', () => {
45
44
  cy.get('[data-test="headerbar-online-status"].badge .label').should($label => {
46
45
  expect($label.text()).to.equal('Online');
47
46
  });
@@ -53,7 +52,7 @@ Then('the HeaderBar displays only the mobile status bar', () => {
53
52
  cy.get('[data-test="headerbar-online-status"].bar').should('be.visible');
54
53
  cy.get('[data-test="headerbar-online-status"].badge').should('not.be.visible');
55
54
  });
56
- And('the browser goes offline', () => {
55
+ Given('the browser goes offline', () => {
57
56
  goOffline();
58
57
  });
59
58
  Then('the status badge shows offline', () => {
@@ -1,4 +1,4 @@
1
- import { Given, Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Given, Then } from '@badeball/cypress-cucumber-preprocessor';
2
2
  Given('the user has the ALL authority', () => {
3
3
  cy.visitStory('HeaderBarTesting', 'User Has All Authority');
4
4
  });
@@ -1,4 +1,4 @@
1
- import { Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Then } from '@badeball/cypress-cucumber-preprocessor';
2
2
  Then('the HeaderBar dos not display the app menu', () => {
3
3
  cy.get('[data-test="headerbar-apps-menu"]').should('not.exist');
4
4
  });
@@ -1,5 +1,4 @@
1
- import '../common/index.js';
2
- import { When } from 'cypress-cucumber-preprocessor/steps';
1
+ import { When } from '@badeball/cypress-cucumber-preprocessor';
3
2
  When('the user opens the menu', () => {
4
3
  cy.get('[data-test="headerbar-apps-icon"]').click();
5
4
  });
@@ -1,5 +1,4 @@
1
- import '../common/index.js';
2
- import { Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Then } from '@badeball/cypress-cucumber-preprocessor';
3
2
  Then('the HeaderBar displays a menu icon', () => {
4
3
  cy.get('[data-test="headerbar-apps-icon"]').should('exist');
5
4
  });
@@ -1,4 +1,4 @@
1
- import { When, Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { When, Then } from '@badeball/cypress-cucumber-preprocessor';
2
2
  When('the user clicks on the menu icons', () => {
3
3
  cy.get('[data-test="headerbar-apps-icon"]').click();
4
4
  });
@@ -1,4 +1,4 @@
1
- import { Then, When } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Then, When } from '@badeball/cypress-cucumber-preprocessor';
2
2
  Then('the HeaderBar does not display the profile menu', () => {
3
3
  cy.get('[data-test="headerbar-profile-menu"]').should('not.exist');
4
4
  });
@@ -1,5 +1,4 @@
1
- import '../common/index.js';
2
- import { Given, Then, When } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Given, Then, When } from '@badeball/cypress-cucumber-preprocessor';
3
2
  Given('the HeaderBar loads without an error and the user does not have an avatar', () => {
4
3
  cy.visitStory('HeaderBarTesting', 'Default');
5
4
  });
@@ -1,4 +1,4 @@
1
- import { Given, Then, When } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Given, Then, When } from '@badeball/cypress-cucumber-preprocessor';
2
2
  Given('the HeaderBar loads without an error and the user has an avatar', () => {
3
3
  cy.visitStory('HeaderBarTesting', 'Me With Avatar');
4
4
  });
@@ -1 +1 @@
1
- import '../common/index.js'; // all step definitions are shared with other scenarios
1
+ // all step definitions are shared with other scenarios
@@ -1,5 +1,4 @@
1
- import '../common/index.js';
2
- import { When, Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { When, Then } from '@badeball/cypress-cucumber-preprocessor';
3
2
  When('the user clicks on the profile icons', () => {
4
3
  cy.get("\n [data-test=\"headerbar-profile-icon-text\"],\n [data-test=\"headerbar-profile-icon-image\"]\n ").click();
5
4
  });
@@ -1,5 +1,4 @@
1
- import '../common/index.js';
2
- import { When } from 'cypress-cucumber-preprocessor/steps';
1
+ import { When } from '@badeball/cypress-cucumber-preprocessor';
3
2
  When('the user clicks outside of the menu', () => {
4
3
  cy.get('[data-test="headerbar-title"]').click();
5
4
  });
@@ -1,5 +1,4 @@
1
- import '../common/index.js';
2
- import { Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Then } from '@badeball/cypress-cucumber-preprocessor';
3
2
  Then('contains a link to edit the profile', () => {
4
3
  cy.get('[data-test="headerbar-profile-edit-profile-link"]').should('be.visible');
5
4
  });
@@ -1,5 +1,4 @@
1
- import '../common/index.js';
2
- import { Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Then } from '@badeball/cypress-cucumber-preprocessor';
3
2
  Then('contains a link to the user account', () => {
4
3
  cy.get('[data-test="headerbar-profile-menu"] > li').should(lis => {
5
4
  expect(lis.eq(1)).to.be.visible;
@@ -1,5 +1,4 @@
1
- import '../common/index.js';
2
- import { Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Then } from '@badeball/cypress-cucumber-preprocessor';
3
2
  Then('contains a link to the About DHIS2 page', () => {
4
3
  cy.get('[data-test="headerbar-profile-menu"] > li').should(lis => {
5
4
  expect(lis.eq(3)).to.be.visible;
@@ -1,5 +1,4 @@
1
- import '../common/index.js';
2
- import { Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Then } from '@badeball/cypress-cucumber-preprocessor';
3
2
  Then('contains a link to the help page', () => {
4
3
  cy.get('[data-test="headerbar-profile-menu"] > li').should(lis => {
5
4
  expect(lis.eq(2)).to.be.visible;
@@ -1,5 +1,4 @@
1
- import '../common/index.js';
2
- import { Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Then } from '@badeball/cypress-cucumber-preprocessor';
3
2
  Then('contains a link to the settings', () => {
4
3
  cy.get('[data-test="headerbar-profile-menu"] > li').should(lis => {
5
4
  expect(lis.eq(0)).to.be.visible;
@@ -1,4 +1,4 @@
1
- import { And, Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { When, Then } from '@badeball/cypress-cucumber-preprocessor';
2
2
  import { baseUrl } from '../common/index.js';
3
3
  const logoutUrl = "".concat(baseUrl, "dhis-web-commons-security/logout.action");
4
4
  Then('contains a link to log out the user', () => {
@@ -8,7 +8,7 @@ Then('contains a link to log out the user', () => {
8
8
  expect(menuItem.find('a')).to.have.attr('href', logoutUrl);
9
9
  });
10
10
  });
11
- And('there is no loading mask', () => {
11
+ When('there is no loading mask', () => {
12
12
  cy.get('[data-test="headerbar-profile-menu-loading-mask"]').should('not.exist');
13
13
  });
14
14
  Then('the user clicks the link to log out', () => {
@@ -18,7 +18,7 @@ Then('a loading mask covers the screen', () => {
18
18
  cy.get('[data-test="headerbar-profile-menu-loading-mask"]').should('be.visible');
19
19
  }); // Currently not working
20
20
 
21
- And('clearSensitiveCaches is called', async () => {
21
+ When('clearSensitiveCaches is called', async () => {
22
22
  // Open caches to test 'clearSensitiveCaches':
23
23
  // A keepable cache
24
24
  await caches.open('workbox-precache-v2-asdf'); // Other, potentially-sensitive cache
@@ -1,5 +1,4 @@
1
- import '../common/index.js';
2
- import { Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Then } from '@badeball/cypress-cucumber-preprocessor';
3
2
  Then('contains the user name', () => {
4
3
  cy.all(() => cy.window(), () => cy.get('[data-test="headerbar-profile-username"]')).then(_ref => {
5
4
  let [win, $name] = _ref;
@@ -1,5 +1,4 @@
1
- import '../common/index.js';
2
- import { Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Then } from '@badeball/cypress-cucumber-preprocessor';
3
2
  Then('the HeaderBar contains a link to the interpretations', () => {
4
3
  cy.get('[data-test="headerbar-interpretations"]').should('be.visible');
5
4
  });
@@ -1,5 +1,4 @@
1
- import '../common/index.js';
2
- import { Given, Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Given, Then } from '@badeball/cypress-cucumber-preprocessor';
3
2
  Given('there are 0 unread interpretations', () => {
4
3
  cy.visitStory('HeaderBarTesting', 'Zero Unread Interpretations');
5
4
  });
@@ -1,5 +1,4 @@
1
- import '../common/index.js';
2
- import { Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Then } from '@badeball/cypress-cucumber-preprocessor';
3
2
  Then('the interpretations link contains an icon with a number greater than 0', () => {
4
3
  cy.get('[data-test="headerbar-interpretations-count"]').should($count => {
5
4
  expect(parseInt($count.text(), 10)).to.be.greaterThan(0);
@@ -1,5 +1,4 @@
1
- import '../common/index.js';
2
- import { Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Then } from '@badeball/cypress-cucumber-preprocessor';
3
2
  Then('the HeaderBar contains a link to the messages', () => {
4
3
  cy.get('[data-test="headerbar-messages"]').should('be.visible');
5
4
  });
@@ -1,5 +1,4 @@
1
- import '../common/index.js';
2
- import { Then, Given } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Then, Given } from '@badeball/cypress-cucumber-preprocessor';
3
2
  Given('there are 0 unread messages', () => {
4
3
  cy.visitStory('HeaderBarTesting', 'Zero Unread Messages');
5
4
  });
@@ -1,5 +1,4 @@
1
- import '../common/index.js';
2
- import { Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Then } from '@badeball/cypress-cucumber-preprocessor';
3
2
  Then('the messages link contains an icon with a number greater than 0', () => {
4
3
  cy.get('[data-test="headerbar-messages-count"]').should($count => {
5
4
  expect(parseInt($count.text(), 10)).to.be.greaterThan(0);