@eeacms/volto-clms-theme 1.0.65 → 1.0.66

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 (144) hide show
  1. package/CHANGELOG.md +93 -2
  2. package/jest-addon.config.js +5 -0
  3. package/package.json +20 -17
  4. package/src/actions/datasets_by_uid/datasets_by_uid.test.js +14 -0
  5. package/src/actions/downloadtool/downloadtool.test.js +54 -0
  6. package/src/actions/extra_breadcrumbs/extra_breadcrumb.test.js +16 -0
  7. package/src/actions/format_conversion_table/format_conversion_table.test.js +16 -0
  8. package/src/actions/geonetwork/import_geonetwork.test.js +15 -0
  9. package/src/actions/meeting/meeting.test.js +41 -0
  10. package/src/actions/newsletter/get_newsletter_subscribers.test.js +14 -0
  11. package/src/actions/projections/get_projections.test.js +13 -0
  12. package/src/actions/registry/registry.test.js +15 -0
  13. package/src/actions/subscription/post_subscription.js +0 -3
  14. package/src/actions/subscription/post_subscription.test.js +64 -0
  15. package/src/actions/tokens/tokens.test.js +39 -0
  16. package/src/actions/userschema/userschema.test.js +14 -0
  17. package/src/components/Blocks/CclButtonBlock/CclButtonBlockEdit.test.jsx +90 -0
  18. package/src/components/Blocks/CclButtonBlock/CclButtonBlockView.jsx +8 -11
  19. package/src/components/Blocks/CclButtonBlock/CclButtonBlockView.test.jsx +42 -0
  20. package/src/components/Blocks/CclButtonBlock/__snapshots__/CclButtonBlockEdit.test.jsx.snap +27 -0
  21. package/src/components/Blocks/CclButtonBlock/__snapshots__/CclButtonBlockView.test.jsx.snap +56 -0
  22. package/src/components/Blocks/CclCardBlock/CclCardBlockEdit.jsx +8 -8
  23. package/src/components/Blocks/CclCardBlock/CclCardBlockEdit.test.jsx +160 -0
  24. package/src/components/Blocks/CclCardBlock/CclCardBlockView.test.jsx +61 -0
  25. package/src/components/Blocks/CclCardBlock/__snapshots__/CclCardBlockEdit.test.jsx.snap +45 -0
  26. package/src/components/Blocks/CclCardContainerBlock/CclCardContainerBlockEdit.jsx +8 -12
  27. package/src/components/Blocks/CclCardContainerBlock/CclCardContainerBlockView.jsx +3 -3
  28. package/src/components/Blocks/CclContextNavigationBlock/CclContextNavigationBlockEdit.test.jsx +42 -0
  29. package/src/components/Blocks/CclContextNavigationBlock/CclContextNavigationBlockView.test.jsx +42 -0
  30. package/src/components/Blocks/CclContextNavigationBlock/__snapshots__/CclContextNavigationBlockEdit.test.jsx.snap +12 -0
  31. package/src/components/Blocks/CclContextNavigationBlock/__snapshots__/CclContextNavigationBlockView.test.jsx.snap +3 -0
  32. package/src/components/Blocks/CclHomeBgImageBlock/CclHomeImageEditor.jsx +43 -41
  33. package/src/components/Blocks/CclHomeProductsBlock/CclHomeProductsBlockView.test.jsx +54 -0
  34. package/src/components/Blocks/CclHomeProductsBlock/__snapshots__/CclHomeProductsBlockView.test.jsx.snap +57 -0
  35. package/src/components/Blocks/CclHomeSearchBlock/CclHomeSearchBlockEdit.jsx +9 -10
  36. package/src/components/Blocks/CclHomeSearchBlock/CclHomeSearchBlockView.jsx +28 -9
  37. package/src/components/Blocks/CclHomeSearchBlock/CclHomeSearchBlockView.test.jsx +113 -0
  38. package/src/components/Blocks/CclHomeSearchBlock/__snapshots__/CclHomeSearchBlockView.test.jsx.snap +310 -0
  39. package/src/components/Blocks/CclHomeUsersBlock/CclHomeUserBlockView.test.jsx +61 -0
  40. package/src/components/Blocks/CclHomeUsersBlock/CclHomeUsersBlockEdit.jsx +180 -146
  41. package/src/components/Blocks/CclHomeUsersBlock/CclHomeUsersBlockView.jsx +8 -1
  42. package/src/components/Blocks/CclHomeUsersBlock/HomeUsersSchema.js +0 -1
  43. package/src/components/Blocks/CclRelatedListingBlock/CclRelatedListingEdit.jsx +4 -6
  44. package/src/components/Blocks/CclRelatedListingBlock/CclRelatedListingView.jsx +26 -23
  45. package/src/components/Blocks/CclTextLinkCarouselBlock/CclTextLinkCarouselEdit.jsx +4 -10
  46. package/src/components/Blocks/CclTextLinkCarouselBlock/CclTextLinkCarouselView.jsx +2 -6
  47. package/src/components/Blocks/CclUseCaseList/CclUseCaseListEdit.jsx +16 -13
  48. package/src/components/Blocks/CclUseCaseList/CclUseCaseListView.jsx +17 -19
  49. package/src/components/Blocks/CclUseCaseList/utils.js +1 -1
  50. package/src/components/Blocks/CustomTemplates/VoltoArcgisBlock/CclMapMenu.jsx +2 -2
  51. package/src/components/Blocks/CustomTemplates/VoltoFormBlock/customIdFieldSchema.js +2 -2
  52. package/src/components/Blocks/CustomTemplates/VoltoListingBlock/CclListingCards.jsx +0 -3
  53. package/src/components/Blocks/CustomTemplates/VoltoListingBlock/CclListingCards.test.jsx +247 -0
  54. package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/AccordionFacet.jsx +82 -0
  55. package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/RightModalFacets.jsx +37 -31
  56. package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/WithType.jsx +8 -0
  57. package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/index.js +3 -3
  58. package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/CclCarouselView.jsx +17 -48
  59. package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/CclTabsView.jsx +11 -55
  60. package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/CclVerticalFaqTabsView.jsx +17 -17
  61. package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/CclVerticalTabsView.jsx +24 -15
  62. package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/RoutingHOC.jsx +18 -48
  63. package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/TabsWidget.jsx +11 -8
  64. package/src/components/Blocks/customBlocks.js +57 -155
  65. package/src/components/Blocks/{CclCardContainerBlock/utils.js → utils.js} +0 -0
  66. package/src/components/CLMSDatasetDetailView/CLMSDatasetDetailView.jsx +6 -16
  67. package/src/components/CLMSDatasetDetailView/CLMSDatasetDetailView.test.jsx +70 -0
  68. package/src/components/CLMSDatasetDetailView/DataSetInfoContent.jsx +16 -17
  69. package/src/components/CLMSDatasetDetailView/DataSetInfoContent.test.jsx +61 -0
  70. package/src/components/CLMSDatasetDetailView/DownloadDataSetContent.jsx +1 -13
  71. package/src/components/CLMSDatasetDetailView/DownloadDataSetContent.test.jsx +56 -0
  72. package/src/components/CLMSDatasetDetailView/MetadataContent.jsx +2 -1
  73. package/src/components/CLMSDownloadCartView/CLMSCartContent.jsx +32 -25
  74. package/src/components/CLMSDownloadCartView/CLMSDownloadCartView.jsx +5 -30
  75. package/src/components/CLMSDownloadCartView/cartUtils.js +3 -6
  76. package/src/components/CLMSDownloadCartView/conversion.js +1 -2
  77. package/src/components/CLMSDownloadableFileView/CLMSDownloadableFileView.jsx +6 -18
  78. package/src/components/CLMSDownloadsView/CLMSDownloadTasks.jsx +41 -67
  79. package/src/components/CLMSDownloadsView/CLMSDownloadsView.jsx +0 -3
  80. package/src/components/CLMSDownloadsView/FileCard.jsx +1 -16
  81. package/src/components/CLMSDownloadsView/filecard.less +9 -0
  82. package/src/components/CLMSMapViewerView/CLMSMapViewerView.jsx +3 -3
  83. package/src/components/CLMSMeetingView/CLMSMeetingEmailsView.jsx +6 -5
  84. package/src/components/CLMSMeetingView/CLMSMeetingView.jsx +46 -33
  85. package/src/components/CLMSNewsItemView/CLMSNewsItemView.test.jsx +44 -0
  86. package/src/components/CLMSProfileView/CLMSProfileView.jsx +6 -3
  87. package/src/components/CLMSSubscriptionView/ConfirmSubscriptionView.jsx +18 -12
  88. package/src/components/CLMSSubscriptionView/SubscriptionView.jsx +33 -33
  89. package/src/components/CclButton/CclButton.jsx +4 -3
  90. package/src/components/CclButton/CclButton.test.js +76 -0
  91. package/src/components/CclCard/CclCard.jsx +5 -34
  92. package/src/components/CclCard/CclCard.test.jsx +133 -0
  93. package/src/components/CclCitation/CclCitation.test.jsx +11 -0
  94. package/src/components/CclCitation/__snapshots__/CclCitation.test.jsx.snap +14 -0
  95. package/src/components/CclDownloadTable/CclDownloadTable.jsx +45 -37
  96. package/src/components/CclDownloadTable/download-table.less +14 -1
  97. package/src/components/CclExpandableFilter/CclExpandableFilter.test.jsx +61 -0
  98. package/src/components/CclInfoDescription/CclInfoContainer.test.js +16 -0
  99. package/src/components/CclInfoDescription/CclInfoDescription.test.js +18 -0
  100. package/src/components/CclLanguageSelector/CclLanguageSelector.jsx +80 -109
  101. package/src/components/CclLanguageSelector/CclLanguageSelector.test.jsx +118 -0
  102. package/src/components/CclLanguageSelector/__snapshots__/CclLanguageSelector.test.jsx.snap +43 -0
  103. package/src/components/CclLoginModal/CclLoginModal.jsx +3 -1
  104. package/src/components/CclModal/CclModal.test.js +71 -0
  105. package/src/components/CclTab/CclTab.test.jsx +54 -0
  106. package/src/components/CclTab/CclTabs.jsx +2 -2
  107. package/src/components/CclTopMainMenu/CclFooterMenu.jsx +4 -4
  108. package/src/components/CclTopMainMenu/CclTopMainMenu.jsx +6 -6
  109. package/src/components/CclTopMainMenu/multilingualPath.js +1 -3
  110. package/src/components/CclVerticalFilterMenu/CclVerticalFilterMenu.jsx +2 -2
  111. package/src/components/CclVerticalFilterMenu/CclVerticalFilterMenu.test.jsx +30 -0
  112. package/src/components/Widgets/MapLayersWidget.jsx +8 -1
  113. package/src/customizations/volto/components/theme/Footer/Footer.jsx +58 -34
  114. package/src/customizations/volto/components/theme/Header/Header.jsx +56 -78
  115. package/src/customizations/volto/components/theme/Logout/Logout.jsx +74 -0
  116. package/src/index.js +3 -6
  117. package/src/reducers/datasets_by_uid/datasets_by_uid.test.js +54 -0
  118. package/src/reducers/downloadtool/downloadtool_reducer.js +8 -67
  119. package/src/reducers/extra_breadcrumbs/extra_breadcrumb_reducer.js +21 -1
  120. package/src/reducers/extra_breadcrumbs/extra_breadcrumb_reducer.test.js +55 -0
  121. package/src/reducers/geonetwork/import_geonetwork_reducer.test.js +60 -0
  122. package/src/reducers/index.js +0 -2
  123. package/src/reducers/meeting/meeting_subscribers_reducer.js +4 -2
  124. package/src/reducers/newsletter/get_newsletter_reducer.test.js +75 -0
  125. package/src/reducers/registry/registry.test.js +74 -0
  126. package/src/reducers/subscription/subscription_reducer.test.js +60 -0
  127. package/src/reducers/tokens/tokens.test.js +221 -0
  128. package/src/reducers/userschema/userschema.js +1 -1
  129. package/theme/clms/css/carousel.css +1 -1
  130. package/theme/clms/css/header.css +4 -0
  131. package/theme/clms/css/home.css +4 -4
  132. package/theme/clms/css/styles.less +17 -4
  133. package/src/components/Blocks/CclHomeUsersBlock/utils.js +0 -27
  134. package/src/components/Blocks/CclProductLeftMenu/CclProductLeftMenuEdit.jsx +0 -124
  135. package/src/components/Blocks/CclProductLeftMenu/CclProductLeftMenuView.jsx +0 -48
  136. package/src/components/Blocks/CclProductLeftMenu/LeftMenuSchema.js +0 -78
  137. package/src/components/Blocks/CclProductLeftMenu/utils.js +0 -25
  138. package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/AccordionCheckboxFacet.jsx +0 -56
  139. package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/AccordionLabelFacet.jsx +0 -58
  140. package/src/components/CLMSDownloadCartView/CLMSTasksInProgress.jsx +0 -238
  141. package/src/components/CLMSEventView/CLMSEventView.jsx +0 -53
  142. package/src/components/CclTable/CclTable.jsx +0 -95
  143. package/src/components/CclTable/table.less +0 -42
  144. package/src/i18n.js +0 -183
