@dhis2-ui/header-bar 9.11.0 → 9.11.1-beta.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.
Files changed (117) hide show
  1. package/build/cjs/__e2e__/{header-bar.stories.e2e.js → header-bar.e2e.stories.js} +2 -20
  2. package/build/cjs/__e2e__/stories/common.js +12 -33
  3. package/build/cjs/__e2e__/stories/custom-application-title.js +3 -8
  4. package/build/cjs/__e2e__/stories/default.js +1 -7
  5. package/build/cjs/__e2e__/stories/me-with-avatar.js +3 -8
  6. package/build/cjs/__e2e__/stories/modulesWithSpecialCharacters.js +2 -3
  7. package/build/cjs/__e2e__/stories/online-status-message.js +4 -14
  8. package/build/cjs/__e2e__/stories/pwa-enabled.js +3 -8
  9. package/build/cjs/__e2e__/stories/user-has-all-authority.js +5 -9
  10. package/build/cjs/__e2e__/stories/user-has-no-authorities.js +5 -9
  11. package/build/cjs/__e2e__/stories/user-has-web-interpretation-and-messaging-authority.js +5 -9
  12. package/build/cjs/__e2e__/stories/user-has-web-interpretation-authority.js +5 -9
  13. package/build/cjs/__e2e__/stories/user-has-web-messaging-authority.js +5 -9
  14. package/build/cjs/__e2e__/stories/with-debug-info-edge-cases.js +11 -18
  15. package/build/cjs/__e2e__/stories/with-special-app-name-character.js +5 -9
  16. package/build/cjs/__e2e__/stories/with-update-available-notification.js +6 -13
  17. package/build/cjs/__e2e__/stories/zero-unread-interpretations.js +3 -8
  18. package/build/cjs/__e2e__/stories/zero-unread-messages.js +3 -8
  19. package/build/cjs/apps.js +9 -34
  20. package/build/cjs/debug-info/debug-info-menu-item.js +4 -17
  21. package/build/cjs/debug-info/debug-info-modal.js +2 -15
  22. package/build/cjs/debug-info/debug-info-table.js +2 -9
  23. package/build/cjs/debug-info/use-debug-info.js +0 -5
  24. package/build/cjs/features/common/index.js +3 -7
  25. package/build/cjs/features/the_headerbar_can_display_online_status/the_headerbar_displays_online_status.js +9 -5
  26. package/build/cjs/features/the_headerbar_conditionally_renders_notification_icons/the_headerbar_conditionally_renders_notification_icons.js +0 -1
  27. package/build/cjs/features/the_headerbar_contains_a_menu_to_all_apps/common.js +0 -1
  28. package/build/cjs/features/the_headerbar_contains_a_menu_to_all_apps/the_app_menu_closes_when_the_user_clicks_outside.js +0 -1
  29. package/build/cjs/features/the_headerbar_contains_a_menu_to_all_apps/the_headerbar_contains_a_menu_icon.js +0 -1
  30. package/build/cjs/features/the_headerbar_contains_a_menu_to_all_apps/the_user_will_be_offered_a_menu_with_5_apps.js +0 -1
  31. package/build/cjs/features/the_headerbar_contains_a_profile_menu/common.js +4 -2
  32. 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 +2 -3
  33. package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_headerbar_shows_an_image_icon_if_the_user_has_an_avatar.js +0 -1
  34. package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_menu_opens.js +4 -2
  35. package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_profile_menu_closes_when_the_user_clicks_outside.js +0 -1
  36. package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_user_can_edit_his_profile.js +0 -1
  37. package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_user_can_go_to_his_account.js +0 -1
  38. package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_user_can_go_to_the_about_dhis2_page.js +0 -1
  39. package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_user_can_go_to_the_help_page.js +0 -1
  40. package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_user_can_go_to_the_settings.js +0 -1
  41. package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_user_can_log_out.js +16 -14
  42. package/build/cjs/features/the_headerbar_contains_a_profile_menu/the_user_name_and_email_are_displayed.js +0 -1
  43. package/build/cjs/features/the_headerbar_displays_a_link_to_interpretations_and_an_unread_count/the_headerbar_displays_a_link_to_the_interpretations.js +0 -1
  44. package/build/cjs/features/the_headerbar_displays_a_link_to_interpretations_and_an_unread_count/there_are_no_unread_interpretations.js +0 -1
  45. package/build/cjs/features/the_headerbar_displays_a_link_to_interpretations_and_an_unread_count/there_are_some_unread_interpretations.js +0 -1
  46. package/build/cjs/features/the_headerbar_displays_a_link_to_messages_and_an_unread_count/the_headerbar_displays_a_link_to_the_messages.js +0 -1
  47. package/build/cjs/features/the_headerbar_displays_a_link_to_messages_and_an_unread_count/there_are_no_unread_messages.js +0 -1
  48. package/build/cjs/features/the_headerbar_displays_a_link_to_messages_and_an_unread_count/there_are_some_unread_messages.js +0 -1
  49. package/build/cjs/features/the_headerbar_should_contain_a_logo_that_links_to_the_homepage/headerbar_contains_logo.js +0 -2
  50. package/build/cjs/features/the_headerbar_should_display_app_update_notification/index.js +0 -1
  51. package/build/cjs/features/the_headerbar_should_display_debug_version_infos/index.js +0 -1
  52. package/build/cjs/features/the_headerbar_should_display_the_title_provided_by_the_backend_and_the_app/the_headerbar_displays_the_custom_title.js +0 -1
  53. package/build/cjs/features/the_search_should_escape_regexp_character/common.js +0 -1
  54. package/build/cjs/features/the_search_should_escape_regexp_character/the_modules_do_not_contain_items_with_special_chars.js +0 -1
  55. package/build/cjs/features/the_search_should_escape_regexp_character/the_user_searches_for_an_app_with_a_regex_character.js +2 -4
  56. package/build/cjs/header-bar-context.js +3 -13
  57. package/build/cjs/header-bar.js +8 -31
  58. package/build/cjs/{header-bar.stories.js → header-bar.prod.stories.js} +33 -40
  59. package/build/cjs/index.js +0 -1
  60. package/build/cjs/join-path.js +0 -3
  61. package/build/cjs/locales/index.js +3 -77
  62. package/build/cjs/logo-image.js +2 -15
  63. package/build/cjs/logo.js +1 -8
  64. package/build/cjs/notification-icon.js +3 -13
  65. package/build/cjs/notifications.js +1 -12
  66. package/build/cjs/online-status.js +6 -16
  67. package/build/cjs/online-status.styles.js +2 -5
  68. package/build/cjs/profile/use-on-doc-click.js +0 -4
  69. package/build/cjs/profile/use-on-doc-click.test.js +0 -2
  70. package/build/cjs/profile-menu/index.js +0 -2
  71. package/build/cjs/profile-menu/profile-header.js +2 -20
  72. package/build/cjs/profile-menu/profile-menu.js +10 -33
  73. package/build/cjs/profile-menu/update-notification.js +3 -17
  74. package/build/cjs/profile.js +5 -19
  75. package/build/cjs/title.js +2 -8
  76. package/build/es/__e2e__/stories/common.js +3 -8
  77. package/build/es/__e2e__/stories/custom-application-title.js +2 -1
  78. package/build/es/__e2e__/stories/me-with-avatar.js +2 -1
  79. package/build/es/__e2e__/stories/online-status-message.js +3 -4
  80. package/build/es/__e2e__/stories/pwa-enabled.js +2 -1
  81. package/build/es/__e2e__/stories/user-has-all-authority.js +4 -2
  82. package/build/es/__e2e__/stories/user-has-no-authorities.js +4 -2
  83. package/build/es/__e2e__/stories/user-has-web-interpretation-and-messaging-authority.js +4 -2
  84. package/build/es/__e2e__/stories/user-has-web-interpretation-authority.js +4 -2
  85. package/build/es/__e2e__/stories/user-has-web-messaging-authority.js +4 -2
  86. package/build/es/__e2e__/stories/with-debug-info-edge-cases.js +10 -5
  87. package/build/es/__e2e__/stories/with-special-app-name-character.js +4 -2
  88. package/build/es/__e2e__/stories/with-update-available-notification.js +4 -2
  89. package/build/es/__e2e__/stories/zero-unread-interpretations.js +2 -1
  90. package/build/es/__e2e__/stories/zero-unread-messages.js +2 -1
  91. package/build/es/apps.js +6 -16
  92. package/build/es/debug-info/debug-info-menu-item.js +3 -5
  93. package/build/es/debug-info/debug-info-modal.js +1 -3
  94. package/build/es/debug-info/debug-info-table.js +1 -3
  95. package/build/es/features/common/index.js +1 -1
  96. package/build/es/features/the_headerbar_can_display_online_status/the_headerbar_displays_online_status.js +11 -5
  97. package/build/es/features/the_headerbar_contains_a_profile_menu/common.js +4 -1
  98. 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 +2 -2
  99. package/build/es/features/the_headerbar_contains_a_profile_menu/the_menu_opens.js +4 -1
  100. package/build/es/features/the_headerbar_contains_a_profile_menu/the_user_can_log_out.js +15 -11
  101. package/build/es/features/the_search_should_escape_regexp_character/the_user_searches_for_an_app_with_a_regex_character.js +2 -1
  102. package/build/es/header-bar.js +5 -6
  103. package/build/es/{header-bar.stories.js → header-bar.prod.stories.js} +32 -11
  104. package/build/es/join-path.js +0 -1
  105. package/build/es/logo-image.js +1 -7
  106. package/build/es/notification-icon.js +2 -4
  107. package/build/es/notifications.js +0 -2
  108. package/build/es/online-status.js +6 -6
  109. package/build/es/online-status.styles.js +1 -1
  110. package/build/es/profile/use-on-doc-click.js +0 -1
  111. package/build/es/profile-menu/profile-header.js +1 -9
  112. package/build/es/profile-menu/profile-menu.js +7 -8
  113. package/build/es/profile-menu/update-notification.js +2 -4
  114. package/build/es/profile.js +1 -3
  115. package/build/es/title.js +1 -1
  116. package/package.json +18 -18
  117. /package/build/es/__e2e__/{header-bar.stories.e2e.js → header-bar.e2e.stories.js} +0 -0
