@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
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
 
3
- var _steps = require("cypress-cucumber-preprocessor/steps");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- (0, _steps.Then)('the HeaderBar does not display the profile menu', () => {
5
+ (0, _cypressCucumberPreprocessor.Then)('the HeaderBar does not display the profile menu', () => {
6
6
  cy.get('[data-test="headerbar-profile-menu"]').should('not.exist');
7
7
  });
8
- (0, _steps.When)('the user opens the menu', () => {
8
+ (0, _cypressCucumberPreprocessor.When)('the user opens the menu', () => {
9
9
  cy.get("\n [data-test=\"headerbar-profile-icon-text\"],\n [data-test=\"headerbar-profile-icon-image\"]\n ").click();
10
10
  });
@@ -1,21 +1,19 @@
1
1
  "use strict";
2
2
 
3
- require("../common/index.js");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- var _steps = require("cypress-cucumber-preprocessor/steps");
6
-
7
- (0, _steps.Given)('the HeaderBar loads without an error and the user does not have an avatar', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('the HeaderBar loads without an error and the user does not have an avatar', () => {
8
6
  cy.visitStory('HeaderBarTesting', 'Default');
9
7
  });
10
- (0, _steps.Then)("the headerbar contains a text icon of size 36px", () => {
8
+ (0, _cypressCucumberPreprocessor.Then)("the headerbar contains a text icon of size 36px", () => {
11
9
  cy.fixture('HeaderBar/me').then(() => {
12
10
  cy.get('[data-test="headerbar-profile-icon-text"]').should('be.visible').and('have.css', 'height', '36px').and('have.css', 'width', '36px');
13
11
  });
14
12
  });
15
- (0, _steps.When)('the user clicks on the text icon', () => {
13
+ (0, _cypressCucumberPreprocessor.When)('the user clicks on the text icon', () => {
16
14
  cy.get('[data-test="headerbar-profile-icon-text"]').click();
17
15
  });
18
- (0, _steps.Then)("the profile menu contains a text icon of size 48px", () => {
16
+ (0, _cypressCucumberPreprocessor.Then)("the profile menu contains a text icon of size 48px", () => {
19
17
  cy.fixture('HeaderBar/me').then(() => {
20
18
  cy.get('[data-test="headerbar-profile-menu-icon-text"]').should('be.visible').and('have.css', 'height', '48px').and('have.css', 'width', '48px');
21
19
  });
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
 
3
- var _steps = require("cypress-cucumber-preprocessor/steps");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- (0, _steps.Given)('the HeaderBar loads without an error and the user has an avatar', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('the HeaderBar loads without an error and the user has an avatar', () => {
6
6
  cy.visitStory('HeaderBarTesting', 'Me With Avatar');
7
7
  });
8
- (0, _steps.Then)('the headerbar contains an image icon of size 36px', () => {
8
+ (0, _cypressCucumberPreprocessor.Then)('the headerbar contains an image icon of size 36px', () => {
9
9
  cy.get('[data-test="headerbar-profile-icon-image"]').should('be.visible').and('have.css', 'height', '36px').and('have.css', 'width', '36px');
10
10
  });
11
- (0, _steps.When)('the user clicks on the image icon', () => {
11
+ (0, _cypressCucumberPreprocessor.When)('the user clicks on the image icon', () => {
12
12
  cy.get('[data-test="headerbar-profile-icon-image"]').click();
13
13
  });
14
- (0, _steps.Then)('the profile menu contains an image icon of size 48px', () => {
14
+ (0, _cypressCucumberPreprocessor.Then)('the profile menu contains an image icon of size 48px', () => {
15
15
  cy.get('[data-test="headerbar-profile-menu-icon-image"]').should('be.visible').and('have.css', 'height', '48px').and('have.css', 'width', '48px');
16
16
  });
@@ -1,3 +1,2 @@
1
- "use strict";
2
-
3
- require("../common/index.js");
1
+ // all step definitions are shared with other scenarios
2
+ "use strict";
@@ -1,12 +1,10 @@
1
1
  "use strict";
2
2
 
3
- require("../common/index.js");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- var _steps = require("cypress-cucumber-preprocessor/steps");
6
-
7
- (0, _steps.When)('the user clicks on the profile icons', () => {
5
+ (0, _cypressCucumberPreprocessor.When)('the user clicks on the profile icons', () => {
8
6
  cy.get("\n [data-test=\"headerbar-profile-icon-text\"],\n [data-test=\"headerbar-profile-icon-image\"]\n ").click();
9
7
  });
10
- (0, _steps.Then)('the menu opens', () => {
8
+ (0, _cypressCucumberPreprocessor.Then)('the menu opens', () => {
11
9
  cy.get('[data-test="headerbar-profile-menu"]').should('be.visible');
12
10
  });
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
2
 
3
- require("../common/index.js");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- var _steps = require("cypress-cucumber-preprocessor/steps");
6
-
7
- (0, _steps.When)('the user clicks outside of the menu', () => {
5
+ (0, _cypressCucumberPreprocessor.When)('the user clicks outside of the menu', () => {
8
6
  cy.get('[data-test="headerbar-title"]').click();
9
7
  });
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
2
 
3
- require("../common/index.js");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- var _steps = require("cypress-cucumber-preprocessor/steps");
6
-
7
- (0, _steps.Then)('contains a link to edit the profile', () => {
5
+ (0, _cypressCucumberPreprocessor.Then)('contains a link to edit the profile', () => {
8
6
  cy.get('[data-test="headerbar-profile-edit-profile-link"]').should('be.visible');
9
7
  });
@@ -1,10 +1,8 @@
1
1
  "use strict";
2
2
 
3
- require("../common/index.js");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- var _steps = require("cypress-cucumber-preprocessor/steps");
6
-
7
- (0, _steps.Then)('contains a link to the user account', () => {
5
+ (0, _cypressCucumberPreprocessor.Then)('contains a link to the user account', () => {
8
6
  cy.get('[data-test="headerbar-profile-menu"] > li').should(lis => {
9
7
  expect(lis.eq(1)).to.be.visible;
10
8
  });
@@ -1,10 +1,8 @@
1
1
  "use strict";
2
2
 
3
- require("../common/index.js");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- var _steps = require("cypress-cucumber-preprocessor/steps");
6
-
7
- (0, _steps.Then)('contains a link to the About DHIS2 page', () => {
5
+ (0, _cypressCucumberPreprocessor.Then)('contains a link to the About DHIS2 page', () => {
8
6
  cy.get('[data-test="headerbar-profile-menu"] > li').should(lis => {
9
7
  expect(lis.eq(3)).to.be.visible;
10
8
  });
@@ -1,10 +1,8 @@
1
1
  "use strict";
2
2
 
3
- require("../common/index.js");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- var _steps = require("cypress-cucumber-preprocessor/steps");
6
-
7
- (0, _steps.Then)('contains a link to the help page', () => {
5
+ (0, _cypressCucumberPreprocessor.Then)('contains a link to the help page', () => {
8
6
  cy.get('[data-test="headerbar-profile-menu"] > li').should(lis => {
9
7
  expect(lis.eq(2)).to.be.visible;
10
8
  });
@@ -1,10 +1,8 @@
1
1
  "use strict";
2
2
 
3
- require("../common/index.js");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- var _steps = require("cypress-cucumber-preprocessor/steps");
6
-
7
- (0, _steps.Then)('contains a link to the settings', () => {
5
+ (0, _cypressCucumberPreprocessor.Then)('contains a link to the settings', () => {
8
6
  cy.get('[data-test="headerbar-profile-menu"] > li').should(lis => {
9
7
  expect(lis.eq(0)).to.be.visible;
10
8
  });
@@ -1,28 +1,28 @@
1
1
  "use strict";
2
2
 
3
- var _steps = require("cypress-cucumber-preprocessor/steps");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
5
  var _index = require("../common/index.js");
6
6
 
7
7
  const logoutUrl = "".concat(_index.baseUrl, "dhis-web-commons-security/logout.action");
8
- (0, _steps.Then)('contains a link to log out the user', () => {
8
+ (0, _cypressCucumberPreprocessor.Then)('contains a link to log out the user', () => {
9
9
  cy.get('[data-test="headerbar-profile-menu"] > li').should(lis => {
10
10
  const menuItem = lis.eq(4);
11
11
  expect(menuItem).to.be.visible;
12
12
  expect(menuItem.find('a')).to.have.attr('href', logoutUrl);
13
13
  });
14
14
  });
15
- (0, _steps.And)('there is no loading mask', () => {
15
+ (0, _cypressCucumberPreprocessor.When)('there is no loading mask', () => {
16
16
  cy.get('[data-test="headerbar-profile-menu-loading-mask"]').should('not.exist');
17
17
  });
18
- (0, _steps.Then)('the user clicks the link to log out', () => {
18
+ (0, _cypressCucumberPreprocessor.Then)('the user clicks the link to log out', () => {
19
19
  cy.get('[data-test="headerbar-profile-menu"] > li:nth-child(5)').trigger('click');
20
20
  });
21
- (0, _steps.Then)('a loading mask covers the screen', () => {
21
+ (0, _cypressCucumberPreprocessor.Then)('a loading mask covers the screen', () => {
22
22
  cy.get('[data-test="headerbar-profile-menu-loading-mask"]').should('be.visible');
23
23
  }); // Currently not working
24
24
 
25
- (0, _steps.And)('clearSensitiveCaches is called', async () => {
25
+ (0, _cypressCucumberPreprocessor.When)('clearSensitiveCaches is called', async () => {
26
26
  // Open caches to test 'clearSensitiveCaches':
27
27
  // A keepable cache
28
28
  await caches.open('workbox-precache-v2-asdf'); // Other, potentially-sensitive cache
@@ -36,7 +36,7 @@ const logoutUrl = "".concat(_index.baseUrl, "dhis-web-commons-security/logout.ac
36
36
  expect(keys).not.to.include('test-cache');
37
37
  }); // Currently not working
38
38
 
39
- (0, _steps.Then)('the window navigates to the logout URL', () => {// (Currently unable to stub window.location.assign;
39
+ (0, _cypressCucumberPreprocessor.Then)('the window navigates to the logout URL', () => {// (Currently unable to stub window.location.assign;
40
40
  // would be done in 'Then the user clicks link to log out')
41
41
  // cy.get('@locationAssign').should('be.calledWith', logoutUrl)
42
42
  });
@@ -1,10 +1,8 @@
1
1
  "use strict";
2
2
 
3
- require("../common/index.js");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- var _steps = require("cypress-cucumber-preprocessor/steps");
6
-
7
- (0, _steps.Then)('contains the user name', () => {
5
+ (0, _cypressCucumberPreprocessor.Then)('contains the user name', () => {
8
6
  cy.all(() => cy.window(), () => cy.get('[data-test="headerbar-profile-username"]')).then(_ref => {
9
7
  let [win, $name] = _ref;
10
8
  console.log('win.dataProviderData', win.dataProviderData);
@@ -14,7 +12,7 @@ var _steps = require("cypress-cucumber-preprocessor/steps");
14
12
  expect($name.text()).to.equal(name);
15
13
  });
16
14
  });
17
- (0, _steps.Then)('contains the user email', () => {
15
+ (0, _cypressCucumberPreprocessor.Then)('contains the user email', () => {
18
16
  cy.all(() => cy.window(), () => cy.get('[data-test="headerbar-profile-user-email"]')).then(_ref2 => {
19
17
  let [win, $email] = _ref2;
20
18
  const {
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
2
 
3
- require("../common/index.js");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- var _steps = require("cypress-cucumber-preprocessor/steps");
6
-
7
- (0, _steps.Then)('the HeaderBar contains a link to the interpretations', () => {
5
+ (0, _cypressCucumberPreprocessor.Then)('the HeaderBar contains a link to the interpretations', () => {
8
6
  cy.get('[data-test="headerbar-interpretations"]').should('be.visible');
9
7
  });
@@ -1,12 +1,10 @@
1
1
  "use strict";
2
2
 
3
- require("../common/index.js");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- var _steps = require("cypress-cucumber-preprocessor/steps");
6
-
7
- (0, _steps.Given)('there are 0 unread interpretations', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('there are 0 unread interpretations', () => {
8
6
  cy.visitStory('HeaderBarTesting', 'Zero Unread Interpretations');
9
7
  });
10
- (0, _steps.Then)('the interpretations link does not contain a count', () => {
8
+ (0, _cypressCucumberPreprocessor.Then)('the interpretations link does not contain a count', () => {
11
9
  cy.get('[data-test="headerbar-interpretations-count"]').should('not.exist');
12
10
  });
@@ -1,10 +1,8 @@
1
1
  "use strict";
2
2
 
3
- require("../common/index.js");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- var _steps = require("cypress-cucumber-preprocessor/steps");
6
-
7
- (0, _steps.Then)('the interpretations link contains an icon with a number greater than 0', () => {
5
+ (0, _cypressCucumberPreprocessor.Then)('the interpretations link contains an icon with a number greater than 0', () => {
8
6
  cy.get('[data-test="headerbar-interpretations-count"]').should($count => {
9
7
  expect(parseInt($count.text(), 10)).to.be.greaterThan(0);
10
8
  });
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
2
 
3
- require("../common/index.js");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- var _steps = require("cypress-cucumber-preprocessor/steps");
6
-
7
- (0, _steps.Then)('the HeaderBar contains a link to the messages', () => {
5
+ (0, _cypressCucumberPreprocessor.Then)('the HeaderBar contains a link to the messages', () => {
8
6
  cy.get('[data-test="headerbar-messages"]').should('be.visible');
9
7
  });
@@ -1,12 +1,10 @@
1
1
  "use strict";
2
2
 
3
- require("../common/index.js");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- var _steps = require("cypress-cucumber-preprocessor/steps");
6
-
7
- (0, _steps.Given)('there are 0 unread messages', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('there are 0 unread messages', () => {
8
6
  cy.visitStory('HeaderBarTesting', 'Zero Unread Messages');
9
7
  });
10
- (0, _steps.Then)('the messages link does not contain a count', () => {
8
+ (0, _cypressCucumberPreprocessor.Then)('the messages link does not contain a count', () => {
11
9
  cy.get('[data-test="headerbar-messages-count"]').should('not.exist');
12
10
  });
@@ -1,10 +1,8 @@
1
1
  "use strict";
2
2
 
3
- require("../common/index.js");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- var _steps = require("cypress-cucumber-preprocessor/steps");
6
-
7
- (0, _steps.Then)('the messages link contains an icon with a number greater than 0', () => {
5
+ (0, _cypressCucumberPreprocessor.Then)('the messages link contains an icon with a number greater than 0', () => {
8
6
  cy.get('[data-test="headerbar-messages-count"]').should($count => {
9
7
  expect(parseInt($count.text(), 10)).to.be.greaterThan(0);
10
8
  });
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
 
3
- var _steps = require("cypress-cucumber-preprocessor/steps");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
5
  var _index = require("../common/index.js");
6
6
 
7
- (0, _steps.Then)('the HeaderBar should display the dhis2 logo', () => {
7
+ (0, _cypressCucumberPreprocessor.Then)('the HeaderBar should display the dhis2 logo', () => {
8
8
  cy.get('[data-test="headerbar-logo"]').should('be.visible');
9
9
  });
10
- (0, _steps.Then)('the logo should link to the homepage', () => {
10
+ (0, _cypressCucumberPreprocessor.Then)('the logo should link to the homepage', () => {
11
11
  cy.get('[data-test="headerbar-logo"] a').should($a => {
12
12
  expect($a.attr('href')).to.equal(_index.baseUrl);
13
13
  });
@@ -1,34 +1,34 @@
1
1
  "use strict";
2
2
 
3
- var _steps = require("cypress-cucumber-preprocessor/steps");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- (0, _steps.Given)('the HeaderBar is rendered without an available update', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('the HeaderBar is rendered without an available update', () => {
6
6
  cy.visitStory('HeaderBarTesting', 'default');
7
7
  });
8
- (0, _steps.Given)('the HeaderBar is rendered with an available update', () => {
8
+ (0, _cypressCucumberPreprocessor.Given)('the HeaderBar is rendered with an available update', () => {
9
9
  cy.visitStory('HeaderBarTesting', 'With Update Available Notification');
10
10
  });
11
- (0, _steps.Given)('the HeaderBar is rendered with no app name and an available update', () => {
11
+ (0, _cypressCucumberPreprocessor.Given)('the HeaderBar is rendered with no app name and an available update', () => {
12
12
  cy.visitStory('HeaderBarTesting', 'With Update Available Notification No App Name');
13
13
  });
14
- (0, _steps.When)('the user opens the profile menu', () => {
14
+ (0, _cypressCucumberPreprocessor.When)('the user opens the profile menu', () => {
15
15
  cy.get('[data-test="headerbar-profile"] > button').click();
16
16
  });
17
- (0, _steps.Then)('the update notification should not be displayed', () => {
17
+ (0, _cypressCucumberPreprocessor.Then)('the update notification should not be displayed', () => {
18
18
  cy.get('[data-test="dhis2-ui-headerbar-updatenotification"]').should('not.exist');
19
19
  });
20
- (0, _steps.Then)('the update notification should be displayed', () => {
20
+ (0, _cypressCucumberPreprocessor.Then)('the update notification should be displayed', () => {
21
21
  cy.get('[data-test="dhis2-ui-headerbar-updatenotification"]').should('contain', 'New Data Visualizer version available').should('contain', 'Click to reload');
22
22
  });
23
- (0, _steps.Then)('the update notification should be displayed without app name', () => {
23
+ (0, _cypressCucumberPreprocessor.Then)('the update notification should be displayed without app name', () => {
24
24
  cy.get('[data-test="dhis2-ui-headerbar-updatenotification"]').should('contain', 'New app version available').should('contain', 'Click to reload');
25
25
  });
26
- (0, _steps.When)('the user clicks the update notification', () => {
26
+ (0, _cypressCucumberPreprocessor.When)('the user clicks the update notification', () => {
27
27
  cy.get('[data-test="dhis2-ui-headerbar-updatenotification"]').click();
28
28
  });
29
- (0, _steps.Then)('the profile menu should not be shown', () => {
29
+ (0, _cypressCucumberPreprocessor.Then)('the profile menu should not be shown', () => {
30
30
  cy.get('[data-test="headerbar-profile-menu"]').should('not.exist');
31
31
  });
32
- (0, _steps.Then)('a callback should display a test div', () => {
32
+ (0, _cypressCucumberPreprocessor.Then)('a callback should display a test div', () => {
33
33
  cy.contains('The callback was successful').should('be.visible');
34
34
  });
@@ -1,69 +1,69 @@
1
1
  "use strict";
2
2
 
3
- var _steps = require("cypress-cucumber-preprocessor/steps");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- (0, _steps.Given)('the HeaderBar is rendered without an instance version in runtime context', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('the HeaderBar is rendered without an instance version in runtime context', () => {
6
6
  cy.visitStory('HeaderBarTesting', 'With Unknown Instance Version');
7
7
  });
8
- (0, _steps.Given)('the HeaderBar is rendered with an app name and app version in runtime context', () => {
8
+ (0, _cypressCucumberPreprocessor.Given)('the HeaderBar is rendered with an app name and app version in runtime context', () => {
9
9
  cy.visitStory('HeaderBarTesting', 'default');
10
10
  });
11
- (0, _steps.Given)('the HeaderBar is rendered without app name in runtime context', () => {
11
+ (0, _cypressCucumberPreprocessor.Given)('the HeaderBar is rendered without app name in runtime context', () => {
12
12
  cy.visitStory('HeaderBarTesting', 'With Unknown App Name');
13
13
  });
14
- (0, _steps.Given)('the HeaderBar is rendered with an app name but without app version in runtime context', () => {
14
+ (0, _cypressCucumberPreprocessor.Given)('the HeaderBar is rendered with an app name but without app version in runtime context', () => {
15
15
  cy.visitStory('HeaderBarTesting', 'With Unknown App Version');
16
16
  });
17
- (0, _steps.Given)('the HeaderBar is rendered without app name or app version in runtime context', () => {
17
+ (0, _cypressCucumberPreprocessor.Given)('the HeaderBar is rendered without app name or app version in runtime context', () => {
18
18
  cy.visitStory('HeaderBarTesting', 'With Unknown App Name And Version');
19
19
  });
20
- (0, _steps.When)('the user opens the profile menu', () => {
20
+ (0, _cypressCucumberPreprocessor.When)('the user opens the profile menu', () => {
21
21
  cy.get('[data-test="headerbar-profile"] > button').click();
22
22
  });
23
- (0, _steps.Then)("the app's name and version should be displayed", () => {
23
+ (0, _cypressCucumberPreprocessor.Then)("the app's name and version should be displayed", () => {
24
24
  cy.get('[data-test="dhis2-ui-headerbar-appinfo"]').should('contain', 'TestApp 101.2.3-beta.4');
25
25
  });
26
- (0, _steps.Then)("the app's name with unknown version should be displayed", () => {
26
+ (0, _cypressCucumberPreprocessor.Then)("the app's name with unknown version should be displayed", () => {
27
27
  cy.get('[data-test="dhis2-ui-headerbar-appinfo"]').should('contain', 'TestApp version unknown');
28
28
  });
29
- (0, _steps.Then)("the unknown app with app's version should be displayed", () => {
29
+ (0, _cypressCucumberPreprocessor.Then)("the unknown app with app's version should be displayed", () => {
30
30
  cy.get('[data-test="dhis2-ui-headerbar-appinfo"]').should('contain', 'App 101.2.3-beta.4');
31
31
  });
32
- (0, _steps.Then)('the unknown app with unknown version should be displayed', () => {
32
+ (0, _cypressCucumberPreprocessor.Then)('the unknown app with unknown version should be displayed', () => {
33
33
  cy.get('[data-test="dhis2-ui-headerbar-appinfo"]').should('contain', 'App version unknown');
34
34
  });
35
- (0, _steps.Then)('the instance version should be displayed', () => {
35
+ (0, _cypressCucumberPreprocessor.Then)('the instance version should be displayed', () => {
36
36
  cy.get('[data-test="dhis2-ui-headerbar-instanceinfo"]').should('contain', 'DHIS2 2.39.2.1-SNAPSHOT');
37
37
  });
38
- (0, _steps.Then)('the instance version should show as unknown', () => {
38
+ (0, _cypressCucumberPreprocessor.Then)('the instance version should show as unknown', () => {
39
39
  cy.get('[data-test="dhis2-ui-headerbar-instanceinfo"]').should('contain', 'DHIS2 version unknown');
40
40
  });
41
- (0, _steps.When)('the user clicks the debug info menu item', () => {
41
+ (0, _cypressCucumberPreprocessor.When)('the user clicks the debug info menu item', () => {
42
42
  cy.get('[data-test="dhis2-ui-headerbar-debuginfo"] > a').click();
43
43
  });
44
- (0, _steps.Then)('the debug info modal should be shown', () => {
44
+ (0, _cypressCucumberPreprocessor.Then)('the debug info modal should be shown', () => {
45
45
  cy.get('[data-test="dhis2-ui-headerbar-debuginfomodal"]').should('be.visible');
46
46
  });
47
- (0, _steps.Then)('the debug info modal should not be shown', () => {
47
+ (0, _cypressCucumberPreprocessor.Then)('the debug info modal should not be shown', () => {
48
48
  cy.get('[data-test="dhis2-ui-headerbar-debuginfomodal"]').should('not.exist');
49
49
  });
50
- (0, _steps.Then)('the debug info modal should contain debug info', () => {
50
+ (0, _cypressCucumberPreprocessor.Then)('the debug info modal should contain debug info', () => {
51
51
  cy.get('[data-test="dhis2-ui-headerbar-debuginfotable"]').should('contain', '2.39.2.1-SNAPSHOT' // DHIS2 version
52
52
  ).should('contain', '6607c3c' // Revision
53
53
  ).should('contain', 'TestApp' // App name
54
54
  ).should('contain', '101.2.3-beta.4' // App version
55
55
  );
56
56
  });
57
- (0, _steps.When)('the user clicks the copy debug info button', () => {
57
+ (0, _cypressCucumberPreprocessor.When)('the user clicks the copy debug info button', () => {
58
58
  cy.contains('Copy debug info').click();
59
59
  });
60
- (0, _steps.Then)('the debug info should be copied to clipboard', () => {
60
+ (0, _cypressCucumberPreprocessor.Then)('the debug info should be copied to clipboard', () => {
61
61
  cy.window().then(win => {
62
62
  win.navigator.clipboard.readText().then(text => {
63
63
  expect(text).to.contain('2.39.2.1-SNAPSHOT');
64
64
  });
65
65
  });
66
66
  });
67
- (0, _steps.Then)('the debug info copied to clipboard alert should be shown', () => {
67
+ (0, _cypressCucumberPreprocessor.Then)('the debug info copied to clipboard alert should be shown', () => {
68
68
  cy.contains('Debug information copied to clipboard').should('exist');
69
69
  });
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
 
3
- var _steps = require("cypress-cucumber-preprocessor/steps");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- (0, _steps.Given)('the custom title is "Barbaz" and the app title is "Example!"', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('the custom title is "Barbaz" and the app title is "Example!"', () => {
6
6
  cy.visitStory('HeaderBarTesting', 'Custom Application Title');
7
7
  });
8
- (0, _steps.Then)('the displayed title should be "Barbaz - Example!"', () => {
8
+ (0, _cypressCucumberPreprocessor.Then)('the displayed title should be "Barbaz - Example!"', () => {
9
9
  cy.get('[data-test="headerbar-title"]').should($title => {
10
10
  expect($title.text()).to.equal('Barbaz - Example!');
11
11
  });
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
 
3
- var _steps = require("cypress-cucumber-preprocessor/steps");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- (0, _steps.Given)(/the search contains a (.*)/, character => {
5
+ (0, _cypressCucumberPreprocessor.Given)(/the search contains a (.*)/, character => {
6
6
  cy.get('[data-test="headerbar-apps-icon"]').click();
7
7
  cy.get('#filter').type(character);
8
8
  });
@@ -1,10 +1,8 @@
1
1
  "use strict";
2
2
 
3
- var _steps = require("cypress-cucumber-preprocessor/steps");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- require("../common/index.js");
6
-
7
- (0, _steps.Given)(/no app name contains a (.*)/, character => {
5
+ (0, _cypressCucumberPreprocessor.Given)(/no app name contains a (.*)/, character => {
8
6
  // Needs to be wrapped, otherwise for some reason the wrong char is in the scope
9
7
  cy.all(() => cy.window(), () => cy.wrap(character)).then(_ref => {
10
8
  let [win, char] = _ref;
@@ -18,6 +16,6 @@ require("../common/index.js");
18
16
  expect(modulesWithSpecialChar).to.have.length(0);
19
17
  });
20
18
  });
21
- (0, _steps.Then)('no results should be shown', () => {
19
+ (0, _cypressCucumberPreprocessor.Then)('no results should be shown', () => {
22
20
  cy.get('[data-test="headerbar-apps-menu-list"] > a > div').should('not.exist');
23
21
  });
@@ -1,24 +1,22 @@
1
1
  "use strict";
2
2
 
3
- var _steps = require("cypress-cucumber-preprocessor/steps");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- var _common = require("../../__e2e__/stories/common.js");
5
+ var _modulesWithSpecialCharacters = require("../../__e2e__/stories/modulesWithSpecialCharacters.js");
6
6
 
7
- require("../common/index.js");
8
-
9
- (0, _steps.Given)(/some app names contain a (.*)/, character => {
7
+ (0, _cypressCucumberPreprocessor.Given)(/some app names contain a (.*)/, character => {
10
8
  // Needs to be wrapped, otherwise for some reason the wrong char is in the scope
11
9
  cy.wrap(character).then(char => {
12
10
  cy.visitStory('HeaderBarTesting', 'With Special App Name Characters'); // verify that there's a module with the special char in its name
13
11
 
14
- const modulesWithSpecialChar = _common.modulesWithSpecialCharacters.filter(module => {
12
+ const modulesWithSpecialChar = _modulesWithSpecialCharacters.modulesWithSpecialCharacters.filter(module => {
15
13
  return module.displayName.indexOf(char) !== -1;
16
14
  });
17
15
 
18
16
  expect(modulesWithSpecialChar).to.have.length.of.at.least(1);
19
17
  });
20
18
  });
21
- (0, _steps.Then)(/only apps with (.*) in their name should be shown/, character => {
19
+ (0, _cypressCucumberPreprocessor.Then)(/only apps with (.*) in their name should be shown/, character => {
22
20
  cy.get('[data-test="headerbar-apps-menu-list"] > a > div').should($modules => {
23
21
  $modules.each((index, module) => {
24
22
  const displayName = Cypress.$(module).text();
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "Search apps": "ຄົ້ນຫາແອັບ",
3
- "DHIS2 {{dhis2Version}}": "",
4
- "DHIS2 version unknown": "",
5
- "{{appName}} version unknown": "",
6
- "App {{appVersion}}": "",
7
- "App version unknown": "",
8
- "Debug info": "",
3
+ "DHIS2 {{dhis2Version}}": "DHIS2 {{dhis2Version}}",
4
+ "DHIS2 version unknown": "DHIS2 ບໍ່ຮູ້ເວີຊັນ",
5
+ "{{appName}} version unknown": "{{appName}} ບໍ່ຮູ້ເວີຊັນ",
6
+ "App {{appVersion}}": "ແອັບ {{appVersion}}",
7
+ "App version unknown": "ບໍ່ຮູ້ເວີຊັນແອັບ",
8
+ "Debug info": "ຂໍ້ມູນການແກ້ໄຂ",
9
9
  "Close": "ປິດ",
10
- "Copy debug info": "",
10
+ "Copy debug info": "ກ໋ອບປີ້ຂໍ້ມູນການແກ້ໄຂ",
11
11
  "Online": "ມີການເຊື່ອມຕໍ່",
12
12
  "Offline": "ບໍ່ມີການເຊື່ອມຕໍ່",
13
13
  "Edit profile": "ແກ້ໄຂຂໍ້ມູນ",
14
14
  "Settings": "ຕັ້ງຄ່າ",
15
15
  "Account": "ບັນຊີ",
16
16
  "Help": "ຊ່ວຍ",
17
- "About DHIS2": "",
17
+ "About DHIS2": "ກ່ຽວກັບ DHIS2",
18
18
  "Logout": "ອອກຈາກລະບົບ",
19
- "New {{appName}} version available": "",
20
- "New app version available": "",
21
- "Click to reload": ""
19
+ "New {{appName}} version available": "ມີເວີຊັນໃໝ່ {{appName}} ",
20
+ "New app version available": "ມີແອັບເວີຊັນໃໝ່",
21
+ "Click to reload": "ຄລິກເພື່ອໂຫຼດຄືນໃໝ່"
22
22
  }