package/CHANGELOG.md CHANGED
@@ -4,8 +4,99 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ #### [1.0.66](https://github.com/eea/volto-clms-theme/compare/1.0.65...1.0.66)
8
+
9
+ - Setup testing [`#199`](https://github.com/eea/volto-clms-theme/pull/199)
10
+ - Setup testing [`#200`](https://github.com/eea/volto-clms-theme/pull/200)
11
+ - Bugs n improvements [`#198`](https://github.com/eea/volto-clms-theme/pull/198)
12
+ - Header and table styles [`#197`](https://github.com/eea/volto-clms-theme/pull/197)
13
+ - Develop [`#196`](https://github.com/eea/volto-clms-theme/pull/196)
14
+ - Trello issues [`#195`](https://github.com/eea/volto-clms-theme/pull/195)
15
+ - testing some components [`#41`](https://github.com/eea/volto-clms-theme/pull/41)
16
+ - Test [`#38`](https://github.com/eea/volto-clms-theme/pull/38)
17
+ - remove default carousel arrows [`ff257c8`](https://github.com/eea/volto-clms-theme/commit/ff257c8a36963e9a07f976357b0d0e05116f1993)
18
+ - activate renamed tests [`17f91d6`](https://github.com/eea/volto-clms-theme/commit/17f91d649b5797c47fb438c577ffdf2cdf042d72)
19
+ - add transformIgnorePatterns to jest-addon.config.js [`f290905`](https://github.com/eea/volto-clms-theme/commit/f290905a8f2476953a043961f80ea0e81734c7a9)
20
+ - comment tests [`8a16439`](https://github.com/eea/volto-clms-theme/commit/8a164398992bddb8edd1030cc2b2a4538d5c3215)
21
+ - upgrade volto-clms-utils [`fe54d62`](https://github.com/eea/volto-clms-theme/commit/fe54d62c40b3477fcf97a46baa3f4f4e70c8bd6a)
22
+ - add volto-clms-utils alias to jest modules [`f336eca`](https://github.com/eea/volto-clms-theme/commit/f336ecab808d856460293919d69524e8b5d92406)
23
+ - add @wojtekmaj/enzyme-adapter-react-17 to use enzyme with react 17 [`0274055`](https://github.com/eea/volto-clms-theme/commit/0274055622745b56392679e14b14e4eab62ad8c8)
24
+ - fix tests [`cb5c45a`](https://github.com/eea/volto-clms-theme/commit/cb5c45a592d402c5d58b08979c1e34e992881efe)
25
+ - fix component tests [`5ff51ce`](https://github.com/eea/volto-clms-theme/commit/5ff51ce8ec08e56fab452480ecedc54d24574eb3)
26
+ - fix reducer tests [`63484e5`](https://github.com/eea/volto-clms-theme/commit/63484e5c8480dad453aff42486fc9441f2b052d9)
27
+ - actions tests fix [`f83fa7c`](https://github.com/eea/volto-clms-theme/commit/f83fa7ce29b7e04b70438a2a0408b581672da12e)
28
+ - delete removed components tests [`1f3aaf1`](https://github.com/eea/volto-clms-theme/commit/1f3aaf14ecf76ea6680c47916dca0455aa46bdba)
29
+ - test up to 59% [`52751d4`](https://github.com/eea/volto-clms-theme/commit/52751d4237c26e9319e1c5d75fa2b39d7d05cee3)
30
+ - test coverage up to 56% [`78d3dcb`](https://github.com/eea/volto-clms-theme/commit/78d3dcb264b38e690e7257a8165cc091dbd37752)
31
+ - remove unused CclTable component [`76231ad`](https://github.com/eea/volto-clms-theme/commit/76231adc2a7cd7ea5e9464cf4b9c95bbcc7e9952)
32
+ - Mobile menu close icon [`1c06ef0`](https://github.com/eea/volto-clms-theme/commit/1c06ef0215b751af4414277fc72215cdfc11db7b)
33
+ - remove duplicated code Header [`f74f07a`](https://github.com/eea/volto-clms-theme/commit/f74f07aeaeb4a2ee31a20aace8ac4bf88a3c844d)
34
+ - add new field to hide some layers [`fe18c8f`](https://github.com/eea/volto-clms-theme/commit/fe18c8f64188799a007d56bffbd3d6bc2e985f7b)
35
+ - Download filecards [`f60d1a0`](https://github.com/eea/volto-clms-theme/commit/f60d1a0783aa1a9d98aa702f26eab1ce6ef22a6f)
36
+ - remove default Event view [`862dd90`](https://github.com/eea/volto-clms-theme/commit/862dd90752c2917ac1f4f179cad1cf431f274eeb)
37
+ - remove duplicated lines customBlocks [`7227e3f`](https://github.com/eea/volto-clms-theme/commit/7227e3fa2635cefea371d3829ea7e1f87120c4b4)
38
+ - remove duplicated code on languageselector [`8de39e6`](https://github.com/eea/volto-clms-theme/commit/8de39e6f989f62bf7df26ecd3850609ff4d990d3)
39
+ - new facet component and HOC to send the type [`07c3794`](https://github.com/eea/volto-clms-theme/commit/07c379424ac396d9a646b25cda272f7d3e4d2f90)
40
+ - Facets unification [`139e198`](https://github.com/eea/volto-clms-theme/commit/139e1985eec07148516875874c2be21cc3a41f41)
41
+ - remove unused cclproductleftmenu block [`123737c`](https://github.com/eea/volto-clms-theme/commit/123737c4ee470e6ba6a6188466690a33d2ca55ed)
42
+ - remove duplicated lines [`dc27ce7`](https://github.com/eea/volto-clms-theme/commit/dc27ce72b1fcbbe72da6aaff113733f3a131813d)
43
+ - ESLint fix [`21cda52`](https://github.com/eea/volto-clms-theme/commit/21cda52c57b68fb63dc4b29494cd86d8d5768e1c)
44
+ - Table styles [`05f61a3`](https://github.com/eea/volto-clms-theme/commit/05f61a3ef3572c46b33c8645ac1d3755ce932bbf)
45
+ - move duplicated utils [`ece1afa`](https://github.com/eea/volto-clms-theme/commit/ece1afa2aeac5a4f3c12e16444a8ea0c3b9bcc57)
46
+ - sonarqube [`e944edb`](https://github.com/eea/volto-clms-theme/commit/e944edb6c629a8fc1fa4c5d461212c1d12e22d81)
47
+ - sonarqube bugfixes [`cae76a6`](https://github.com/eea/volto-clms-theme/commit/cae76a603974f83421f9f09d58409117e3b0a6b1)
48
+ - Header improvements [`8d45a97`](https://github.com/eea/volto-clms-theme/commit/8d45a9729ee29a8915d2fd859a7eae17b14113ae)
49
+ - sonarqube CclUseCaseList Edit and View [`0e58b9a`](https://github.com/eea/volto-clms-theme/commit/0e58b9af3578785609a71751987ed26845046254)
50
+ - sonarqube CclHomeImageEditor [`e7819a5`](https://github.com/eea/volto-clms-theme/commit/e7819a518372f0122580637a60dc1f2965980466)
51
+ - sonarqube minor [`2b3985d`](https://github.com/eea/volto-clms-theme/commit/2b3985d61a31ef8888c4f1be8b7769bd597856a9)
52
+ - sonarqube minors [`53e7b31`](https://github.com/eea/volto-clms-theme/commit/53e7b31999ad42d895ea0b1a4b7a3a552726459b)
53
+ - sonarqube [`01f4dfe`](https://github.com/eea/volto-clms-theme/commit/01f4dfeaab602e07c3085ae15c87d40e7055fd07)
54
+ - sonarqube [`bfacc2e`](https://github.com/eea/volto-clms-theme/commit/bfacc2e988223f1b28fb05e9275234f408d94c83)
55
+ - sonarqube major [`2ef2392`](https://github.com/eea/volto-clms-theme/commit/2ef2392fd857111f86d7d01e3e39acadebe8c48a)
56
+ - sonarqube and RoutingHOC uneeded code [`3df5ecf`](https://github.com/eea/volto-clms-theme/commit/3df5ecff2bf3a3362e03471b6d0b16aa0e0cac61)
57
+ - sonarqube [`cff1ff6`](https://github.com/eea/volto-clms-theme/commit/cff1ff6bab4b089d2c4dc25c9d85e6ac80d3990e)
58
+ - sonarqube [`813d085`](https://github.com/eea/volto-clms-theme/commit/813d085a062b65e5652c185e91469181184d986a)
59
+ - sonarqube [`c70c021`](https://github.com/eea/volto-clms-theme/commit/c70c021d1a88e50415006b6903fcbe1b63766504)
60
+ - remove unneeded useEffect [`3981f33`](https://github.com/eea/volto-clms-theme/commit/3981f335e65ba455571930f9f43a510c1a83ac40)
61
+ - sonarqube [`9a0e9a1`](https://github.com/eea/volto-clms-theme/commit/9a0e9a1d7390610e97d3da48998cbae27ab2a4d7)
62
+ - bugfixes [`5f659f9`](https://github.com/eea/volto-clms-theme/commit/5f659f935e7e0b4c409fd421349e6b972ba71f74)
63
+ - code issues [`2d64947`](https://github.com/eea/volto-clms-theme/commit/2d6494713403939772c5f6779a503c169113fa32)
64
+ - remove unused setActiveTab [`392986e`](https://github.com/eea/volto-clms-theme/commit/392986ede8b39059fe28c00b586def25896c6fdd)
65
+ - conflict resolved [`5b90061`](https://github.com/eea/volto-clms-theme/commit/5b900617c3df49245a506627d67c6b4b2300267d)
66
+ - conflict resolved [`c626459`](https://github.com/eea/volto-clms-theme/commit/c626459dc0557766261a1df7d4c3f12f0f660fcd)
67
+ - BreadCrumb removed from technical library view and home page dataset search block now working [`23d233f`](https://github.com/eea/volto-clms-theme/commit/23d233fb76997fea8ce7ee862338aef76b12a0d1)
68
+ - carousel style fixed, 'came_from' added to login modal EULogin button, and omelette log out view overrided [`9e31782`](https://github.com/eea/volto-clms-theme/commit/9e31782782f10ab9decac964d1a10f8c2432e5d9)
69
+ - versions [`05bfc33`](https://github.com/eea/volto-clms-theme/commit/05bfc335411f988bf04981c7bb012f0dd38b1929)
70
+ - inputValue initialiced to false [`5d082db`](https://github.com/eea/volto-clms-theme/commit/5d082dbb6690ea869b32b4bf034c2590f6c698d2)
71
+ - code cleaning [`0bd34cc`](https://github.com/eea/volto-clms-theme/commit/0bd34ccda06b8caf68fda8bce421d4ab1d9b3f07)
72
+ - personal data protection link changed to react-router-dom Link [`cb96f16`](https://github.com/eea/volto-clms-theme/commit/cb96f16cd64e94f09b2bea7bbd4c596bd7783c43)
73
+ - footer link to personal data protection fixed [`e046e51`](https://github.com/eea/volto-clms-theme/commit/e046e51574e070b657620907134e171faa0f14b7)
74
+ - code cleaning [`de99d74`](https://github.com/eea/volto-clms-theme/commit/de99d741c9294521ee87995782bd5b7e38407689)
75
+ - event listing change, newsletter subscription working again from footer and language selector temporally removed from header [`aa02604`](https://github.com/eea/volto-clms-theme/commit/aa0260483c685dcfac2e46caca41a855d0bf8454)
76
+ - react-redux store in the CLMSDataset test [`df8a921`](https://github.com/eea/volto-clms-theme/commit/df8a921fe95e7446c788bb792655af516418b42e)
77
+ - Fixed test error [`9d019f0`](https://github.com/eea/volto-clms-theme/commit/9d019f03d9099dc7b59330fa389fa023bd3f5941)
78
+ - add snapshots [`ab527f1`](https://github.com/eea/volto-clms-theme/commit/ab527f1ea87c65c9db8ad65ed55a5a7569622d0b)
79
+ - merge develop branch into setup-testing [`e5f1545`](https://github.com/eea/volto-clms-theme/commit/e5f15458d5a590e77f8acbed17282af050670d13)
80
+ - merge develop into setup-testing [`0e9c30f`](https://github.com/eea/volto-clms-theme/commit/0e9c30f4cd17b86900731e40aa79d82629c647a8)
81
+ - snapshots [`90724e6`](https://github.com/eea/volto-clms-theme/commit/90724e63ad2be2a1004a6a0e1cdd4f573bba624f)
82
+ - prettier fix [`cfa5efd`](https://github.com/eea/volto-clms-theme/commit/cfa5efd6d9f40f1496fe6b3d0bcf1ba60ea59f14)
83
+ - test with prettier [`7d4eda6`](https://github.com/eea/volto-clms-theme/commit/7d4eda6b40d54991151bb507a58719ce3c4f3ab1)
84
+ - test [`962115a`](https://github.com/eea/volto-clms-theme/commit/962115a942630dc24a5eb2f1ecc5004e626da4c6)
85
+ - button block tests [`2f4d2af`](https://github.com/eea/volto-clms-theme/commit/2f4d2af8d76297544e570df9bd6b6ceeef035169)
86
+ - button block edit test [`b71b632`](https://github.com/eea/volto-clms-theme/commit/b71b63202ad7743d59efa71b1f7b281b7ebc1a62)
87
+ - CclModal test [`0b9a278`](https://github.com/eea/volto-clms-theme/commit/0b9a278a5c4c068ad5796cda76d71dcfa1411bdd)
88
+ - Ccl modal test improved [`3915419`](https://github.com/eea/volto-clms-theme/commit/39154190ffbb8d98067eade318cc674e40af2ff9)
89
+ - CclInfoDescription test [`bdfb4c8`](https://github.com/eea/volto-clms-theme/commit/bdfb4c83c9cf499e7f33b0dd134d1aa4bb08ad49)
90
+ - tests [`9b1ff4a`](https://github.com/eea/volto-clms-theme/commit/9b1ff4a1d7e5fa0e09ce3bfced51f7c1fd4023e9)
91
+ - add new tests [`5eddfb2`](https://github.com/eea/volto-clms-theme/commit/5eddfb25d6580541d2bf11597413e0c1cacc5408)
92
+ - Remove unused variable [`0bee972`](https://github.com/eea/volto-clms-theme/commit/0bee972878df7bdbd42eea0f19e9757e0e6bcf02)
93
+ - CclButton unittest [`4933a37`](https://github.com/eea/volto-clms-theme/commit/4933a371134b18d9924632092de266622e8032fd)
94
+
7
95
  #### [1.0.65](https://github.com/eea/volto-clms-theme/compare/1.0.64...1.0.65)
8
96
 
97
+ > 2 February 2022
98
+
99
+ - Develop [`#194`](https://github.com/eea/volto-clms-theme/pull/194)
9
100
  - Download page changes [`#193`](https://github.com/eea/volto-clms-theme/pull/193)
10
101
  - remove unneeded getNutsNames action dispatch [`9a1df64`](https://github.com/eea/volto-clms-theme/commit/9a1df64768757eeba697344ac0ceb3b715241baf)
11
102
  - reducer parameter [`ec242bc`](https://github.com/eea/volto-clms-theme/commit/ec242bc1c4039dc67ff5e54cdd078bf56692fdb2)
@@ -351,7 +442,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
351
442
  - test [`daa9d02`](https://github.com/eea/volto-clms-theme/commit/daa9d020eb1a089afc87ad4b5c83a50ab144a54c)
352
443
  - use value attribute [`02b57fe`](https://github.com/eea/volto-clms-theme/commit/02b57fe0a1db2c4d1ec6b3786b12e2e782b0b60c)
353
444
  - use a textarea [`58d8d17`](https://github.com/eea/volto-clms-theme/commit/58d8d1710be3d7bade93ffc3ecca6f0173878efc)
354
- - change some screen messages [`beed740`](https://github.com/eea/volto-clms-theme/commit/beed740d88f93e73cd3f13611c75cf7acab9dcb6)
445
+ - change some screen messages [`beed740`](https://github.com/eea/volto-clms-theme/commit/beed740d88f93e73cd3f13611c75cf7acab9dcb6)
355
446
  - when copying to clipboard copy the full object [`3717f38`](https://github.com/eea/volto-clms-theme/commit/3717f388fb7c828b7c422c058630c115b891810b)
356
447
  - hoem carousel [`01eecf8`](https://github.com/eea/volto-clms-theme/commit/01eecf84e23845c79920004ce9990b282445c0d7)
357
448
  - prettier fix [`27aa6c2`](https://github.com/eea/volto-clms-theme/commit/27aa6c223279977d9a8228e845a1b50f02c42253)
@@ -1058,7 +1149,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1058
1149
  - full width plone-site content type [`ded9191`](https://github.com/eea/volto-clms-theme/commit/ded9191fb3cab2d5ab6dc7625482c19251b7ba56)
1059
1150
  - organize customBlocks properties, getting them out of index.js and adding into blocks folder. New CclProductLeftMenu block component added [`e927add`](https://github.com/eea/volto-clms-theme/commit/e927addf8475cea5d3ef120c910f9fff11a0da14)
1060
1151
  - top main menu component fixes [`eed0a1c`](https://github.com/eea/volto-clms-theme/commit/eed0a1c5eef44ebabed72fa32f9fff1e434a29f6)
1061
- - dataset info content tooltip info added [`3d64560`](https://github.com/eea/volto-clms-theme/commit/3d6456073a6fb4260e72c98b6877d22b206cf755)
1152
+ - dataset info content tooltip info added [`3d64560`](https://github.com/eea/volto-clms-theme/commit/3d6456073a6fb4260e72c98b6877d22b206cf755)
1062
1153
  - Dataset card and accordion [`d6f4381`](https://github.com/eea/volto-clms-theme/commit/d6f4381b6e88589eb80bf51f823a689a822453f2)
1063
1154
  - import React from 'react'; [`4547d29`](https://github.com/eea/volto-clms-theme/commit/4547d297870691cb551d5954de8b1725271fa58f)
1064
1155
  - prettier [`a1b5c82`](https://github.com/eea/volto-clms-theme/commit/a1b5c82b7e361f856ec3b63716a5264ceefa398c)
@@ -8,6 +8,8 @@ module.exports = {
8
8
  '@plone/volto/cypress': '<rootDir>/node_modules/@plone/volto/cypress',
9
9
  '@plone/volto/babel': '<rootDir>/node_modules/@plone/volto/babel',
10
10
  '@plone/volto/(.*)$': '<rootDir>/node_modules/@plone/volto/src/$1',
11
+ '@eeacms/volto-clms-utils/(.*)$':
12
+ '<rootDir>/node_modules/@eeacms/volto-clms-utils/src/$1',
11
13
  '@package/(.*)$': '<rootDir>/src/$1',
12
14
  '@plone/volto-quanta/(.*)$': '<rootDir>/src/addons/volto-quanta/src/$1',
13
15
  '@eeacms/(.*?)/(.*)$': '<rootDir>/src/addons/$1/src/$2',
@@ -25,6 +27,9 @@ module.exports = {
25
27
  '^.+\\.(jpg)$': 'jest-file',
26
28
  '^.+\\.(svg)$': './node_modules/@plone/volto/jest-svgsystem-transform.js',
27
29
  },
30
+ transformIgnorePatterns: [
31
+ 'node_modules/(?!(@eeacms/volto-clms-utils/|@plone/volto/|slick-carousel))',
32
+ ],
28
33
  coverageThreshold: {
29
34
  global: {
30
35
  branches: 5,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-clms-theme",
3
- "version": "1.0.65",
3
+ "version": "1.0.66",
4
4
  "description": "volto-clms-theme: Volto theme for CLMS site",
5
5
  "main": "src/index.js",
6
6
  "author": "CodeSyntax for the European Environment Agency",
@@ -30,40 +30,44 @@
30
30
  "@eeacms/volto-taxonomy"
31
31
  ],
32
32
  "dependencies": {
33
- "@eeacms/volto-tabs-block": "1.2.7",
34
33
  "@eeacms/volto-accordion-block": "3.4.7",
34
+ "@eeacms/volto-arcgis-block": "*",
35
+ "@eeacms/volto-clms-utils": "0.1.6",
35
36
  "@eeacms/volto-columns-block": "4.4.3",
36
37
  "@eeacms/volto-metadata-block": "^2.1.0",
37
38
  "@eeacms/volto-resize-helper": "0.2.1",
38
- "volto-dropdownmenu": "2.2.7",
39
+ "@eeacms/volto-tabs-block": "1.2.7",
40
+ "@eeacms/volto-taxonomy": "^1.0.0",
39
41
  "@fortawesome/fontawesome-svg-core": "1.2.35",
40
- "@fortawesome/free-solid-svg-icons": "5.15.3",
41
42
  "@fortawesome/free-regular-svg-icons": "5.15.3",
43
+ "@fortawesome/free-solid-svg-icons": "5.15.3",
42
44
  "@fortawesome/react-fontawesome": "0.1.14",
43
- "react-slick": "0.28.1",
44
- "slick-carousel": "1.8.1",
45
+ "husky": "7.0.4",
45
46
  "react-csv": "2.2.2",
46
- "react-svg": "14.0.4",
47
- "@eeacms/volto-arcgis-block": "*",
48
47
  "react-native-mime-types": "2.3.0",
49
- "@eeacms/volto-clms-utils": "0.1.5",
50
- "volto-form-block": "2.2.2",
51
- "@eeacms/volto-taxonomy": "^1.0.0"
48
+ "react-slick": "0.28.1",
49
+ "react-svg": "14.0.4",
50
+ "slick-carousel": "1.8.1",
51
+ "volto-dropdownmenu": "2.2.7",
52
+ "volto-form-block": "2.2.2"
52
53
  },
53
54
  "devDependencies": {
55
+ "@cypress/code-coverage": "^3.9.5",
56
+ "babel-plugin-transform-class-properties": "^6.24.1",
57
+ "enzyme": "3.11.0",
58
+ "enzyme-adapter-react-16": "1.15.6",
59
+ "@wojtekmaj/enzyme-adapter-react-17": "0.6.6",
54
60
  "eslint": "^6.8.0",
55
61
  "eslint-config-prettier": "^8.2.0",
56
62
  "eslint-plugin-prettier": "3.1.3",
57
63
  "eslint-plugin-react-app": "^6.2.2",
58
- "husky": "6.0.0",
64
+ "husky": "7.0.4",
59
65
  "jsconfig": "^0.2.0",
60
66
  "prettier": "2.0.5",
61
67
  "prettier-eslint": "^12.0.0",
62
68
  "stylelint": "^13.12.0",
63
69
  "stylelint-config-idiomatic-order": "8.1.0",
64
- "stylelint-prettier": "1.1.2",
65
- "@cypress/code-coverage": "^3.9.5",
66
- "babel-plugin-transform-class-properties": "^6.24.1"
70
+ "stylelint-prettier": "1.1.2"
67
71
  },
68
72
  "prettier": {
69
73
  "trailingComma": "all",
@@ -113,10 +117,9 @@
113
117
  "prettier:fix": "../../../node_modules/.bin/prettier --single-quote --write 'src/**/*.{js,jsx,json,css,less,md}'",
114
118
  "lint": "../../../node_modules/eslint/bin/eslint.js --max-warnings=0 'src/**/*.{js,jsx}'",
115
119
  "lint:fix": "../../../node_modules/eslint/bin/eslint.js --fix 'src/**/*.{js,jsx}'",
116
- "i18n": "NODE_ENV=production node src/i18n.js",
117
120
  "cypress:run": "NODE_ENV=production CYPRESS_API=plone ../../../node_modules/cypress/bin/cypress run",
118
121
  "cypress:open": "NODE_ENV=production CYPRESS_API=plone ../../../node_modules/cypress/bin/cypress open",
119
122
  "precommit": "yarn stylelint && yarn prettier && yarn lint",
120
- "prepare": "husky install"
123
+ "test": "docker run -it --rm -v $(pwd):/opt/frontend/my-volto-project/src/addons/volto-clms-theme -e GIT_NAME=volto-clms-theme -e NAMESPACE=@eeacms plone/volto-addon-ci"
121
124
  }
122
125
  }
@@ -0,0 +1,14 @@
1
+ import { getDatasetsByUid, DATASETS_BY_UID } from './datasets_by_uid';
2
+
3
+ describe('Dataset action', () => {
4
+ describe('getDatasetsByUid', () => {
5
+ it('should create an action to get datasets', () => {
6
+ const uids = ['uid1', 'uid2'];
7
+ const action = getDatasetsByUid(uids);
8
+
9
+ expect(action.type).toEqual(DATASETS_BY_UID);
10
+ expect(action.request.op).toEqual('get');
11
+ expect(action.request.path).toEqual('/@datasets_by_uid?UID=' + uids);
12
+ });
13
+ });
14
+ });
@@ -0,0 +1,54 @@
1
+ import { DELETE_DOWNLOADTOOL, deleteDownloadtool } from './delete_downloadtool';
2
+ import {
3
+ GET_DOWNLOADTOOL,
4
+ getDownloadtool,
5
+ GET_NUTSNAME,
6
+ getNutsNames,
7
+ } from './get_downloadtool';
8
+ import { POST_DOWNLOADTOOL, postDownloadtool } from './post_downloadtool';
9
+
10
+ describe('Downloadtool actions', () => {
11
+ describe('deleteDownloadtool', () => {
12
+ it('should create an action to delete downloadtool', () => {
13
+ const task_id = 'task_id';
14
+ const action = deleteDownloadtool(task_id);
15
+
16
+ expect(action.type).toEqual(DELETE_DOWNLOADTOOL);
17
+ expect(action.request.op).toEqual('del');
18
+ expect(action.request.path).toEqual('/@datarequest_delete');
19
+ expect(action.request.data).toEqual({ TaskID: task_id });
20
+ });
21
+ });
22
+ describe('getDownloadtool', () => {
23
+ it('should create an action to get downloadtool', () => {
24
+ const action = getDownloadtool();
25
+
26
+ expect(action.type).toEqual(GET_DOWNLOADTOOL);
27
+ expect(action.request.op).toEqual('get');
28
+ expect(action.request.path).toEqual('/@datarequest_search');
29
+ });
30
+ });
31
+ describe('getNutsNames', () => {
32
+ it('should create an action to get downloadtool', () => {
33
+ const nutsids = 'nutsids';
34
+ const action = getNutsNames(nutsids);
35
+
36
+ expect(action.type).toEqual(GET_NUTSNAME);
37
+ expect(action.request.op).toEqual('get');
38
+ expect(action.request.path).toEqual(`/@nuts_name?nuts_ids=${nutsids}`);
39
+ });
40
+ });
41
+ describe('postDownloadtool', () => {
42
+ it('should create an action to post downloadtool', () => {
43
+ const item = { data: 'data' };
44
+ const unique_ids = ['unique_ids'];
45
+ const action = postDownloadtool(item, unique_ids);
46
+
47
+ expect(action.type).toEqual(POST_DOWNLOADTOOL);
48
+ expect(action.request.op).toEqual('post');
49
+ expect(action.request.data).toEqual(item);
50
+ expect(action.request.path).toEqual('/@datarequest_post');
51
+ expect(action.unique_ids).toEqual(unique_ids);
52
+ });
53
+ });
54
+ });
@@ -0,0 +1,16 @@
1
+ import {
2
+ getExtraBreadcrumbItems,
3
+ GET_EXTRA_BREADCRUMB_ITEMS,
4
+ } from './extra_breadcrumb';
5
+
6
+ describe('Breadcrumbs action', () => {
7
+ describe('getBreadcrumbs', () => {
8
+ it('should create an action to get the breadcrumbs', () => {
9
+ const items = ['item1', 'item2'];
10
+ const action = getExtraBreadcrumbItems(items);
11
+
12
+ expect(action.type).toEqual(GET_EXTRA_BREADCRUMB_ITEMS);
13
+ expect(action.items).toEqual(items);
14
+ });
15
+ });
16
+ });
@@ -0,0 +1,16 @@
1
+ import {
2
+ getFormatConversionTable,
3
+ GET_FORMATCONVERSIONTABLE,
4
+ } from './get_format_conversion_table';
5
+
6
+ describe('Format converson table action', () => {
7
+ describe('getFormatConversionTable', () => {
8
+ it('should create an action to get the format conversion table', () => {
9
+ const action = getFormatConversionTable();
10
+
11
+ expect(action.type).toEqual(GET_FORMATCONVERSIONTABLE);
12
+ expect(action.request.op).toEqual('get');
13
+ expect(action.request.path).toEqual('/@format_conversion_table');
14
+ });
15
+ });
16
+ });
@@ -0,0 +1,15 @@
1
+ import { postImportGeonetwork } from './import_geonetwork';
2
+ import { POST_IMPORT_GEONETWORK } from './import_geonetwork';
3
+
4
+ describe('Import geonetwork action', () => {
5
+ describe('postImportGeonetwork', () => {
6
+ it('should create an action to post geonetwork', () => {
7
+ const url = 'http://localhost';
8
+ const action = postImportGeonetwork(url);
9
+
10
+ expect(action.type).toEqual(POST_IMPORT_GEONETWORK);
11
+ expect(action.request.op).toEqual('post');
12
+ expect(action.request.path).toEqual(`${url}/@import-from-geonetwork`);
13
+ });
14
+ });
15
+ });
@@ -0,0 +1,41 @@
1
+ import { postMeetingRegister } from './meeting_register';
2
+ import { POST_MEETING_REGISTER } from './meeting_register';
3
+ import { MeetingSubscribersManipulation } from './meeting_subscribers_manipulation';
4
+ import { MEETING_SUBSCRIBERS_MANIPULATION } from './meeting_subscribers_manipulation';
5
+ import { MeetingSubscribers } from './meeting_subscribers';
6
+ import { MEETING_SUBSCRIBERS } from './meeting_subscribers';
7
+
8
+ describe('Meeting actions', () => {
9
+ describe('postMeetingRegister', () => {
10
+ it('should create an action to post the meeting', () => {
11
+ const url = 'http://localhost';
12
+ const action = postMeetingRegister(url);
13
+
14
+ expect(action.type).toEqual(POST_MEETING_REGISTER);
15
+ expect(action.request.op).toEqual('post');
16
+ expect(action.request.path).toEqual(`${url}/@register`);
17
+ });
18
+ });
19
+ describe('MeetingSubscribersManipulation', () => {
20
+ it('should create an action to post subscribers', () => {
21
+ const url = 'http://localhost';
22
+ const action = MeetingSubscribersManipulation(url);
23
+
24
+ expect(action.type).toEqual(MEETING_SUBSCRIBERS_MANIPULATION);
25
+ expect(action.request.op).toEqual('post');
26
+ expect(action.request.path).toEqual(`${url}/@manipulation`);
27
+ });
28
+ });
29
+ describe('MeetingSubscribers', () => {
30
+ it('should create an action to get the subscribers', () => {
31
+ const url = 'http://localhost';
32
+ const action = MeetingSubscribers(url);
33
+
34
+ expect(action.type).toEqual(MEETING_SUBSCRIBERS);
35
+ expect(action.request.op).toEqual('get');
36
+ expect(action.request.path).toEqual(
37
+ `${url}/@search?portal_type=eea.meeting.subscriber&fullobjects=true`,
38
+ );
39
+ });
40
+ });
41
+ });
@@ -0,0 +1,14 @@
1
+ import { getNewsletterSubscriber } from './get_newsletter_subscribers';
2
+ import { GET_NEWSLETTER } from './get_newsletter_subscribers';
3
+
4
+ describe('Newsletter action', () => {
5
+ describe('getNewsletterSubscriber', () => {
6
+ it('should create an action to get the newsletter subscribers', () => {
7
+ const action = getNewsletterSubscriber();
8
+
9
+ expect(action.type).toEqual(GET_NEWSLETTER);
10
+ expect(action.request.op).toEqual('get');
11
+ expect(action.request.path).toEqual('/@newsletter-subscribers');
12
+ });
13
+ });
14
+ });
@@ -0,0 +1,13 @@
1
+ import { getProjections, GET_PROJECTIONS } from './get_projections';
2
+
3
+ describe('Projections action', () => {
4
+ describe('getProjections', () => {
5
+ it('should create an action to get the projections', () => {
6
+ const action = getProjections();
7
+
8
+ expect(action.type).toEqual(GET_PROJECTIONS);
9
+ expect(action.request.op).toEqual('get');
10
+ expect(action.request.path).toEqual('/@projections');
11
+ });
12
+ });
13
+ });
@@ -0,0 +1,15 @@
1
+ import { getRegistry, GET_REGISTRY } from './registry';
2
+
3
+ describe('Registry action', () => {
4
+ describe('getRegistry', () => {
5
+ it('should create an action to get the registry', () => {
6
+ const registry_key = 'registry_key';
7
+ const action = getRegistry(registry_key);
8
+
9
+ expect(action.type).toEqual(GET_REGISTRY);
10
+ expect(action.registry_key).toEqual(registry_key);
11
+ expect(action.request.op).toEqual('get');
12
+ expect(action.request.path).toEqual(`/@anon-registry/${registry_key}`);
13
+ });
14
+ });
15
+ });
@@ -3,9 +3,6 @@
3
3
  * @module actions/event
4
4
  */
5
5
  export const POST_SUBSCRIBE_TO = 'POST_SUBSCRIBE_TO';
6
- // export const POST_CONFIRM_SUBSCRIBE_TO = 'POST_CONFIRM_SUBSCRIBE_TO';
7
- // export const POST_UNSUBSCRIBE_TO = 'POST_UNSUBSCRIBE_TO';
8
- // export const POST_CONFIRM_UNSUBSCRIBE_TO = 'POST_CONFIRM_UNSUBSCRIBE_TO';
9
6
 
10
7
  /**
11
8
  * Subscribe to event.
@@ -0,0 +1,64 @@
1
+ import {
2
+ POST_SUBSCRIBE_TO,
3
+ subscribeTo,
4
+ unsubscribeTo,
5
+ confirmSubscribeTo,
6
+ confirmUnsubscribeTo,
7
+ } from './post_subscription';
8
+
9
+ describe('Subscription actions', () => {
10
+ describe('subscribeTo', () => {
11
+ it('should create an action to post subscription', () => {
12
+ const type_url = 'newsletter';
13
+ const email = 'newsletter@mail.com';
14
+ const action = subscribeTo(type_url, email);
15
+
16
+ expect(action.type).toEqual(POST_SUBSCRIBE_TO);
17
+ expect(action.request.op).toEqual('post');
18
+ expect(action.request.path).toEqual(
19
+ `/@${type_url}-notification-subscribe`,
20
+ );
21
+ expect(action.request.data).toEqual({ email: email });
22
+ });
23
+ });
24
+ describe('unsubscribeTo', () => {
25
+ it('should create an action to post unsubscribe', () => {
26
+ const email = 'newsletter@mail.com';
27
+ const type_url = 'newsletter';
28
+ const action = unsubscribeTo(type_url, email);
29
+
30
+ expect(action.type).toEqual(POST_SUBSCRIBE_TO);
31
+ expect(action.request.op).toEqual('post');
32
+ expect(action.request.path).toEqual(
33
+ `/@${type_url}-notification-unsubscribe`,
34
+ );
35
+ expect(action.request.data).toEqual({ email: email });
36
+ });
37
+ });
38
+ describe('confirmSubscribeTo', () => {
39
+ it('should create an action to post confirm subscribe', () => {
40
+ const type_url = 'newsletter';
41
+ const id = 'id';
42
+ const action = confirmSubscribeTo(type_url, id);
43
+
44
+ expect(action.type).toEqual(POST_SUBSCRIBE_TO);
45
+ expect(action.request.op).toEqual('post');
46
+ expect(action.request.path).toEqual(
47
+ `/@${type_url}-notification-subscribe-confirm/${id}`,
48
+ );
49
+ });
50
+ });
51
+ describe('confirmUnsubscribeTo', () => {
52
+ it('should create an action to post confirm unsubscribe', () => {
53
+ const type_url = 'type_url';
54
+ const id = 'id';
55
+ const action = confirmUnsubscribeTo(type_url, id);
56
+
57
+ expect(action.type).toEqual(POST_SUBSCRIBE_TO);
58
+ expect(action.request.op).toEqual('post');
59
+ expect(action.request.path).toEqual(
60
+ `/@${type_url}-notification-unsubscribe-confirm/${id}`,
61
+ );
62
+ });
63
+ });
64
+ });
@@ -0,0 +1,39 @@
1
+ import {
2
+ GET_TOKENS,
3
+ CREATE_TOKENS,
4
+ DELETE_TOKENS,
5
+ } from '../../constants/ActionTypes';
6
+ import { getTokens, createTokens, deleteTokens } from './tokens';
7
+
8
+ describe('Tokens actions', () => {
9
+ describe('getTokens', () => {
10
+ it('should create an action to get tokens', () => {
11
+ const action = getTokens();
12
+
13
+ expect(action.type).toEqual(GET_TOKENS);
14
+ expect(action.request.op).toEqual('get');
15
+ expect(action.request.path).toEqual('/@service-keys');
16
+ });
17
+ });
18
+ describe('createTokens', () => {
19
+ it('should create an action to post tokens', () => {
20
+ const tokenTitle = 'tokentitle';
21
+ const action = createTokens(tokenTitle);
22
+
23
+ expect(action.type).toEqual(CREATE_TOKENS);
24
+ expect(action.request.op).toEqual('post');
25
+ expect(action.request.path).toEqual('/@service-keys');
26
+ expect(action.request.data).toEqual({ title: tokenTitle });
27
+ });
28
+ });
29
+ describe('deleteTokens', () => {
30
+ it('should create an action to delete tokens', () => {
31
+ const key_id = 'key_id';
32
+ const action = deleteTokens(key_id);
33
+
34
+ expect(action.type).toEqual(DELETE_TOKENS);
35
+ expect(action.request.op).toEqual('del');
36
+ expect(action.request.path).toEqual(`/@service-keys/${key_id}`);
37
+ });
38
+ });
39
+ });
@@ -0,0 +1,14 @@
1
+ import { getUserSchema } from './userschema';
2
+ import { GET_USERSCHEMA } from '../../constants/ActionTypes';
3
+
4
+ describe('User Schema action', () => {
5
+ describe('getUserSchema', () => {
6
+ it('should create an action to get the user schema', () => {
7
+ const action = getUserSchema();
8
+
9
+ expect(action.type).toEqual(GET_USERSCHEMA);
10
+ expect(action.request.op).toEqual('get');
11
+ expect(action.request.path).toEqual('/@userschema');
12
+ });
13
+ });
14
+ });