package/build/cjs/apps.js CHANGED
@@ -4,33 +4,19 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _style = _interopRequireDefault(require("styled-jsx/style"));
9
-
10
- var _card = require("@dhis2-ui/card");
11
-
12
- var _input = require("@dhis2-ui/input");
13
-
14
8
  var _appRuntime = require("@dhis2/app-runtime");
15
-
16
9
  var _uiConstants = require("@dhis2/ui-constants");
17
-
18
10
  var _uiIcons = require("@dhis2/ui-icons");
19
-
11
+ var _card = require("@dhis2-ui/card");
12
+ var _input = require("@dhis2-ui/input");
20
13
  var _propTypes = _interopRequireDefault(require("prop-types"));
21
-
22
14
  var _react = _interopRequireWildcard(require("react"));
23
-
24
15
  var _joinPath = require("./join-path.js");
25
-
26
16
  var _index = _interopRequireDefault(require("./locales/index.js"));
27
-
28
- 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); }
29
-
30
- 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; }
31
-
32
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
33
-
17
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
18
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
34
20
  /**
35
21
  * Copied from here:
36
22
  * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping
@@ -38,7 +24,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
38
24
  function escapeRegExpCharacters(text) {
39
25
  return text.replace(/[/.*+?^${}()|[\]\\]/g, '\\$&');
40
26
  }
41
-
42
27
  function Search(_ref) {
43
28
  let {
44
29
  value,
@@ -68,12 +53,10 @@ function Search(_ref) {
68
53
  id: "4264724627"
69
54
  }, ["div.jsx-4264724627{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;height:52px;margin:8px;}", "span.jsx-4264724627{-webkit-flex:1 100%;-ms-flex:1 100%;flex:1 100%;}", "span.jsx-4264724627:last-child{-webkit-flex:1 auto;-ms-flex:1 auto;flex:1 auto;margin:8px;}"]));
70
55
  }
71
-
72
56
  Search.propTypes = {
73
57
  value: _propTypes.default.string.isRequired,
74
58
  onChange: _propTypes.default.func.isRequired
75
59
  };
76
-
77
60
  function Item(_ref2) {
78
61
  let {
79
62
  name,
@@ -92,15 +75,13 @@ function Item(_ref2) {
92
75
  }, name), /*#__PURE__*/_react.default.createElement(_style.default, {
93
76
  id: "1412616027",
94
77
  dynamic: [_uiConstants.theme.primary050]
95
- }, ["a.__jsx-style-dynamic-selector{display:inline-block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;width:96px;margin:8px;border-radius:12px;-webkit-text-decoration:none;text-decoration:none;cursor:pointer;}", "a.__jsx-style-dynamic-selector:hover,a.__jsx-style-dynamic-selector:focus{background-color:".concat(_uiConstants.theme.primary050, ";cursor:pointer;}"), "a.__jsx-style-dynamic-selector:hover>div.__jsx-style-dynamic-selector{font-weight:500;cursor:pointer;}", "img.__jsx-style-dynamic-selector{width:48px;height:48px;margin:8px;cursor:pointer;}", "div.__jsx-style-dynamic-selector{overflow-wrap:anywhere;margin-top:14px;color:rgba(0,0,0,0.87);font-size:12px;-webkit-letter-spacing:0.01em;-moz-letter-spacing:0.01em;-ms-letter-spacing:0.01em;letter-spacing:0.01em;line-height:14px;text-align:center;cursor:pointer;}"]));
78
+ }, ["a.__jsx-style-dynamic-selector{display:inline-block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;width:96px;margin:8px;border-radius:12px;-webkit-text-decoration:none;text-decoration:none;cursor:pointer;}", `a.__jsx-style-dynamic-selector:hover,a.__jsx-style-dynamic-selector:focus{background-color:${_uiConstants.theme.primary050};cursor:pointer;}`, "a.__jsx-style-dynamic-selector:hover>div.__jsx-style-dynamic-selector{font-weight:500;cursor:pointer;}", "img.__jsx-style-dynamic-selector{width:48px;height:48px;margin:8px;cursor:pointer;}", "div.__jsx-style-dynamic-selector{overflow-wrap:anywhere;margin-top:14px;color:rgba(0,0,0,0.87);font-size:12px;-webkit-letter-spacing:0.01em;-moz-letter-spacing:0.01em;-ms-letter-spacing:0.01em;letter-spacing:0.01em;line-height:14px;text-align:center;cursor:pointer;}"]));
96
79
  }
