@eeacms/volto-cca-policy 0.3.129 → 1.0.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 (182) hide show
  1. package/.eslintrc.js +7 -7
  2. package/CHANGELOG.md +19 -13
  3. package/docker-compose.yml +16 -16
  4. package/jest-addon.config.js +25 -420
  5. package/package.json +1 -1
  6. package/src/components/MigrationButtons.jsx +5 -1
  7. package/src/components/manage/Blocks/ASTNavigation/ASTNavigationEdit.jsx +2 -1
  8. package/src/components/manage/Blocks/ASTNavigation/ASTNavigationView.jsx +10 -4
  9. package/src/components/manage/Blocks/ASTNavigation/ASTNavigationView.test.jsx +87 -35
  10. package/src/components/manage/Blocks/C3SIndicatorsGlossaryBlock/C3SIndicatorsGlossaryBlockEdit.jsx +1 -1
  11. package/src/components/manage/Blocks/C3SIndicatorsGlossaryBlock/C3SIndicatorsGlossaryBlockView.test.jsx +1 -1
  12. package/src/components/manage/Blocks/C3SIndicatorsListingBlock/C3SIndicatorsListingBlockEdit.jsx +1 -1
  13. package/src/components/manage/Blocks/C3SIndicatorsListingBlock/C3SIndicatorsListingBlockView.jsx +1 -1
  14. package/src/components/manage/Blocks/C3SIndicatorsListingBlock/C3SIndicatorsListingBlockView.test.jsx +1 -1
  15. package/src/components/manage/Blocks/C3SIndicatorsOverviewBlock/C3SIndicatorsOverviewBlockEdit.jsx +1 -1
  16. package/src/components/manage/Blocks/C3SIndicatorsOverviewBlock/schema.js +0 -20
  17. package/src/components/manage/Blocks/CaseStudyExplorer/CaseStudyExplorerEdit.test.jsx +1 -1
  18. package/src/components/manage/Blocks/CaseStudyExplorer/{CaseStudyExplorerView.js → CaseStudyExplorerView.jsx} +1 -1
  19. package/src/components/manage/Blocks/CaseStudyExplorer/CaseStudyExplorerView.test.jsx +2 -2
  20. package/src/components/manage/Blocks/CaseStudyExplorer/CaseStudyFilters.test.jsx +1 -1
  21. package/src/components/manage/Blocks/CaseStudyExplorer/CaseStudyMap.test.jsx +1 -1
  22. package/src/components/manage/Blocks/CaseStudyExplorer/FeatureDisplay.jsx +2 -1
  23. package/src/components/manage/Blocks/CaseStudyExplorer/FeatureDisplay.test.jsx +1 -1
  24. package/src/components/manage/Blocks/CaseStudyExplorer/styles.less +0 -4
  25. package/src/components/manage/Blocks/CaseStudyExplorer/utils.js +0 -30
  26. package/src/components/manage/Blocks/CollectionStatistics/CollectionStatsEdit.jsx +1 -1
  27. package/src/components/manage/Blocks/CollectionStatistics/CollectionStatsView.jsx +3 -2
  28. package/src/components/manage/Blocks/CollectionStatistics/CollectionStatsView.test.jsx +1 -1
  29. package/src/components/manage/Blocks/ContentLinks/ContentLinksEdit.jsx +1 -1
  30. package/src/components/manage/Blocks/ContentLinks/ContentLinksView.jsx +1 -1
  31. package/src/components/manage/Blocks/ContentLinks/ContentLinksView.test.jsx +1 -1
  32. package/src/components/manage/Blocks/ContentLinks/DropdownListView.jsx +1 -1
  33. package/src/components/manage/Blocks/ContentLinks/DropdownListView.test.jsx +1 -1
  34. package/src/components/manage/Blocks/CountryMapHeatIndex/Filter.test.jsx +1 -1
  35. package/src/components/manage/Blocks/CountryMapHeatIndex/{View.js → View.jsx} +14 -10
  36. package/src/components/manage/Blocks/CountryMapHeatIndex/mapstyle.js +1 -3
  37. package/src/components/manage/Blocks/CountryMapObservatory/CountryMapObservatoryEdit.jsx +2 -1
  38. package/src/components/manage/Blocks/CountryMapObservatory/CountryMapObservatoryOLView.jsx +4 -3
  39. package/src/components/manage/Blocks/CountryMapProfile/Filter.test.jsx +1 -1
  40. package/src/components/manage/Blocks/CountryMapProfile/OLView.jsx +5 -12
  41. package/src/components/manage/Blocks/CountryMapProfile/styles.less +1 -1
  42. package/src/components/manage/Blocks/CountryProfileDetail/{CountryTabPane.js → CountryTabPane.jsx} +11 -4
  43. package/src/components/manage/Blocks/CountryProfileDetail/CountryTabPane.test.jsx +1 -1
  44. package/src/components/manage/Blocks/CountryProfileDetail/{View.js → View.jsx} +20 -15
  45. package/src/components/manage/Blocks/CountryProfileDetail/View.test.jsx +134 -20
  46. package/src/components/manage/Blocks/CountryProfileDetail/index.js +0 -1
  47. package/src/components/manage/Blocks/DataConnectedEmbedBlock/index.js +0 -2
  48. package/src/components/manage/Blocks/ECDEIndicators/ECDEIndicatorsView.jsx +1 -1
  49. package/src/components/manage/Blocks/FilterAceContent/FilterAceContentEdit.jsx +3 -3
  50. package/src/components/manage/Blocks/FilterAceContent/FilterAceContentView.jsx +2 -2
  51. package/src/components/manage/Blocks/FilterAceContent/FilterAceContentView.test.jsx +1 -1
  52. package/src/components/manage/Blocks/FlourishEmbedBlock/FlourishEmbedBlockEdit.jsx +1 -1
  53. package/src/components/manage/Blocks/Listing/DropdownListingView.jsx +1 -1
  54. package/src/components/manage/Blocks/Listing/EventAccordionListingView.jsx +1 -1
  55. package/src/components/manage/Blocks/Listing/EventAccordionListingView.test.jsx +5 -3
  56. package/src/components/manage/Blocks/Listing/EventCardsListingView.jsx +2 -1
  57. package/src/components/manage/Blocks/Listing/EventCardsListingView.test.jsx +10 -4
  58. package/src/components/manage/Blocks/Listing/IndicatorCardsListingView.jsx +2 -2
  59. package/src/components/manage/Blocks/Listing/OrganisationCardsListingView.jsx +3 -1
  60. package/src/components/manage/Blocks/Listing/SimpleCardsListingView.jsx +1 -1
  61. package/src/components/manage/Blocks/Listing/SimpleCardsListingView.test.jsx +5 -3
  62. package/src/components/manage/Blocks/Listing/SimpleItemListingView.jsx +2 -2
  63. package/src/components/manage/Blocks/Listing/SimpleItemListingView.test.jsx +6 -4
  64. package/src/components/manage/Blocks/RASTBlock/ContextNavigation.jsx +0 -1
  65. package/src/components/manage/Blocks/RASTBlock/RASTAccordion.jsx +1 -1
  66. package/src/components/manage/Blocks/RASTBlock/RASTAccordion.test.jsx +1 -1
  67. package/src/components/manage/Blocks/RASTBlock/RASTAccordionContent.jsx +2 -2
  68. package/src/components/manage/Blocks/RASTBlock/RASTEdit.jsx +1 -1
  69. package/src/components/manage/Blocks/RASTBlock/RASTMap.jsx +1 -1
  70. package/src/components/manage/Blocks/RASTBlock/RASTMap.test.jsx +1 -1
  71. package/src/components/manage/Blocks/RASTBlock/RASTView.jsx +1 -1
  72. package/src/components/manage/Blocks/ReadMore/ReadMoreEdit.jsx +1 -1
  73. package/src/components/manage/Blocks/ReadMore/ReadMoreView.jsx +1 -1
  74. package/src/components/manage/Blocks/ReadMore/ReadMoreView.test.jsx +1 -1
  75. package/src/components/manage/Blocks/RedirectBlock/{RedirectBlock.test.js → RedirectBlock.test.jsx} +1 -1
  76. package/src/components/manage/Blocks/RedirectBlock/RedirectBlockEdit.jsx +2 -1
  77. package/src/components/manage/Blocks/RedirectBlock/RedirectBlockView.jsx +2 -2
  78. package/src/components/manage/Blocks/RelevantAceContent/RelevantAceContentEdit.jsx +1 -1
  79. package/src/components/manage/Blocks/RelevantAceContent/RelevantAceContentView.jsx +1 -1
  80. package/src/components/manage/Blocks/RelevantAceContent/RelevantAceContentView.test.jsx +1 -1
  81. package/src/components/manage/Blocks/SearchAceContent/SearchAceContentEdit.jsx +1 -1
  82. package/src/components/manage/Blocks/SearchAceContent/SearchAceContentView.jsx +1 -1
  83. package/src/components/manage/Blocks/SearchAceContent/SearchAceContentView.test.jsx +1 -1
  84. package/src/components/manage/Blocks/TabsBlock/Spotlight.jsx +2 -2
  85. package/src/components/manage/Blocks/TabsBlock/Spotlight.test.jsx +7 -1
  86. package/src/components/manage/Blocks/TransRegionSelect/TransRegionSelectEdit.jsx +1 -1
  87. package/src/components/manage/Blocks/TransRegionSelect/TransRegionSelectView.jsx +1 -1
  88. package/src/components/manage/Blocks/TransRegionSelect/TransRegionSelectView.test.jsx +1 -1
  89. package/src/components/manage/CreateArchivedCopyButton/CreateArchivedCopyButton.jsx +5 -2
  90. package/src/components/manage/CreateArchivedCopyButton/CreateArchivedCopyButton.test.jsx +3 -6
  91. package/src/components/manage/Workflow/WorkflowLinkIntegrityModal.jsx +1 -1
  92. package/src/components/manage/Workflow/WorkflowLinkIntegrityModal.test.jsx +1 -1
  93. package/src/components/theme/ASTNavigation/ASTAccordion.test.jsx +1 -1
  94. package/src/components/theme/ASTNavigation/ASTLogoMap.jsx +1 -1
  95. package/src/components/theme/ASTNavigation/ASTLogoMap.test.jsx +1 -1
  96. package/src/components/theme/ASTNavigation/ASTNavigation.jsx +9 -5
  97. package/src/components/theme/ASTNavigation/ASTNavigation.test.jsx +323 -0
  98. package/src/components/theme/ASTNavigation/{utils.js → LinkWrap.jsx} +4 -9
  99. package/src/components/theme/ASTNavigation/UASTLogoMap.jsx +1 -1
  100. package/src/components/theme/ASTNavigation/UASTLogoMap.test.jsx +1 -1
  101. package/src/components/theme/Header/Header.jsx +5 -5
  102. package/src/components/theme/Header/LanguageSwitch.jsx +5 -5
  103. package/src/components/theme/MissionSignatoryProfile/MissionSignatoryProfileView.jsx +1 -1
  104. package/src/components/theme/TranslationDisclaimer/TranslationDisclaimer.jsx +1 -1
  105. package/src/components/theme/TranslationDisclaimer/TranslationInfo.jsx +1 -1
  106. package/src/components/theme/Views/AdaptationOptionView.jsx +1 -1
  107. package/src/components/theme/Views/AdaptationOptionView.test.jsx +5 -3
  108. package/src/components/theme/Views/ArchivedVersionListing.jsx +1 -1
  109. package/src/components/theme/Views/ArchivedVersionListing.test.jsx +2 -2
  110. package/src/components/theme/Views/ArchivedVersionNotice.jsx +1 -1
  111. package/src/components/theme/Views/ArchivedVersionNotice.test.jsx +1 -1
  112. package/src/components/theme/Views/BrokenLinks.jsx +1 -1
  113. package/src/components/theme/Views/BrokenLinks.test.jsx +1 -1
  114. package/src/components/theme/Views/CaseStudyView.test.jsx +1 -1
  115. package/src/components/theme/Views/DatabaseItemView.test.jsx +1 -1
  116. package/src/components/theme/Views/NewsItemView.jsx +1 -1
  117. package/src/components/theme/Views/ProjectView.test.jsx +1 -1
  118. package/src/components/theme/Views/VersionsGroup.jsx +1 -1
  119. package/src/components/theme/Views/VersionsGroup.test.jsx +1 -1
  120. package/src/components/theme/Widgets/GeocharsWidget.jsx +1 -1
  121. package/src/components/theme/Widgets/GeolocationWidget.jsx +1 -1
  122. package/src/components/theme/Widgets/GeolocationWidget.test.jsx +1 -1
  123. package/src/components/theme/Widgets/ImageWidget.jsx +7 -8
  124. package/src/components/theme/Widgets/ImageWidget.test.jsx +1 -1
  125. package/src/components/theme/Widgets/PromotionalImageWidget.jsx +6 -4
  126. package/src/components/theme/Widgets/utils.js +1 -1
  127. package/src/constants.js +538 -2
  128. package/src/customizations/@eeacms/volto-eea-design-system/ui/Header/Header.jsx +1 -1
  129. package/src/customizations/@eeacms/volto-eea-design-system/ui/Header/HeaderMenuPopUp.js +52 -24
  130. package/src/customizations/@eeacms/volto-eea-design-system/ui/Header/HeaderSearchPopUp.js +1 -0
  131. package/src/customizations/@eeacms/volto-eea-website-theme/components/theme/DraftBackground/DraftBackground.jsx +2 -1
  132. package/src/customizations/@eeacms/volto-listing-block/blocks/Listing/item-templates/SimpleItemTemplates.jsx +2 -2
  133. package/src/customizations/@eeacms/volto-listing-block/components/UniversalCard/fragments/CardTitle.jsx +1 -1
  134. package/src/customizations/@plone/volto-slate/blocks/Table/TableBlockView.jsx +3 -3
  135. package/src/customizations/@plone/volto-slate/blocks/Text/{index.js → index.jsx} +2 -21
  136. package/src/customizations/@plone/volto-slate/editor/extensions/normalizeNode.js +1 -1
  137. package/src/customizations/@plone/volto-slate/utils/blocks.js +11 -8
  138. package/src/customizations/@plone/volto-slate/utils/volto-blocks.js +2 -2
  139. package/src/customizations/@plone/volto-slate/widgets/HtmlSlateWidget.jsx +2 -2
  140. package/src/customizations/@plone-collective/volto-authomatic/components/Login/Login.jsx +7 -4
  141. package/src/customizations/@plone-collective/volto-rss-provider/components/RSSFeedView.jsx +5 -8
  142. package/src/customizations/@plone-collective/volto-rss-provider/express-middleware.js +2 -1
  143. package/src/customizations/volto/components/manage/AnchorPlugin/components/LinkButton/AddLinkForm.jsx +3 -3
  144. package/src/customizations/volto/components/manage/Blocks/Grid/templates.js +1 -1
  145. package/src/customizations/volto/components/manage/Contents/ContentsBreadcrumbs.jsx +1 -1
  146. package/src/customizations/volto/components/manage/Controlpanels/ContentTypeLayout.jsx +12 -14
  147. package/src/customizations/volto/components/manage/Display/Display.jsx +10 -5
  148. package/src/customizations/volto/components/manage/Multilingual/TranslationObject.jsx +7 -6
  149. package/src/customizations/volto/components/manage/Widgets/ObjectBrowserWidget.jsx +4 -1
  150. package/src/customizations/volto/components/manage/Workflow/Workflow.jsx +12 -8
  151. package/src/customizations/volto/components/theme/App/App.jsx +16 -23
  152. package/src/customizations/volto/components/theme/Sitemap/Sitemap.jsx +3 -2
  153. package/src/customizations/volto/components/theme/View/DefaultView.jsx +5 -4
  154. package/src/customizations/volto/components/theme/View/LinkView.jsx +2 -2
  155. package/src/customizations/volto/components/theme/View/View.jsx +10 -11
  156. package/src/customizations/volto/helpers/Url/Url-old.js +2 -1
  157. package/src/customizations/volto/middleware/api.js +6 -4
  158. package/src/customizations/volto/reducers/actions/actions.js +2 -5
  159. package/src/customizations/volto/reducers/breadcrumbs/breadcrumbs.js +3 -6
  160. package/src/customizations/volto/reducers/navigation/navigation.js +3 -6
  161. package/src/customizations/volto/server.jsx +9 -8
  162. package/src/express-middleware.js +1 -1
  163. package/src/helpers/ContentMetadata.jsx +4 -4
  164. package/src/helpers/Utils.jsx +5 -5
  165. package/src/helpers/index.js +1 -8
  166. package/src/hocs/index.js +2 -0
  167. package/src/index.js +9 -7
  168. package/src/search/common.js +4 -41
  169. package/src/search/utils.test.js +1 -1
  170. package/src/search/vocabulary.js +2 -2
  171. package/src/store/reducers/physical-breadcrumbs.js +2 -2
  172. package/src/utils.js +1 -1
  173. package/src/helpers/Constants.jsx +0 -535
  174. package/theme/assets/images/administrative_support_service.png +0 -0
  175. /package/src/components/manage/Blocks/CaseStudyExplorer/{CaseStudyExplorerEdit.js → CaseStudyExplorerEdit.jsx} +0 -0
  176. /package/src/components/manage/Blocks/CountryMapHeatIndex/{Edit.js → Edit.jsx} +0 -0
  177. /package/src/components/manage/Blocks/CountryMapProfile/{Edit.js → Edit.jsx} +0 -0
  178. /package/src/components/manage/Blocks/CountryProfileDetail/{Edit.js → Edit.jsx} +0 -0
  179. /package/src/components/manage/Blocks/ReadMore/{schema.js → schema.jsx} +0 -0
  180. /package/src/helpers/{clientOnly.js → clientOnly.jsx} +0 -0
  181. /package/src/{components/manage/Blocks/withResponsiveContainer.js → hocs/withResponsiveContainer.jsx} +0 -0
  182. /package/src/{components/manage/Blocks → hocs}/withVisibilitySensor.jsx +0 -0
