@eeacms/volto-clms-theme 1.1.72 → 1.1.74

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.
package/CHANGELOG.md CHANGED
@@ -4,11 +4,25 @@ 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.1.72](https://github.com/eea/volto-clms-theme/compare/1.1.71...1.1.72) - 2 November 2023
7
+ ### [1.1.74](https://github.com/eea/volto-clms-theme/compare/1.1.73...1.1.74) - 6 November 2023
8
+
9
+ #### :rocket: New Features
10
+
11
+ - feat: change the source of navroot title to rely on the newly released p.restapi [Mikel Larreategi - [`3f4f96e`](https://github.com/eea/volto-clms-theme/commit/3f4f96edadad29f4762b1d7a59f0801d63834605)]
12
+ - feat: expand the navroot [Mikel Larreategi - [`3ee730c`](https://github.com/eea/volto-clms-theme/commit/3ee730c88942469688c781068b39bb4971ee4972)]
8
13
 
9
14
  #### :hammer_and_wrench: Others
10
15
 
11
- - ccltabs activeTab condition having children [Ion Lizarazu - [`5fa56ff`](https://github.com/eea/volto-clms-theme/commit/5fa56ff1c140640436425960b7d9d04ac8dc41a1)]
16
+ ### [1.1.73](https://github.com/eea/volto-clms-theme/compare/1.1.72...1.1.73) - 6 November 2023
17
+
18
+ #### :hammer_and_wrench: Others
19
+
20
+ - comment Integration tests [Ion Lizarazu - [`74713f8`](https://github.com/eea/volto-clms-theme/commit/74713f8f78d77ba193d8c27462cc8787d698ab81)]
21
+ - uncomment cypress tests [Ion Lizarazu - [`3526a5c`](https://github.com/eea/volto-clms-theme/commit/3526a5c46481667b0518c6cce0927e67726c6f6c)]
22
+ - use chrome instead of chromium to run cypress tests [Ion Lizarazu - [`6ae3a06`](https://github.com/eea/volto-clms-theme/commit/6ae3a06dbec1914c06a55c0dcb826c49b75f9739)]
23
+ - ccltabs activeTab condition having first child [Ion Lizarazu - [`3cf9376`](https://github.com/eea/volto-clms-theme/commit/3cf9376d55f5f41b7e42c25e5925cd871ec71d81)]
24
+ ### [1.1.72](https://github.com/eea/volto-clms-theme/compare/1.1.71...1.1.72) - 2 November 2023
25
+
12
26
  ### [1.1.71](https://github.com/eea/volto-clms-theme/compare/1.1.70...1.1.71) - 31 October 2023
13
27
 
14
28
  #### :rocket: New Features
@@ -17,7 +31,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
17
31
 
18
32
  #### :house: Internal changes
19
33
 
20
- - chore: [JENKINS] Refactor automated testing [valentinab25 - [`67ca3bb`](https://github.com/eea/volto-clms-theme/commit/67ca3bb111f34842569c12b9c87a2a91bd14b09e)]
21
34
 
22
35
  #### :hammer_and_wrench: Others
23
36
 
@@ -114,7 +127,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
114
127
 
115
128
  - readme [Mikel Larreategi - [`3c0ab05`](https://github.com/eea/volto-clms-theme/commit/3c0ab051981a4efad7712bc46182eed9d79fd10f)]
116
129
  - remove from addons [Mikel Larreategi - [`89c2e7d`](https://github.com/eea/volto-clms-theme/commit/89c2e7d793193e6bb64642f0b06a01cd3c81108a)]
117
- - yarn.lock added after running yarn [Unai - [`ad307be`](https://github.com/eea/volto-clms-theme/commit/ad307be72bbfe753f7571ea4d784a09978e0f7f2)]
118
130
  - prettier issue fix [Unai - [`8bc0650`](https://github.com/eea/volto-clms-theme/commit/8bc0650918f9fa1065d19d2c15ce153a5fc5abbb)]
119
131
  - set a limit of 5 items in the download queue [Mikel Larreategi - [`b81cc83`](https://github.com/eea/volto-clms-theme/commit/b81cc8383165bafbbff52fbeeb365d413051802e)]
120
132
  - adjust logo size [Mikel Larreategi - [`b90a72c`](https://github.com/eea/volto-clms-theme/commit/b90a72c07102025a7e90607b25d34611ddd4f4f6)]
@@ -256,7 +268,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
256
268
 
257
269
  - fix cart items concat function [Ion Lizarazu - [`4b72249`](https://github.com/eea/volto-clms-theme/commit/4b72249ef17a0cda22661809fce5be7c2d1f6649)]
258
270
  - revert Jenkinsfile [Ion Lizarazu - [`64f6cd0`](https://github.com/eea/volto-clms-theme/commit/64f6cd08100357843b507c00d3286d7debe0ef04)]
259
- - yarn.lock file [Ion Lizarazu - [`8444ad1`](https://github.com/eea/volto-clms-theme/commit/8444ad1606b3939e4609bdd186e5ace2252588a8)]
260
271
  - packages.json versions order [Ion Lizarazu - [`4fd7a86`](https://github.com/eea/volto-clms-theme/commit/4fd7a86ab43238841b421e1ed10ebd52ab420a15)]
261
272
  - downloadablefilestablewidget param modification [Ion Lizarazu - [`5dd794a`](https://github.com/eea/volto-clms-theme/commit/5dd794a33a8eddd042a753b7ab47e7d2a323b011)]
262
273
  - add technical_documents_accordion_text field to the dataset view [Ion Lizarazu - [`96ed1e5`](https://github.com/eea/volto-clms-theme/commit/96ed1e5e2c2b501bd303bc76b333a70ad1614c16)]
@@ -381,7 +392,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
381
392
 
382
393
  - remove NUTS text for area naming in the cart [ionlizarazu - [`062e0a3`](https://github.com/eea/volto-clms-theme/commit/062e0a375f5352bc13c18ff7ec33fad4bcc59f2f)]
383
394
  - dependencies [ionlizarazu - [`405ef96`](https://github.com/eea/volto-clms-theme/commit/405ef96090fe7bd4af73a49d3285a92fad712e3b)]
384
- - yarn.lock [ionlizarazu - [`7132119`](https://github.com/eea/volto-clms-theme/commit/71321195c4dd4fceed67f2f0872f3e24bba61c17)]
385
395
  - volto-blocks-grid module mapping [ionlizarazu - [`4fec3ca`](https://github.com/eea/volto-clms-theme/commit/4fec3cabc437322ad92ed90d682250bd123ccaaf)]
386
396
  - volto-blocks-grid v7.0.2 [ionlizarazu - [`2557e60`](https://github.com/eea/volto-clms-theme/commit/2557e6039d3cea33ca0bd11a0a3ef4764c611f78)]
387
397
  - remove styling from teaser block [ionlizarazu - [`879e684`](https://github.com/eea/volto-clms-theme/commit/879e684057c88f52f60f0fa54cbaa155c7d14688)]
@@ -469,7 +479,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
469
479
 
470
480
  #### :house: Internal changes
471
481
 
472
- - chore: [JENKINS] Remove alpha testing version [valentinab25 - [`b4cbf65`](https://github.com/eea/volto-clms-theme/commit/b4cbf6557fbc67f7fc4cea5aa2cb19804f3d7e3c)]
473
482
 
474
483
  #### :hammer_and_wrench: Others
475
484
 
@@ -1668,7 +1677,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1668
1677
  #### :hammer_and_wrench: Others
1669
1678
 
1670
1679
  - related products and datasets added to news and meeting views and login-plone route created [Unai - [`5704a1a`](https://github.com/eea/volto-clms-theme/commit/5704a1a766148746162b60efaf232ea90dc20cf4)]
1671
- - Revert "[JENKINS] Use eeacms/plone-backend and Volto alpha version- Refs #151967" [Mikel Larreategi - [`46eb694`](https://github.com/eea/volto-clms-theme/commit/46eb69415280a3c982405299135027ae4221426a)]
1672
1680
  - sort items according to the lowercased label and put those with special meaning at the end [Mikel Larreategi - [`6410abe`](https://github.com/eea/volto-clms-theme/commit/6410abe096f60dcad54dced2026c9df9b7946d68)]
1673
1681
  - lint fix [Unai - [`1264a7a`](https://github.com/eea/volto-clms-theme/commit/1264a7adfe8d679fea1bd821ad087add20f4271d)]
1674
1682
  - footer newsletter subscription change, global search maxLength change from 8000 to 200 and /login design change [Unai - [`a09d24a`](https://github.com/eea/volto-clms-theme/commit/a09d24adbb6fa053fb2a2cc0071506b906593b42)]
@@ -1819,7 +1827,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1819
1827
  - search block new features [ionlizarazu - [`8e814cb`](https://github.com/eea/volto-clms-theme/commit/8e814cbd359782540c21fe37b37ef146d331f0d6)]
1820
1828
  - language selector cookie management [ionlizarazu - [`1385ac9`](https://github.com/eea/volto-clms-theme/commit/1385ac95795702206d3623ba6e780faa43a89e0a)]
1821
1829
  - toolbar cookie management [ionlizarazu - [`5c23200`](https://github.com/eea/volto-clms-theme/commit/5c23200790b20e1d4f1bc966463c37bf4c808f47)]
1822
- - Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`0316a0d`](https://github.com/eea/volto-clms-theme/commit/0316a0d8b6fb0fa14af13002415f3c95d9f8ede3)]
1823
1830
  ### [1.0.84](https://github.com/eea/volto-clms-theme/compare/1.0.83...1.0.84) - 18 March 2022
1824
1831
 
1825
1832
  #### :hammer_and_wrench: Others
@@ -2724,13 +2731,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
2724
2731
  #### :hammer_and_wrench: Others
2725
2732
 
2726
2733
  - replace @collective/volto-dropdownmenu with volto-dropdownmenu [ionlizarazu - [`07f004f`](https://github.com/eea/volto-clms-theme/commit/07f004fe0219e403fb51bc045c83d34f3b981f76)]
2727
- - yarn.lock [ionlizarazu - [`fe1ca04`](https://github.com/eea/volto-clms-theme/commit/fe1ca04889d29fe7b653db4c69af2751b84b8a1a)]
2728
2734
  - add NODE_ENV parameter [ionlizarazu - [`101f27c`](https://github.com/eea/volto-clms-theme/commit/101f27c25b8fbd192e1b11865e95cf5ffee08c1b)]
2729
2735
  - upgrade volto-dropdownmenu version [ionlizarazu - [`2081855`](https://github.com/eea/volto-clms-theme/commit/2081855301f4c708776e0dbab39db143cee00dbc)]
2730
2736
  - HomeSearch block missing url behaviour [ionlizarazu - [`d20a378`](https://github.com/eea/volto-clms-theme/commit/d20a378ce3f254b8343692348f314bf281974542)]
2731
2737
  - babel configuration [ionlizarazu - [`203ea2d`](https://github.com/eea/volto-clms-theme/commit/203ea2de07f99ca3403e4ca220ca74d7ce69b61d)]
2732
2738
  - prettier [ionlizarazu - [`e79e26b`](https://github.com/eea/volto-clms-theme/commit/e79e26bf2fa40ba7b4eb53a24dabd87928221c28)]
2733
- - add yarn lock [ionlizarazu - [`e1ab28b`](https://github.com/eea/volto-clms-theme/commit/e1ab28b060d5a74431c368b0de82a68dabce1eab)]
2734
2739
  - Jenkinsfile cypress test [ionlizarazu - [`b385d65`](https://github.com/eea/volto-clms-theme/commit/b385d65986f717c60f8c434a08fc11b829d08eb4)]
2735
2740
  - cypress [ionlizarazu - [`a243cf0`](https://github.com/eea/volto-clms-theme/commit/a243cf0182fa3dd113c16ff495c71e310252d83b)]
2736
2741
  - some fixes [ionlizarazu - [`046279b`](https://github.com/eea/volto-clms-theme/commit/046279b9d05bea8a64eca03eed493e02621534c9)]
package/Jenkinsfile CHANGED
@@ -74,7 +74,7 @@ pipeline {
74
74
  stage('Build test image') {
75
75
  steps {
76
76
  checkout scm
77
- sh '''docker build --build-arg="VOLTO_VERSION=$VOLTO" --build-arg="ADDON_NAME=$NAMESPACE/$GIT_NAME" --build-arg="ADDON_PATH=$GIT_NAME" . -t $IMAGE_NAME-frontend'''
77
+ sh '''docker build --pull --build-arg="VOLTO_VERSION=$VOLTO" --build-arg="ADDON_NAME=$NAMESPACE/$GIT_NAME" --build-arg="ADDON_PATH=$GIT_NAME" . -t $IMAGE_NAME-frontend'''
78
78
  }
79
79
  }
80
80
 
@@ -159,12 +159,12 @@ pipeline {
159
159
  // script {
160
160
  // try {
161
161
  // sh '''docker run --pull always --rm -d --name="$IMAGE_NAME-plone" -e SITE="Plone" -e PROFILES="$BACKEND_PROFILES" -e ADDONS="$BACKEND_ADDONS" eeacms/plone-backend'''
162
- // sh '''docker run --link $IMAGE_NAME-plone:plone --entrypoint=make --name="$IMAGE_NAME-cypress" --workdir=/app/src/addons/${GIT_NAME} -e "RAZZLE_INTERNAL_API_PATH=http://plone:8080/Plone" $IMAGE_NAME-frontend cypress-ci'''
162
+ // sh '''timeout -s 9 3600 docker run --shm-size=2g --cpu-quota=150000 --link $IMAGE_NAME-plone:plone --entrypoint=make --name="$IMAGE_NAME-cypress" --workdir=/app/src/addons/${GIT_NAME} -e "RAZZLE_INTERNAL_API_PATH=http://plone:8080/Plone" $IMAGE_NAME-frontend cypress-ci'''
163
163
  // } finally {
164
164
  // try {
165
165
  // sh '''rm -rf cypress-videos cypress-results cypress-coverage cypress-screenshots'''
166
166
  // sh '''mkdir -p cypress-videos cypress-results cypress-coverage cypress-screenshots'''
167
- // sh '''docker cp $IMAGE_NAME-cypress:/app/src/addons/$GIT_NAME/cypress/videos cypress-videos/'''
167
+ // videos = sh script: '''docker cp $IMAGE_NAME-cypress:/app/src/addons/$GIT_NAME/cypress/videos cypress-videos/''', returnStatus: true
168
168
  // sh '''docker cp $IMAGE_NAME-cypress:/app/src/addons/$GIT_NAME/cypress/reports cypress-results/'''
169
169
  // screenshots = sh script: '''docker cp $IMAGE_NAME-cypress:/app/src/addons/$GIT_NAME/cypress/screenshots cypress-screenshots''', returnStatus: true
170
170
 
@@ -181,8 +181,10 @@ pipeline {
181
181
  // reportName: 'CypressCoverage',
182
182
  // reportTitles: 'Integration Tests Code Coverage'])
183
183
  // }
184
- // sh '''for file in $(find cypress-results -name *.xml); do if [ $(grep -E 'failures="[1-9].*"' $file | wc -l) -eq 0 ]; then testname=$(grep -E 'file=.*failures="0"' $file | sed 's#.* file=".*\\/\\(.*\\.[jsxt]\\+\\)" time.*#\\1#' ); rm -f cypress-videos/videos/$testname.mp4; fi; done'''
185
- // archiveArtifacts artifacts: 'cypress-videos/**', fingerprint: true, allowEmptyArchive: true
184
+ // if ( videos == 0 ) {
185
+ // sh '''for file in $(find cypress-results -name *.xml); do if [ $(grep -E 'failures="[1-9].*"' $file | wc -l) -eq 0 ]; then testname=$(grep -E 'file=.*failures="0"' $file | sed 's#.* file=".*\\/\\(.*\\.[jsxt]\\+\\)" time.*#\\1#' ); rm -f cypress-videos/videos/$testname.mp4; fi; done'''
186
+ // archiveArtifacts artifacts: 'cypress-videos/**/*.mp4', fingerprint: true, allowEmptyArchive: true
187
+ // }
186
188
  // } finally {
187
189
  // catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') {
188
190
  // junit testResults: 'cypress-results/**/*.xml', allowEmptyResults: true
@@ -231,8 +233,6 @@ pipeline {
231
233
  withSonarQubeEnv('Sonarqube') {
232
234
  sh '''sed -i "s#/app/src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info'''
233
235
  sh '''sed -i "s#src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info'''
234
- sh '''cat xunit-reports/coverage/lcov.info'''
235
- // sh '''cat cypress-coverage/coverage/lcov.info'''
236
236
  // sh "export PATH=${scannerHome}/bin:${nodeJS}/bin:$PATH; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./xunit-reports/coverage/lcov.info,./cypress-coverage/coverage/lcov.info -Dsonar.sources=./src -Dsonar.projectKey=$GIT_NAME-$BRANCH_NAME -Dsonar.projectVersion=$BRANCH_NAME-$BUILD_NUMBER"
237
237
  sh '''try=5; while [ \$try -gt 0 ]; do curl -s -XPOST -u "${SONAR_AUTH_TOKEN}:" "${SONAR_HOST_URL}api/project_tags/set?project=${GIT_NAME}-${BRANCH_NAME}&tags=${SONARQUBE_TAGS},${BRANCH_NAME}" > set_tags_result; if [ \$(grep -ic error set_tags_result ) -eq 0 ]; then try=0; else cat set_tags_result; echo "... Will retry"; sleep 15; try=\$(( \$try - 1 )); fi; done'''
238
238
  }
package/Makefile CHANGED
@@ -50,7 +50,7 @@ VOLTO_VERSION?=16.24.0
50
50
  ADDON_PATH="${DIR}"
51
51
  ADDON_NAME="@eeacms/${ADDON_PATH}"
52
52
  DOCKER_COMPOSE=PLONE_VERSION=${PLONE_VERSION} VOLTO_VERSION=${VOLTO_VERSION} ADDON_NAME=${ADDON_NAME} ADDON_PATH=${ADDON_PATH} docker compose
53
- RAZZLE_INTERNAL_API_PATH?="${RAZZLE_DEV_PROXY_API_PATH}"
53
+ RAZZLE_INTERNAL_API_PATH?="http://localhost:8080/Plone"
54
54
  RAZZLE_DEV_PROXY_API_PATH?="${RAZZLE_INTERNAL_API_PATH}"
55
55
  CYPRESS_API_PATH="${RAZZLE_DEV_PROXY_API_PATH}"
56
56
 
@@ -86,7 +86,7 @@ cypress-open: ## Open cypress integration tests
86
86
 
87
87
  .PHONY: cypress-run
88
88
  cypress-run: ## Run cypress integration tests
89
- CYPRESS_API_PATH="${RAZZLE_DEV_PROXY_API_PATH}" NODE_ENV=development $(NODE_MODULES)/cypress/bin/cypress run
89
+ CYPRESS_API_PATH="${RAZZLE_DEV_PROXY_API_PATH}" NODE_ENV=development $(NODE_MODULES)/cypress/bin/cypress run --browser chrome
90
90
 
91
91
  .PHONY: test
92
92
  test: ## Run jest tests
package/cypress.config.js CHANGED
@@ -4,7 +4,7 @@ module.exports = defineConfig({
4
4
  viewportWidth: 1280,
5
5
  defaultCommandTimeout: 15000,
6
6
  reporter: 'junit',
7
- video: true,
7
+ video: false,
8
8
  reporterOptions: {
9
9
  mochaFile: 'cypress/reports/cypress-[hash].xml',
10
10
  jenkinsMode: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-clms-theme",
3
- "version": "1.1.72",
3
+ "version": "1.1.74",
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",
@@ -22,9 +22,8 @@ import { slugify } from '../Blocks/utils';
22
22
  const CclTabs = (props) => {
23
23
  let { children, routing = false } = props;
24
24
  let [activeTab, setActiveTab] = useState(
25
- props?.children?.length > 0
26
- ? props.children[0].props.tabId ||
27
- slugify(props.children[0].props.tabTitle)
25
+ children?.length > 0
26
+ ? children[0].props.tabId || slugify(children[0].props.tabTitle)
28
27
  : '',
29
28
  );
30
29
 
@@ -53,7 +52,7 @@ const CclTabs = (props) => {
53
52
  ),
54
53
  );
55
54
  } else {
56
- setActiveTab(slugify(firstTab.props?.tabTitle));
55
+ if (firstTab) setActiveTab(slugify(firstTab.props?.tabTitle));
57
56
  }
58
57
  }
59
58
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -1,5 +1,5 @@
1
1
  export const helmetTitle = (title_tag_content, content) => {
2
- let nav_root_title = content?.['@components']?.navroot?.title;
2
+ let nav_root_title = content?.['@components']?.navroot?.navroot?.title;
3
3
  const result_title =
4
4
  nav_root_title === title_tag_content
5
5
  ? title_tag_content ?? ''
package/src/index.js CHANGED
@@ -186,7 +186,13 @@ const applyConfig = (config) => {
186
186
  ...config.settings.apiExpanders,
187
187
  {
188
188
  match: '',
189
- GET_CONTENT: ['breadcrumbs', 'actions', 'types', 'translations'],
189
+ GET_CONTENT: [
190
+ 'breadcrumbs',
191
+ 'actions',
192
+ 'types',
193
+ 'translations',
194
+ 'navroot',
195
+ ],
190
196
  },
191
197
  {
192
198
  match: '',