97
-
98
80
  Item.propTypes = {
99
81
  img: _propTypes.default.string,
100
82
  name: _propTypes.default.string,
101
83
  path: _propTypes.default.string
102
84
  };
103
-
104
85
  function List(_ref3) {
105
86
  let {
106
87
  apps,
@@ -126,7 +107,7 @@ function List(_ref3) {
126
107
  icon
127
108
  } = _ref5;
128
109
  return /*#__PURE__*/_react.default.createElement(Item, {
129
- key: "app-".concat(name, "-").concat(idx),
110
+ key: `app-${name}-${idx}`,
130
111
  name: displayName || name,
131
112
  path: defaultAction,
132
113
  img: icon
@@ -135,12 +116,10 @@ function List(_ref3) {
135
116
  id: "2424821176"
136
117
  }, ["div.jsx-2424821176{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-align-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;width:30vw;min-width:300px;max-width:560px;min-height:200px;max-height:465px;margin-block-start:0;margin-block-end:8px;margin-inline:8px;overflow:auto;overflow-x:hidden;}"]));
137
118
  }
138
-
139
119
  List.propTypes = {
140
120
  apps: _propTypes.default.array,
141
121
  filter: _propTypes.default.string
142
122
  };
143
-
144
123
  const AppMenu = _ref6 => {
145
124
  let {
146
125
  apps,
@@ -160,13 +139,11 @@ const AppMenu = _ref6 => {
160
139
  id: "3826299842"
161
140
  }, ["div.jsx-3826299842{z-index:10000;position:absolute;inset-inline-end:-4px;}"]));
162
141
  };