package/.eslintrc.js CHANGED
@@ -16,16 +16,16 @@ if (configFile) {
16
16
  voltoPath = `./${jsConfig.baseUrl}/${pathsConfig['@plone/volto'][0]}`;
17
17
  }
18
18
 
19
- const AddonConfigurationRegistry = require(`${voltoPath}/addon-registry.js`);
20
- const reg = new AddonConfigurationRegistry(projectRootPath);
19
+ const { AddonRegistry } = require('@plone/registry/addon-registry');
20
+ const { registry } = AddonRegistry.init(projectRootPath);
21
21
 
22
22
  // Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
23
- const addonAliases = Object.keys(reg.packages).map((o) => [
23
+ const addonAliases = Object.keys(registry.packages).map((o) => [
24
24
  o,
25
- reg.packages[o].modulePath,
25
+ registry.packages[o].modulePath,
26
26
  ]);
27
27
 
28
- const addonExtenders = reg.getEslintExtenders().map((m) => require(m));
28
+ const addonExtenders = registry.getEslintExtenders().map((m) => require(m));
29
29
 
30
30
  const defaultConfig = {
31
31
  extends: `${voltoPath}/.eslintrc`,
@@ -34,7 +34,7 @@ const defaultConfig = {
34
34
  alias: {
35
35
  map: [
36
36
  ['@plone/volto', '@plone/volto/src'],
37
- ['@plone/volto-slate', '@plone/volto/packages/volto-slate/src'],
37
+ ['@plone/volto-slate', '@plone/volto-slate/src'],
38
38
  ...addonAliases,
39
39
  ['@package', `${__dirname}/src`],
40
40
  ['@root', `${__dirname}/src`],
@@ -54,7 +54,7 @@ const defaultConfig = {
54
54
  allowReferrer: true,
55
55
  },
56
56
  ],
57
- }
57
+ },
58
58
  };
59
59
 
60
60
  const config = addonExtenders.reduce(
package/CHANGELOG.md CHANGED
@@ -4,8 +4,15 @@ 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
- ### [0.3.129](https://github.com/eea/volto-cca-policy/compare/1.0.0-alpha.4...0.3.129) - 8 June 2026
7
+ ### [1.0.0](https://github.com/eea/volto-cca-policy/compare/1.0.0-alpha.4...1.0.0) - 12 June 2026
8
8
 
9
+ #### :nail_care: Enhancements
10
+
11
+ - refactor: remove deprecated Volto 17 stages from Jenkinsfile [kreafox - [`5297ddf`](https://github.com/eea/volto-cca-policy/commit/5297ddf10604963c08554080aee636c642b08f82)]
12
+
13
+ #### :hammer_and_wrench: Others
14
+
15
+ - test: increase code coverage for View component & improve rendering logic [kreafox - [`9b946a3`](https://github.com/eea/volto-cca-policy/commit/9b946a3eb36b0c3161c01733823a22cf8437e40e)]
9
16
  ### [1.0.0-alpha.4](https://github.com/eea/volto-cca-policy/compare/1.0.0-alpha.3...1.0.0-alpha.4) - 8 June 2026
10
17
 
11
18
  #### :rocket: Dependency updates
@@ -89,7 +96,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
89
96
  - Refs #296263 - styles and messages [iugin - [`359f2fc`](https://github.com/eea/volto-cca-policy/commit/359f2fcd207a6e58bc9e32d514ca23183ea6ca8e)]
90
97
  - Refs #296263 - jenkins update [iugin - [`b424df5`](https://github.com/eea/volto-cca-policy/commit/b424df51271e975a9721e4c0712c3009b68e53fa)]
91
98
  - Refs #296263 - init [iugin - [`01bff47`](https://github.com/eea/volto-cca-policy/commit/01bff4757de9d2b01b9476f19b61715a7983999b)]
92
- ### [1.0.0-alpha.1](https://github.com/eea/volto-cca-policy/compare/0.3.128...1.0.0-alpha.1) - 20 May 2026
99
+ ### [1.0.0-alpha.1](https://github.com/eea/volto-cca-policy/compare/0.3.131...1.0.0-alpha.1) - 20 May 2026
93
100
 
94
101
  #### :rocket: New Features
95
102
 
@@ -136,6 +143,16 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
136
143
  - test: update snapshots [kreafox - [`420d51d`](https://github.com/eea/volto-cca-policy/commit/420d51d1e88323db7295752dc1a184888d3d504e)]
137
144
  - test: mock withScrollToTarget in Spotlight.test.jsx [kreafox - [`5fe54fb`](https://github.com/eea/volto-cca-policy/commit/5fe54fb44960bacc9ff0fe1d91bbbeec2bc58e83)]
138
145
  - update language import path [iugin - [`1217dcc`](https://github.com/eea/volto-cca-policy/commit/1217dcc9e6aa3971bf30c07bb93203cb73949c23)]
146
+ ### [0.3.131](https://github.com/eea/volto-cca-policy/compare/0.3.130...0.3.131) - 8 June 2026
147
+
148
+ ### [0.3.130](https://github.com/eea/volto-cca-policy/compare/0.3.129...0.3.130) - 8 June 2026
149
+
150
+ ### [0.3.129](https://github.com/eea/volto-cca-policy/compare/0.3.128...0.3.129) - 8 June 2026
151
+
152
+ #### :house: Internal changes
153
+
154
+ - style: enhance tab block layout for call-to-action links [kreafox - [`e2bbe40`](https://github.com/eea/volto-cca-policy/commit/e2bbe40f62d243a7978d927580a50a4de05d1fb4)]
155
+
139
156
  ### [0.3.128](https://github.com/eea/volto-cca-policy/compare/0.3.127...0.3.128) - 3 June 2026
140
157
 
141
158
  #### :rocket: Dependency updates
@@ -528,7 +545,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
528
545
 
529
546
  #### :house: Internal changes
530
547
 
531
- - chore: [JENKINSFILE] add package version in sonarqube [valentinab25 - [`e901251`](https://github.com/eea/volto-cca-policy/commit/e901251592eb54609fbc7eb8fcf7bd452c2da9cd)]
532
548
 
533
549
  ### [0.3.102](https://github.com/eea/volto-cca-policy/compare/0.3.101...0.3.102) - 24 February 2026
534
550
 
@@ -538,7 +554,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
538
554
 
539
555
  #### :house: Internal changes
540
556
 
541
- - chore: [JENKINSFILE] use sonarqube branches [EEA Jenkins - [`8b3699a`](https://github.com/eea/volto-cca-policy/commit/8b3699a6cbaef662b5e80884ac2c1f7dc9c6591e)]
542
557
 
543
558
  ### [0.3.101](https://github.com/eea/volto-cca-policy/compare/0.3.100...0.3.101) - 28 January 2026
544
559
 
@@ -826,7 +841,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
826
841
  - style: fix item spacing [kreafox - [`7d4535d`](https://github.com/eea/volto-cca-policy/commit/7d4535dbc486e6cb80fc55d6ac8c7c01d9cf48af)]
827
842
  - chore: code cleanup [kreafox - [`842419b`](https://github.com/eea/volto-cca-policy/commit/842419b1bce3dc624755c81c9dea672198cab9e2)]
828
843
  - style: update teaser block styling [kreafox - [`1e0cad8`](https://github.com/eea/volto-cca-policy/commit/1e0cad8e1ed3ae827ee868dce8ad50b292a937ba)]
829
- - chore: update Makefile, run yarn i18n [kreafox - [`61e6962`](https://github.com/eea/volto-cca-policy/commit/61e6962901068ae6512265417a730bd9befd65fe)]
830
844
  - chore: move styling to theme folder [kreafox - [`8cf6a1b`](https://github.com/eea/volto-cca-policy/commit/8cf6a1b8b14abf472a9c61b28db574f6d9e0bd3b)]
831
845
  - chore: remove ArrayWidget customization [kreafox - [`249bf93`](https://github.com/eea/volto-cca-policy/commit/249bf93054f7726c3d57a8b8ca01b75cd0d30522)]
832
846
  - chore: remove Footer customization [kreafox - [`7038af3`](https://github.com/eea/volto-cca-policy/commit/7038af37d48a328dfc31746f3fa84973e2f840ab)]
@@ -3589,13 +3603,10 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
3589
3603
  - Refs #260715 rast-block wip [Tripon Eugen - [`f19d54e`](https://github.com/eea/volto-cca-policy/commit/f19d54e0b9a6a86bf344eb85b6a1cda7f3de91bf)]
3590
3604
  - Refs #260715 rast-block wip [Tripon Eugen - [`2828537`](https://github.com/eea/volto-cca-policy/commit/2828537b6c084cd1a82162d552fb4ef025b71f9f)]
3591
3605
  - Refs #260715 rast-block updates [Tripon Eugen - [`1e803e5`](https://github.com/eea/volto-cca-policy/commit/1e803e5bd3d3fb7558f261c76c68866be7beb8b5)]
3592
- - test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`0a15e1b`](https://github.com/eea/volto-cca-policy/commit/0a15e1b2ad081233685e80d5b3c60a8663f6b896)]
3593
- - test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`9554e44`](https://github.com/eea/volto-cca-policy/commit/9554e44c92a621a52b2adb5a4830fb084ee5734b)]
3594
3606
  ### [0.1.49](https://github.com/eea/volto-cca-policy/compare/0.1.48...0.1.49) - 15 November 2023
3595
3607
 
3596
3608
  #### :house: Internal changes
3597
3609
 
3598
- - chore: [JENKINS] Refactor automated testing [valentinab25 - [`7b820a6`](https://github.com/eea/volto-cca-policy/commit/7b820a6369c2ddd5203b1a4abe352cb4bb43db7a)]
3599
3610
  - chore: husky, lint-staged use fixed versions [valentinab25 - [`f0a8061`](https://github.com/eea/volto-cca-policy/commit/f0a8061c275c236deb00087c23fac9860a073106)]
3600
3611
 
3601
3612
  #### :hammer_and_wrench: Others
@@ -3612,9 +3623,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
3612
3623
  - Refs #259267 - jenkins test [Tripon Eugen - [`cacd31e`](https://github.com/eea/volto-cca-policy/commit/cacd31e7b1afe0983674ed5c7632d2e1d7fa752e)]
3613
3624
  - Refs #259267 - jenkins [Tripon Eugen - [`5b3affe`](https://github.com/eea/volto-cca-policy/commit/5b3affee8401239de10097884c1b7f2349d15ec0)]
3614
3625
  - Refs #259267 - add When, lead image and title to files [Tripon Eugen - [`2cedb23`](https://github.com/eea/volto-cca-policy/commit/2cedb237f898af9057e13fba94b615ef71077204)]
3615
- - test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`4d607a5`](https://github.com/eea/volto-cca-policy/commit/4d607a576e9d0a5c34e48c41b409e7df616ee3d6)]
3616
- - test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`b7f74d5`](https://github.com/eea/volto-cca-policy/commit/b7f74d53513a6edbfbca5cb6d19687929bb1e5db)]
3617
- - test: [JENKINS] Improve cypress time [valentinab25 - [`db65617`](https://github.com/eea/volto-cca-policy/commit/db656173391f65157098d95d388c25f6429753d8)]
3618
3626
  - Refs #259267 - cca event blocks attachments and check not mandatoty fields [Tripon Eugen - [`3138e5a`](https://github.com/eea/volto-cca-policy/commit/3138e5afb5bfbdbed14e27ed457b16867b7fa414)]
3619
3627
  - Refs #256681 - Fix error in CCA Event view menu. ([React Intl] An id must be provided to format a message.) [GhitaB - [`517eeb8`](https://github.com/eea/volto-cca-policy/commit/517eeb817264a47bbfd6b9b7d22aaf22d44ed224)]
3620
3628
  - Refs #161485 - Fix ECDE name conflict. [GhitaB - [`8bfd99f`](https://github.com/eea/volto-cca-policy/commit/8bfd99ff68bb82a04d1c0ed625fa514fcf46289e)]
@@ -3831,7 +3839,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
3831
3839
 
3832
3840
  #### :house: Internal changes
3833
3841
 
3834
- - chore: [JENKINS] Remove alpha testing version [valentinab25 - [`ad1ced0`](https://github.com/eea/volto-cca-policy/commit/ad1ced0971ba116c13a3b5fcc039172cc915c919)]
3835
3842
 
3836
3843
  #### :hammer_and_wrench: Others
3837
3844
 
@@ -4312,7 +4319,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
4312
4319
  #### :hammer_and_wrench: Others
4313
4320
 
4314
4321
  - Refs #158294 - Update supported languages list. [GhitaB - [`0a4f91f`](https://github.com/eea/volto-cca-policy/commit/0a4f91f39b7edc367bd4c127d6a8f273c7788361)]
4315
- - Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`8f1f9ce`](https://github.com/eea/volto-cca-policy/commit/8f1f9ce6c22805670cc0800d3c779b6d619d0f31)]
4316
4322
  ### [0.1.1](https://github.com/eea/volto-cca-policy/compare/0.1.0...0.1.1) - 13 December 2022
4317
4323
 
4318
4324
  #### :hammer_and_wrench: Others
@@ -1,32 +1,32 @@
1
- version: "3"
1
+ version: '3'
2
2
  services:
3
3
  backend:
4
4
  image: eeacms/plone-backend
5
5
  ports:
6
- - "8080:8080"
6
+ - '8080:8080'
7
7
  environment:
8
- SITE: "Plone"
9
- PROFILES: "eea.kitkat:testing"
8
+ SITE: 'Plone'
9
+ PROFILES: 'eea.kitkat:testing'
10
10
 
11
- frontend:
11
+ frontend:
12
12
  build:
13
13
  context: ./
14
14
  dockerfile: ./Dockerfile
15
15
  args:
16
- ADDON_NAME: "${ADDON_NAME}"
17
- ADDON_PATH: "${ADDON_PATH}"
18
- VOLTO_VERSION: ${VOLTO_VERSION:-16}
16
+ ADDON_NAME: '${ADDON_NAME}'
17
+ ADDON_PATH: '${ADDON_PATH}'
18
+ VOLTO_VERSION: ${VOLTO_VERSION:-18-yarn}
19
19
  ports:
20
- - "3000:3000"
21
- - "3001:3001"
20
+ - '3000:3000'
21
+ - '3001:3001'
22
22
  depends_on:
23
23
  - backend
24
24
  volumes:
25
25
  - ./:/app/src/addons/${ADDON_PATH}
26
26
  environment:
27
- CI: "true"
28
- NODE_ENV: "development"
29
- RAZZLE_JEST_CONFIG: "src/addons/${ADDON_PATH}/jest-addon.config.js"
30
- RAZZLE_INTERNAL_API_PATH: "http://backend:8080/Plone"
31
- RAZZLE_DEV_PROXY_API_PATH: "http://backend:8080/Plone"
32
- HOST: "0.0.0.0"
27
+ CI: 'true'
28
+ NODE_ENV: 'development'
29
+ RAZZLE_JEST_CONFIG: 'src/addons/${ADDON_PATH}/jest-addon.config.js'
30
+ RAZZLE_INTERNAL_API_PATH: 'http://backend:8080/Plone'
31
+ RAZZLE_DEV_PROXY_API_PATH: 'http://backend:8080/Plone'
32
+ HOST: '0.0.0.0'
@@ -1,418 +1,35 @@
1
- /**
2
- * Generic Jest configuration for Volto addons
3
- *
4
- * This configuration automatically:
5
- * - Detects the addon name from the config file path
6
- * - Configures test coverage to focus on the specific test path
7
- * - Handles different ways of specifying test paths:
8
- * - Full paths like src/addons/addon-name/src/components
9
- * - Just filenames like Component.test.jsx
10
- * - Just directory names like components
11
- *
12
- * Usage:
13
- * RAZZLE_JEST_CONFIG=src/addons/addon-name/jest-addon.config.js CI=true yarn test [test-path] --collectCoverage
14
- */
15
-
16
1
  require('dotenv').config({ path: __dirname + '/.env' });
17
2
 
18
- const path = require('path');
19
3
  const fs = require('fs');
20
- const fg = require('fast-glob');
21
-
22
- // Get the addon name from the current file path
23
- const pathParts = __filename.split(path.sep);
24
- const addonsIdx = pathParts.lastIndexOf('addons');
25
- const addonName =
26
- addonsIdx !== -1 && addonsIdx < pathParts.length - 1
27
- ? pathParts[addonsIdx + 1]
28
- : 'volto-listing-block'; // Fallback addon name
29
- const addonBasePath = `src/addons/${addonName}/src`;
30
-
31
- // --- Performance caches ---
32
- const fileSearchCache = new Map();
33
- const dirSearchCache = new Map();
34
- const dirListingCache = new Map();
35
- const statCache = new Map();
36
- const implementationCache = new Map();
37
-
38
- /**
39
- * Cached fs.statSync wrapper to avoid redundant filesystem calls
40
- * @param {string} p
41
- * @returns {fs.Stats|null}
42
- */
43
- const getStatSync = (p) => {
44
- if (statCache.has(p)) return statCache.get(p);
45
- try {
46
- const s = fs.statSync(p);
47
- statCache.set(p, s);
48
- return s;
49
- } catch {
50
- statCache.set(p, null);
51
- return null;
52
- }
53
- };
54
-
55
- /**
56
- * Find files that match a specific pattern using fast-glob
57
- * @param {string} baseDir - The base directory to search in
58
- * @param {string} fileName - The name of the file to find
59
- * @param {string} [pathPattern=''] - Optional path pattern to filter results
60
- * @returns {string[]} - Array of matching file paths
61
- */
62
- const findFilesWithPattern = (baseDir, fileName, pathPattern = '') => {
63
- const cacheKey = `${baseDir}|${fileName}|${pathPattern}`;
64
- if (fileSearchCache.has(cacheKey)) {
65
- return fileSearchCache.get(cacheKey);
66
- }
67
-
68
- let files = [];
69
- try {
70
- const patterns = fileName
71
- ? [`${baseDir}/**/${fileName}`]
72
- : [`${baseDir}/**/*.{js,jsx,ts,tsx}`];
73
-
74
- files = fg.sync(patterns, { onlyFiles: true });
75
-
76
- if (pathPattern) {
77
- files = files.filter((file) => file.includes(pathPattern));
78
- }
79
- } catch {
80
- files = [];
81
- }
82
-
83
- fileSearchCache.set(cacheKey, files);
84
- return files;
85
- };
86
-
87
- /**
88
- * Find directories that match a specific pattern using fast-glob
89
- * @param {string} baseDir - The base directory to search in
90
- * @param {string} dirName - The name of the directory to find
91
- * @param {string} [pathPattern=''] - Optional path pattern to filter results
92
- * @returns {string[]} - Array of matching directory paths
93
- */
94
- const findDirsWithPattern = (baseDir, dirName, pathPattern = '') => {
95
- const cacheKey = `${baseDir}|${dirName}|${pathPattern}`;
96
- if (dirSearchCache.has(cacheKey)) {
97
- return dirSearchCache.get(cacheKey);
98
- }
99
-
100
- let dirs = [];
101
- try {
102
- const patterns = dirName
103
- ? [`${baseDir}/**/${dirName}`]
104
- : [`${baseDir}/**/`];
105
-
106
- dirs = fg.sync(patterns, { onlyDirectories: true });
107
-
108
- if (pathPattern) {
109
- dirs = dirs.filter((dir) => dir.includes(pathPattern));
110
- }
111
- } catch {
112
- dirs = [];
113
- }
114
-
115
- dirSearchCache.set(cacheKey, dirs);
116
- return dirs;
117
- };
118
-
119
- /**
120
- * Find files or directories in the addon using fast-glob
121
- * @param {string} name - The name to search for
122
- * @param {string} type - The type of item to find ('f' for files, 'd' for directories)
123
- * @param {string} [additionalOptions=''] - Additional options for flexible path matching
124
- * @returns {string|null} - The path of the found item or null if not found
125
- */
126
- const findInAddon = (name, type, additionalOptions = '') => {
127
- const isFile = type === 'f';
128
- const isDirectory = type === 'd';
129
- const isFlexiblePathMatch = additionalOptions.includes('-path');
130
-
131
- let pathPattern = '';
132
- if (isFlexiblePathMatch) {
133
- const match = additionalOptions.match(/-path "([^"]+)"/);
134
- if (match && match[1]) {
135
- pathPattern = match[1].replace(/\*/g, '');
136
- }
137
- }
138
-
139
- try {
140
- let results = [];
141
- if (isFile) {
142
- results = findFilesWithPattern(addonBasePath, name, pathPattern);
143
- } else if (isDirectory) {
144
- results = findDirsWithPattern(addonBasePath, name, pathPattern);
145
- }
146
- return results.length > 0 ? results[0] : null;
147
- } catch (error) {
148
- return null;
149
- }
150
- };
151
-
152
- /**
153
- * Find the implementation file for a test file
154
- * @param {string} testPath - Path to the test file
155
- * @returns {string|null} - Path to the implementation file or null if not found
156
- */
157
- const findImplementationFile = (testPath) => {
158
- if (implementationCache.has(testPath)) {
159
- return implementationCache.get(testPath);
160
- }
161
-
162
- if (!fs.existsSync(testPath)) {
163
- implementationCache.set(testPath, null);
164
- return null;
165
- }
166
-
167
- const dirPath = path.dirname(testPath);
168
- const fileName = path.basename(testPath);
169
-
170
- // Regex for common test file patterns (e.g., .test.js, .spec.ts)
171
- const TEST_OR_SPEC_FILE_REGEX = /\.(test|spec)\.[jt]sx?$/;
172
-
173
- if (!TEST_OR_SPEC_FILE_REGEX.test(fileName)) {
174
- implementationCache.set(testPath, null);
175
- return null;
176
- }
177
-
178
- const baseFileName = path
179
- .basename(fileName, path.extname(fileName))
180
- .replace(/\.(test|spec)$/, ''); // Remove .test or .spec
181
-
182
- let dirFiles = dirListingCache.get(dirPath);
183
- if (!dirFiles) {
184
- dirFiles = fs.readdirSync(dirPath);
185
- dirListingCache.set(dirPath, dirFiles);
186
- }
187
-
188
- const exactMatch = dirFiles.find((file) => {
189
- const fileBaseName = path.basename(file, path.extname(file));
190
- return (
191
- fileBaseName === baseFileName && !TEST_OR_SPEC_FILE_REGEX.test(file) // Ensure it's not another test/spec file
192
- );
193
- });
194
-
195
- if (exactMatch) {
196
- const result = `${dirPath}/${exactMatch}`;
197
- implementationCache.set(testPath, result);
198
- return result;
199
- }
200
-
201
- const similarMatch = dirFiles.find((file) => {
202
- if (
203
- TEST_OR_SPEC_FILE_REGEX.test(file) ||
204
- (getStatSync(`${dirPath}/${file}`)?.isDirectory() ?? false)
205
- ) {
206
- return false;
207
- }
208
- const fileBaseName = path.basename(file, path.extname(file));
209
- return (
210
- fileBaseName.toLowerCase().includes(baseFileName.toLowerCase()) ||
211
- baseFileName.toLowerCase().includes(fileBaseName.toLowerCase())
212
- );
213
- });
214
-
215
- if (similarMatch) {
216
- const result = `${dirPath}/${similarMatch}`;
217
- implementationCache.set(testPath, result);
218
- return result;
219
- }
220
-
221
- implementationCache.set(testPath, null);
222
- return null;
223
- };
224
-
225
- /**
226
- * Get the test path from command line arguments
227
- * @returns {string|null} - The resolved test path or null if not found
228
- */
229
- const getTestPath = () => {
230
- const args = process.argv;
231
- let testPath = null;
232
- const TEST_FILE_REGEX = /\.test\.[jt]sx?$/; // Matches .test.js, .test.jsx, .test.ts, .test.tsx
233
-
234
- testPath = args.find(
235
- (arg) =>
236
- arg.includes(addonName) &&
237
- !arg.startsWith('--') &&
238
- arg !== 'test' &&
239
- arg !== 'node',
240
- );
241
-
242
- if (!testPath) {
243
- const testIndex = args.findIndex((arg) => arg === 'test');
244
- if (testIndex !== -1 && testIndex < args.length - 1) {
245
- const nextArg = args[testIndex + 1];
246
- if (!nextArg.startsWith('--')) {
247
- testPath = nextArg;
248
- }
249
- }
250
- }
251
-
252
- if (!testPath) {
253
- testPath = args.find((arg) => TEST_FILE_REGEX.test(arg));
254
- }
255
-
256
- if (!testPath) {
257
- return null;
258
- }
259
-
260
- if (!testPath.includes(path.sep)) {
261
- if (TEST_FILE_REGEX.test(testPath)) {
262
- const foundTestFile = findInAddon(testPath, 'f');
263
- if (foundTestFile) {
264
- return foundTestFile;
265
- }
266
- } else {
267
- const foundDir = findInAddon(testPath, 'd');
268
- if (foundDir) {
269
- return foundDir;
270
- }
271
- const flexibleDir = findInAddon(testPath, 'd', `-path "*${testPath}*"`);
272
- if (flexibleDir) {
273
- return flexibleDir;
274
- }
275
- }
276
- } else if (
277
- TEST_FILE_REGEX.test(testPath) && // Check if it looks like a test file path
278
- !testPath.startsWith('src/addons/')
279
- ) {
280
- const testFileName = path.basename(testPath);
281
- const foundTestFile = findInAddon(testFileName, 'f');
282
- if (foundTestFile) {
283
- const relativePath = path.dirname(testPath);
284
- if (foundTestFile.includes(relativePath)) {
285
- return foundTestFile;
286
- }
287
- const similarFiles = findFilesWithPattern(
288
- addonBasePath,
289
- testFileName,
290
- relativePath,
291
- );
292
- if (similarFiles && similarFiles.length > 0) {
293
- return similarFiles[0];
294
- }
295
- }
296
- }
297
-
298
- if (
299
- !path
300
- .normalize(testPath)
301
- .startsWith(path.join('src', 'addons', addonName, 'src')) &&
302
- !path.isAbsolute(testPath) // Use path.isAbsolute for robust check
303
- ) {
304
- testPath = path.join(addonBasePath, testPath); // Use path.join for OS-agnostic paths
305
- }
306
-
307
- if (fs.existsSync(testPath)) {
308
- return testPath;
309
- }
310
-
311
- const pathWithoutTrailingSlash = testPath.endsWith(path.sep)
312
- ? testPath.slice(0, -1)
313
- : null;
314
- if (pathWithoutTrailingSlash && fs.existsSync(pathWithoutTrailingSlash)) {
315
- return pathWithoutTrailingSlash;
316
- }
317
-
318
- const pathWithTrailingSlash = !testPath.endsWith(path.sep)
319
- ? testPath + path.sep
320
- : null;
321
- if (pathWithTrailingSlash && fs.existsSync(pathWithTrailingSlash)) {
322
- // Generally, return paths without trailing slashes for consistency,
323
- // unless it's specifically needed for a directory that only exists with it (rare).
324
- return testPath;
325
- }
326
- return testPath; // Return the original path if no variations exist
327
- };
328
-
329
- /**
330
- * Determine collectCoverageFrom patterns based on test path
331
- * @returns {string[]} - Array of coverage patterns
332
- */
333
- const getCoveragePatterns = () => {
334
- const excludePatterns = [
335
- '!src/**/*.d.ts',
336
- '!**/*.test.{js,jsx,ts,tsx}',
337
- '!**/*.spec.{js,jsx,ts,tsx}',
338
- ];
339
-
340
- const defaultPatterns = [
341
- `${addonBasePath}/**/*.{js,jsx,ts,tsx}`,
342
- ...excludePatterns,
343
- ];
344
-
345
- const ANY_SCRIPT_FILE_REGEX = /\.[jt]sx?$/;
346
-
347
- const directoryArg = process.argv.find(
348
- (arg) =>
349
- !arg.includes(path.sep) &&
350
- !arg.startsWith('--') &&
351
- arg !== 'test' &&
352
- arg !== 'node' &&
353
- !ANY_SCRIPT_FILE_REGEX.test(arg) &&
354
- ![
355
- 'yarn',
356
- 'npm',
357
- 'npx',
358
- 'collectCoverage',
359
- 'CI',
360
- 'RAZZLE_JEST_CONFIG',
361
- ].some(
362
- (reserved) =>
363
- arg === reserved || arg.startsWith(reserved.split('=')[0] + '='),
364
- ) &&
365
- process.argv.indexOf(arg) >
366
- process.argv.findIndex((item) => item === 'test'),
367
- );
368
-
369
- if (directoryArg) {
370
- const foundDir = findInAddon(directoryArg, 'd');
371
- if (foundDir) {
372
- return [`${foundDir}/**/*.{js,jsx,ts,tsx}`, ...excludePatterns];
373
- }
374
- }
375
-
376
- let testPath = getTestPath();
377
-
378
- if (!testPath) {
379
- return defaultPatterns;
380
- }
381
-
382
- if (testPath.endsWith(path.sep)) {
383
- testPath = testPath.slice(0, -1);
384
- }
385
-
386
- const stats = getStatSync(testPath);
387
-
388
- if (stats && stats.isFile()) {
389
- const implFile = findImplementationFile(testPath);
390
- if (implFile) {
391
- return [implFile, '!src/**/*.d.ts'];
392
- }
393
- const dirPath = path.dirname(testPath);
394
- return [`${dirPath}/**/*.{js,jsx,ts,tsx}`, ...excludePatterns];
395
- } else if (stats && stats.isDirectory()) {
396
- return [`${testPath}/**/*.{js,jsx,ts,tsx}`, ...excludePatterns];
397
- }
398
-
399
- return defaultPatterns;
400
- };
4
+ const path = require('path');
401
5
 
402
- const coverageConfig = getCoveragePatterns();
6
+ // Volto 18 exposes @plone/volto-slate as a top-level package.
7
+ const voltoSlatePath = fs.existsSync(
8
+ path.join(
9
+ __dirname,
10
+ '..',
11
+ '..',
12
+ '..',
13
+ 'node_modules',
14
+ '@plone',
15
+ 'volto-slate',
16
+ 'src',
17
+ ),
18
+ )
19
+ ? '<rootDir>/node_modules/@plone/volto-slate/src'
20
+ : '<rootDir>/node_modules/@plone/volto/packages/volto-slate/src';
403
21
 
404
22
  module.exports = {
405
23
  testMatch: ['**/src/addons/**/?(*.)+(spec|test).[jt]s?(x)'],
406
- collectCoverageFrom: coverageConfig,
407
- coveragePathIgnorePatterns: [
408
- '/node_modules/',
409
- 'schema\\.[jt]s?$',
410
- 'index\\.[jt]s?$',
411
- 'config\\.[jt]sx?$',
24
+ collectCoverageFrom: [
25
+ 'src/addons/**/src/**/*.{js,jsx,ts,tsx}',
26
+ '!src/**/*.d.ts',
412
27
  ],
413
28
  moduleNameMapper: {
414
29
  '^node:crypto$': '<rootDir>/src/addons/volto-cca-policy/jest-node-crypto-mock.js',
415
30
  '\\.(css|less|scss|sass)$': 'identity-obj-proxy',
31
+ '@plone-collective/volto-authomatic/(.*)$':
32
+ '<rootDir>/node_modules/@plone-collective/volto-authomatic/src/$1',
416
33
  '@plone/volto/cypress': '<rootDir>/node_modules/@plone/volto/cypress',
417
34
  '@plone/volto/babel': '<rootDir>/node_modules/@plone/volto/babel',
418
35
  '@plone/volto/(.*)$': '<rootDir>/node_modules/@plone/volto/src/$1',
@@ -422,16 +39,14 @@ module.exports = {
422
39
  '@eeacms/search/(.*)$': '<rootDir>/src/addons/volto-searchlib/searchlib/$1',
423
40
  '@eeacms/search': '<rootDir>/src/addons/volto-searchlib/searchlib',
424
41
  '@eeacms/(.*?)/(.*)$': '<rootDir>/node_modules/@eeacms/$1/src/$2',
425
- '@plone/volto-slate$':
426
- '<rootDir>/node_modules/@plone/volto/packages/volto-slate/src',
427
- '@plone/volto-slate/(.*)$':
428
- '<rootDir>/node_modules/@plone/volto/packages/volto-slate/src/$1',
42
+ '@plone/volto-slate$': voltoSlatePath,
43
+ '@plone/volto-slate/(.*)$': `${voltoSlatePath}/$1`,
429
44
  '~/(.*)$': '<rootDir>/src/$1',
430
45
  'load-volto-addons':
431
46
  '<rootDir>/node_modules/@plone/volto/jest-addons-loader.js',
432
47
  },
433
48
  transformIgnorePatterns: [
434
- '/node_modules/(?!(@plone|@root|@package|@eeacms)/).*/',
49
+ '/node_modules/(?!(@plone|@root|@package|@eeacms|@plone-collective)/).*/',
435
50
  ],
436
51
  transform: {
437
52
  '^.+\\.js(x)?$': 'babel-jest',
@@ -450,17 +65,7 @@ module.exports = {
450
65
  },
451
66
  ...(process.env.JEST_USE_SETUP === 'ON' && {
452
67
  setupFilesAfterEnv: [
453
- fs.existsSync(
454
- path.join(
455
- __dirname,
456
- 'node_modules',
457
- '@eeacms',
458
- addonName,
459
- 'jest.setup.js',
460
- ),
461
- )
462
- ? `<rootDir>/node_modules/@eeacms/${addonName}/jest.setup.js`
463
- : `<rootDir>/src/addons/${addonName}/jest.setup.js`,
68
+ '<rootDir>/node_modules/@eeacms/volto-eea-website-policy/jest.setup.js',
464
69
  ],
465
70
  }),
466
71
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.3.129",
3
+ "version": "1.0.0",
4
4
  "description": "@eeacms/volto-cca-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",