163
-
164
142
  AppMenu.propTypes = {
165
143
  apps: _propTypes.default.array.isRequired,
166
144
  onFilterChange: _propTypes.default.func.isRequired,
167
145
  filter: _propTypes.default.string
168
146
  };
169
-
170
147
  const Apps = _ref7 => {
171
148
  let {
172
149
  apps
@@ -207,11 +184,9 @@ const Apps = _ref7 => {
207
184
  }) : null, /*#__PURE__*/_react.default.createElement(_style.default, {
208
185
  id: "325245423",
209
186
  dynamic: [_uiConstants.spacers.dp4, _uiConstants.spacers.dp12]
210
- }, ["button.__jsx-style-dynamic-selector{display:block;background:transparent;padding-block-start:".concat(_uiConstants.spacers.dp4, ";padding-block-end:0;padding-inline:").concat(_uiConstants.spacers.dp12, ";border:0;cursor:pointer;height:100%;}"), "button.__jsx-style-dynamic-selector:focus{outline:2px solid white;outline-offset:-2px;}", "button.__jsx-style-dynamic-selector:focus.__jsx-style-dynamic-selector:not(:focus-visible){outline:none;}", "button.__jsx-style-dynamic-selector:hover{background:#1a557f;}", "button.__jsx-style-dynamic-selector:active{background:#104067;}", "div.__jsx-style-dynamic-selector{position:relative;height:100%;}"]));
187
+ }, [`button.__jsx-style-dynamic-selector{display:block;background:transparent;padding-block-start:${_uiConstants.spacers.dp4};padding-block-end:0;padding-inline:${_uiConstants.spacers.dp12};border:0;cursor:pointer;height:100%;}`, "button.__jsx-style-dynamic-selector:focus{outline:2px solid white;outline-offset:-2px;}", "button.__jsx-style-dynamic-selector:focus.__jsx-style-dynamic-selector:not(:focus-visible){outline:none;}", "button.__jsx-style-dynamic-selector:hover{background:#1a557f;}", "button.__jsx-style-dynamic-selector:active{background:#104067;}", "div.__jsx-style-dynamic-selector{position:relative;height:100%;}"]));
211
188
  };
212
-
213
189
  Apps.propTypes = {
214
190
  apps: _propTypes.default.array.isRequired
215
191
  };
216
- var _default = Apps;
217
- exports.default = _default;
192
+ var _default = exports.default = Apps;
@@ -4,35 +4,24 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DebugInfoMenuItem = void 0;
7
-
8
7
  var _style = _interopRequireDefault(require("styled-jsx/style"));
9
-
10
- var _menu = require("@dhis2-ui/menu");
11
-
12
8
  var _uiConstants = require("@dhis2/ui-constants");
13
-
9
+ var _menu = require("@dhis2-ui/menu");
14
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
15
-
16
11
  var _react = _interopRequireDefault(require("react"));
17
-
18
12
  var _index = _interopRequireDefault(require("../locales/index.js"));
19
-
20
13
  var _useDebugInfo = require("./use-debug-info.js");
21
-
22
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
-
14
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
24
15
  const DebugInfoMenuItem = _ref => {
25
16
  let {
26
17
  hideProfileMenu,
27
18
  showDebugInfoModal
28
19
  } = _ref;
29
20
  const debugInfo = (0, _useDebugInfo.useDebugInfo)();
30
-
31
21
  const openDebugModal = () => {
32
22
  hideProfileMenu();
33
23
  showDebugInfoModal();
34
24
  };
35
-
36
25
  const debugInfoLabel = /*#__PURE__*/_react.default.createElement("div", {
37
26
  className: _style.default.dynamic([["3534786758", [_uiConstants.colors.grey700]]]) + " " + "root"
38
27
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -43,15 +32,14 @@ const DebugInfoMenuItem = _ref => {
43
32
  }) : _index.default.t('DHIS2 version unknown')), /*#__PURE__*/_react.default.createElement("div", {
44
33
  "data-test": "dhis2-ui-headerbar-appinfo",
45
34
  className: _style.default.dynamic([["3534786758", [_uiConstants.colors.grey700]]]) + " " + "version"
46
- }, debugInfo.app_name ? debugInfo.app_version ? "".concat(debugInfo.app_name, " ").concat(debugInfo.app_version) : _index.default.t('{{appName}} version unknown', {
35
+ }, debugInfo.app_name ? debugInfo.app_version ? `${debugInfo.app_name} ${debugInfo.app_version}` : _index.default.t('{{appName}} version unknown', {
47
36
  appName: debugInfo.app_name
48
37
  }) : debugInfo.app_version ? _index.default.t('App {{appVersion}}', {
49
38
  appVersion: debugInfo.app_version
50
39
  }) : _index.default.t('App version unknown')), /*#__PURE__*/_react.default.createElement(_style.default, {
51
40
  id: "3534786758",
52
41
  dynamic: [_uiConstants.colors.grey700]
53
- }, [".root.__jsx-style-dynamic-selector{color:".concat(_uiConstants.colors.grey700, ";font-style:italic;font-size:14px;line-height:17px;}"), ".instance-info.__jsx-style-dynamic-selector{margin-bottom:4px;}", ".version.__jsx-style-dynamic-selector{white-space:no-wrap;}"]));
54
-
42
+ }, [`.root.__jsx-style-dynamic-selector{color:${_uiConstants.colors.grey700};font-style:italic;font-size:14px;line-height:17px;}`, ".instance-info.__jsx-style-dynamic-selector{margin-bottom:4px;}", ".version.__jsx-style-dynamic-selector{white-space:no-wrap;}"]));
55
43
  return /*#__PURE__*/_react.default.createElement(_menu.MenuItem, {
56
44
  dense: true,
57
45
  onClick: openDebugModal,
@@ -59,7 +47,6 @@ const DebugInfoMenuItem = _ref => {
59
47
  dataTest: "dhis2-ui-headerbar-debuginfo"
60
48
  });
61
49
  };
62
-
63
50
  exports.DebugInfoMenuItem = DebugInfoMenuItem;
64
51
  DebugInfoMenuItem.propTypes = {
65
52
  hideProfileMenu: _propTypes.default.func.isRequired,
@@ -4,25 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DebugInfoModal = DebugInfoModal;
7
-
7
+ var _appRuntime = require("@dhis2/app-runtime");
8
8
  var _button = require("@dhis2-ui/button");
9
-
10
9
  var _modal = require("@dhis2-ui/modal");
11
-
12
- var _appRuntime = require("@dhis2/app-runtime");
13
-
14
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
15
-
16
11
  var _react = _interopRequireDefault(require("react"));
17
-
18
12
  var _index = _interopRequireDefault(require("../locales/index.js"));
19
-
20
13
  var _debugInfoTable = require("./debug-info-table.js");
21
-
22
14
  var _useDebugInfo = require("./use-debug-info.js");
23
-
24
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
-
15
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
26
16
  function DebugInfoModal(_ref) {
27
17
  let {
28
18
  onClose
@@ -33,13 +23,11 @@ function DebugInfoModal(_ref) {
33
23
  } = (0, _appRuntime.useAlert)('Debug information copied to clipboard', {
34
24
  duration: 3000
35
25
  });
36
-
37
26
  const copyDebugInfo = () => {
38
27
  navigator.clipboard.writeText(debugInfo);
39
28
  onClose();
40
29
  showClipboardAlert();
41
30
  };
42
-
43
31
  return /*#__PURE__*/_react.default.createElement(_modal.Modal, {
44
32
  position: "middle",
45
33
  dataTest: "dhis2-ui-headerbar-debuginfomodal"
@@ -53,7 +41,6 @@ function DebugInfoModal(_ref) {
53
41
  dataTest: "dhis2-ui-headerbar-debuginfomodal-copybutton"
54
42
  }, _index.default.t('Copy debug info')))));
55
43
  }
56
-
57
44
  DebugInfoModal.propTypes = {
58
45
  onClose: _propTypes.default.func.isRequired
59
46
  };
@@ -4,17 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DebugInfoTable = DebugInfoTable;
7
-
8
7
  var _style = _interopRequireDefault(require("styled-jsx/style"));
9
-
10
8
  var _uiConstants = require("@dhis2/ui-constants");
11
-
12
9
  var _react = _interopRequireDefault(require("react"));
13
-
14
10
  var _useDebugInfo = require("./use-debug-info.js");
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
12
  const formatDebugInfoKey = key => {
19
13
  const tokens = key.split('_');
20
14
  return tokens.map(token => {
@@ -25,7 +19,6 @@ const formatDebugInfoKey = key => {
25
19
  }
26
20
  }).join(' ');
27
21
  };
28
-
29
22
  function DebugInfoTable() {
30
23
  const debugInfo = (0, _useDebugInfo.useDebugInfo)();
31
24
  return /*#__PURE__*/_react.default.createElement("table", {
@@ -43,5 +36,5 @@ function DebugInfoTable() {
43
36
  }, debugInfo[key])))), /*#__PURE__*/_react.default.createElement(_style.default, {
44
37
  id: "4076206425",
45
38
  dynamic: [_uiConstants.colors.grey700]
46
- }, ["table.__jsx-style-dynamic-selector{white-space:pre-wrap;font-size:14px;line-height:1.2;color:".concat(_uiConstants.colors.grey700, ";font-famile:Menlo,Courier,monospace !important;}"), "td.__jsx-style-dynamic-selector{padding-block:3px;padding-inline-end:16px;padding-inline-start:0;}", ".debug-info-key.__jsx-style-dynamic-selector{font-weight:bold;}"]));
39
+ }, [`table.__jsx-style-dynamic-selector{white-space:pre-wrap;font-size:14px;line-height:1.2;color:${_uiConstants.colors.grey700};font-famile:Menlo,Courier,monospace !important;}`, "td.__jsx-style-dynamic-selector{padding-block:3px;padding-inline-end:16px;padding-inline-start:0;}", ".debug-info-key.__jsx-style-dynamic-selector{font-weight:bold;}"]));
47
40
  }
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useFormattedDebugInfo = exports.useDebugInfo = void 0;
7
-
8
7
  var _appRuntime = require("@dhis2/app-runtime");
9
-
10
8
  const useDebugInfo = () => {
11
9
  const {
12
10
  appName,
@@ -20,9 +18,6 @@ const useDebugInfo = () => {
20
18
  dhis2_revision: (systemInfo === null || systemInfo === void 0 ? void 0 : systemInfo.revision) || null
21
19
  };
22
20
  };
23
-
24
21
  exports.useDebugInfo = useDebugInfo;
25
-
26
22
  const useFormattedDebugInfo = () => JSON.stringify(useDebugInfo(), undefined, 2);
27
-
28
23
  exports.useFormattedDebugInfo = useFormattedDebugInfo;
@@ -4,15 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.webCommons = exports.baseUrl = void 0;
7
-
8
7
  var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
9
-
10
- const baseUrl = 'https://domain.tld/';
11
- exports.baseUrl = baseUrl;
12
- const webCommons = 'https://domain.tld/dhis-web-commons/';
13
- exports.webCommons = webCommons;
8
+ const baseUrl = exports.baseUrl = 'https://domain.tld/';
9
+ const webCommons = exports.webCommons = 'https://domain.tld/dhis-web-commons/';
14
10
  (0, _cypressCucumberPreprocessor.Before)(() => {
15
- cy.intercept('GET', "".concat(baseUrl, "api/fileResources/avatarId/data"), {
11
+ cy.intercept('GET', `${baseUrl}api/fileResources/avatarId/data`, {
16
12
  fixture: 'HeaderBar/avatar.png'
17
13
  }).as('avatar');
18
14
  });
@@ -1,21 +1,20 @@
1
1
  "use strict";
2
2
 
3
3
  var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
-
5
4
  // see https://github.com/cypress-io/cypress/issues/17723#issuecomment-1457064322
6
5
  const goOffline = () => {
7
- cy.log('**go offline**') // stub every request with a StaticResponse to simulate network error
6
+ cy.log('**go offline**')
7
+ // stub every request with a StaticResponse to simulate network error
8
8
  .then(() => cy.intercept('*', {
9
9
  forceNetworkError: true
10
10
  })).then(() => cy.window().then(win => win.dispatchEvent(new Event('offline'))));
11
11
  };
12
-
13
12
  const goOnline = () => {
14
13
  // disable offline mode, otherwise we will break our tests :)
15
- cy.log('**go online**') // go back to normal network behavior
14
+ cy.log('**go online**')
15
+ // go back to normal network behavior
16
16
  .then(() => cy.intercept('*')).then(() => cy.window().then(win => win.dispatchEvent(new Event('online'))));
17
17
  };
18
-
19
18
  (0, _cypressCucumberPreprocessor.Before)(() => {
20
19
  goOnline();
21
20
  });
@@ -25,6 +24,7 @@ const goOnline = () => {
25
24
  });
26
25
  (0, _cypressCucumberPreprocessor.Given)('the HeaderBar loads without error when PWA is enabled', () => {
27
26
  cy.visitStory('HeaderBarTesting', 'PWA Enabled');
27
+ cy.get(':contains("Online")').should('exist');
28
28
  });
29
29
  (0, _cypressCucumberPreprocessor.Given)('the HeaderBar loads and is PWA enabled so online status messages will be visible', () => {
30
30
  cy.visitStory('HeaderBarTesting', 'Online Status Messaging With PWA Enabled');
@@ -59,6 +59,10 @@ const goOnline = () => {
59
59
  goOffline();
60
60
  });
61
61
  (0, _cypressCucumberPreprocessor.Then)('the status badge shows offline', () => {
62
+ // cy.get('[data-test="headerbar-online-status"].badge .label')
63
+ // .invoke('text')
64
+ // .should('equal', 'Offline')
65
+
62
66
  cy.get('[data-test="headerbar-online-status"].badge .label').should($label => {
63
67
  expect($label.text()).to.equal('Offline');
64
68
  });
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
-
5
4
  (0, _cypressCucumberPreprocessor.Given)('the user has the ALL authority', () => {
6
5
  cy.visitStory('HeaderBarTesting', 'User Has All Authority');
7
6
  });
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
-
5
4
  (0, _cypressCucumberPreprocessor.Then)('the HeaderBar dos not display the app menu', () => {
6
5
  cy.get('[data-test="headerbar-apps-menu"]').should('not.exist');
7
6
  });
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
-
5
4
  (0, _cypressCucumberPreprocessor.When)('the user opens the menu', () => {
6
5
  cy.get('[data-test="headerbar-apps-icon"]').click();
7
6
  });
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
-
5
4
  (0, _cypressCucumberPreprocessor.Then)('the HeaderBar displays a menu icon', () => {
6
5
  cy.get('[data-test="headerbar-apps-icon"]').should('exist');
7
6
  });
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
-
5
4
  (0, _cypressCucumberPreprocessor.When)('the user clicks on the menu icons', () => {
6
5
  cy.get('[data-test="headerbar-apps-icon"]').click();
7
6
  });
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
 
3
3
  var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
-
5
4
  (0, _cypressCucumberPreprocessor.Then)('the HeaderBar does not display the profile menu', () => {
6
5
  cy.get('[data-test="headerbar-profile-menu"]').should('not.exist');
7
6
  });
8
7
  (0, _cypressCucumberPreprocessor.When)('the user opens the menu', () => {
9
- cy.get("\n [data-test=\"headerbar-profile-icon-text\"],\n [data-test=\"headerbar-profile-icon-image\"]\n ").click();
8
+ cy.get(`
9
+ [data-test="headerbar-profile-icon-text"],
10
+ [data-test="headerbar-profile-icon-image"]
11
+ `).click();
10
12
  });
@@ -1,11 +1,10 @@
1
1
  "use strict";
2
2
 
3
3
  var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
-
5
4
  (0, _cypressCucumberPreprocessor.Given)('the HeaderBar loads without an error and the user does not have an avatar', () => {
6
5
  cy.visitStory('HeaderBarTesting', 'Default');
7
6
  });
8
- (0, _cypressCucumberPreprocessor.Then)("the headerbar contains a text icon of size 36px", () => {
7
+ (0, _cypressCucumberPreprocessor.Then)(`the headerbar contains a text icon of size 36px`, () => {
9
8
  cy.fixture('HeaderBar/me').then(() => {
10
9
  cy.get('[data-test="headerbar-profile-icon-text"]').should('be.visible').and('have.css', 'height', '36px').and('have.css', 'width', '36px');
11
10
  });
@@ -13,7 +12,7 @@ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preproces
13
12
  (0, _cypressCucumberPreprocessor.When)('the user clicks on the text icon', () => {
14
13
  cy.get('[data-test="headerbar-profile-icon-text"]').click();
15
14
  });
16
- (0, _cypressCucumberPreprocessor.Then)("the profile menu contains a text icon of size 48px", () => {
15
+ (0, _cypressCucumberPreprocessor.Then)(`the profile menu contains a text icon of size 48px`, () => {
17
16
  cy.fixture('HeaderBar/me').then(() => {
18
17
  cy.get('[data-test="headerbar-profile-menu-icon-text"]').should('be.visible').and('have.css', 'height', '48px').and('have.css', 'width', '48px');
19
18
  });
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
-
5
4
  (0, _cypressCucumberPreprocessor.Given)('the HeaderBar loads without an error and the user has an avatar', () => {
6
5
  cy.visitStory('HeaderBarTesting', 'Me With Avatar');
7
6
  });
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
 
3
3
  var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
-
5
4
  (0, _cypressCucumberPreprocessor.When)('the user clicks on the profile icons', () => {
6
- cy.get("\n [data-test=\"headerbar-profile-icon-text\"],\n [data-test=\"headerbar-profile-icon-image\"]\n ").click();
5
+ cy.get(`
6
+ [data-test="headerbar-profile-icon-text"],
7
+ [data-test="headerbar-profile-icon-image"]
8
+ `).click();
7
9
  });
8
10
  (0, _cypressCucumberPreprocessor.Then)('the menu opens', () => {
9
11
  cy.get('[data-test="headerbar-profile-menu"]').should('be.visible');
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
-
5
4
  (0, _cypressCucumberPreprocessor.When)('the user clicks outside of the menu', () => {
6
5
  cy.get('[data-test="headerbar-title"]').click();
7
6
  });
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
-
5
4
  (0, _cypressCucumberPreprocessor.Then)('contains a link to edit the profile', () => {
6
5
  cy.get('[data-test="headerbar-profile-edit-profile-link"]').should('be.visible');
7
6
  });
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
-
5
4
  (0, _cypressCucumberPreprocessor.Then)('contains a link to the user account', () => {
6
5
  cy.get('[data-test="headerbar-profile-menu"] > li').should(lis => {
7
6
  expect(lis.eq(1)).to.be.visible;
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
-
5
4
  (0, _cypressCucumberPreprocessor.Then)('contains a link to the About DHIS2 page', () => {
6
5
  cy.get('[data-test="headerbar-profile-menu"] > li').should(lis => {
7
6
  expect(lis.eq(3)).to.be.visible;
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
-
5
4
  (0, _cypressCucumberPreprocessor.Then)('contains a link to the help page', () => {
6
5
  cy.get('[data-test="headerbar-profile-menu"] > li').should(lis => {
7
6
  expect(lis.eq(2)).to.be.visible;
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
-
5
4
  (0, _cypressCucumberPreprocessor.Then)('contains a link to the settings', () => {
6
5
  cy.get('[data-test="headerbar-profile-menu"] > li').should(lis => {
7
6
  expect(lis.eq(0)).to.be.visible;
@@ -1,10 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
-
5
4
  var _index = require("../common/index.js");
6
-
7
- const logoutUrl = "".concat(_index.baseUrl, "dhis-web-commons-security/logout.action");
5
+ const logoutUrl = `${_index.baseUrl}dhis-web-commons-security/logout.action`;
8
6
  (0, _cypressCucumberPreprocessor.Then)('contains a link to log out the user', () => {
9
7
  cy.get('[data-test="headerbar-profile-menu"] > li').should(lis => {
10
8
  const menuItem = lis.eq(4);
@@ -20,23 +18,27 @@ const logoutUrl = "".concat(_index.baseUrl, "dhis-web-commons-security/logout.ac
20
18
  });
21
19
  (0, _cypressCucumberPreprocessor.Then)('a loading mask covers the screen', () => {
22
20
  cy.get('[data-test="headerbar-profile-menu-loading-mask"]').should('be.visible');
23
- }); // Currently not working
21
+ });
24
22
 
23
+ // Currently not working
25
24
  (0, _cypressCucumberPreprocessor.When)('clearSensitiveCaches is called', async () => {
26
25
  // Open caches to test 'clearSensitiveCaches':
27
26
  // A keepable cache
28
- await caches.open('workbox-precache-v2-asdf'); // Other, potentially-sensitive cache
29
-
30
- await caches.open('test-cache'); // Todo: wait for function to resolve (loading mask goes away?)
31
-
32
- const keys = await caches.keys(); // Static asset caches are kept
33
-
34
- expect(keys).to.include('workbox-precache-v2-asdf'); // Others are removed
35
-
27
+ await caches.open('workbox-precache-v2-asdf');
28
+ // Other, potentially-sensitive cache
29
+ await caches.open('test-cache');
30
+
31
+ // Todo: wait for function to resolve (loading mask goes away?)
32
+ const keys = await caches.keys();
33
+ // Static asset caches are kept
34
+ expect(keys).to.include('workbox-precache-v2-asdf');
35
+ // Others are removed
36
36
  expect(keys).not.to.include('test-cache');
37
- }); // Currently not working
37
+ });
38
38
 
39
- (0, _cypressCucumberPreprocessor.Then)('the window navigates to the logout URL', () => {// (Currently unable to stub window.location.assign;
39
+ // Currently not working
40
+ (0, _cypressCucumberPreprocessor.Then)('the window navigates to the logout URL', () => {
41
+ // (Currently unable to stub window.location.assign;
40
42
  // would be done in 'Then the user clicks link to log out')
41
43
  // cy.get('@locationAssign').should('be.calledWith', logoutUrl)
42
44
  });
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
-
5
4
  (0, _cypressCucumberPreprocessor.Then)('contains the user name', () => {
6
5
  cy.all(() => cy.window(), () => cy.get('[data-test="headerbar-profile-username"]')).then(_ref => {
7
6
  let [win, $name] = _ref;
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
-
5
4
  (0, _cypressCucumberPreprocessor.Then)('the HeaderBar contains a link to the interpretations', () => {
6
5
  cy.get('[data-test="headerbar-interpretations"]').should('be.visible');
7
6
  });
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
-
5
4
  (0, _cypressCucumberPreprocessor.Given)('there are 0 unread interpretations', () => {
6
5
  cy.visitStory('HeaderBarTesting', 'Zero Unread Interpretations');
7
6
  });
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
-
5
4
  (0, _cypressCucumberPreprocessor.Then)('the interpretations link contains an icon with a number greater than 0', () => {
6
5
  cy.get('[data-test="headerbar-interpretations-count"]').should($count => {
7
6
  expect(parseInt($count.text(), 10)).to.be.greaterThan(0);
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
-
5
4
  (0, _cypressCucumberPreprocessor.Then)('the HeaderBar contains a link to the messages', () => {
6
5
  cy.get('[data-test="headerbar-messages"]').should('be.visible');
7
6
  });
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
-
5
4
  (0, _cypressCucumberPreprocessor.Given)('there are 0 unread messages', () => {
6
5
  cy.visitStory('HeaderBarTesting', 'Zero Unread Messages');
7
6
  });