@eeacms/volto-group-block 4.3.5 → 4.3.8

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,9 +4,28 @@ 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
+ #### [4.3.8](https://github.com/eea/volto-group-block/compare/4.3.7...4.3.8)
8
+
9
+ - update(jest): add @plone/volto-slate resolver refs- #153447 [`9af40a6`](https://github.com/eea/volto-group-block/commit/9af40a6817e196fdb7415e51ba8b8f395e598302)
10
+
11
+ #### [4.3.7](https://github.com/eea/volto-group-block/compare/4.3.6...4.3.7)
12
+
13
+ > 22 August 2022
14
+
15
+ - fix(countTextInBlocks): Don't count text if maxChars is not set [`#21`](https://github.com/eea/volto-group-block/pull/21)
16
+ - fix(countTextInBlocks): Don't count text if maxChars is not set - refs #153110 [`230298a`](https://github.com/eea/volto-group-block/commit/230298a23f9f67d76721b201cafdfd60c8be0f17)
17
+
18
+ #### [4.3.6](https://github.com/eea/volto-group-block/compare/4.3.5...4.3.6)
19
+
20
+ > 30 June 2022
21
+
22
+ - develop [`#20`](https://github.com/eea/volto-group-block/pull/20)
23
+
7
24
  #### [4.3.5](https://github.com/eea/volto-group-block/compare/4.3.4...4.3.5)
8
25
 
9
- - Fix cypress tests when using with volto-slate [`e7cff69`](https://github.com/eea/volto-group-block/commit/e7cff6968abf73ea73af9dabe17f16a5d710bdf6)
26
+ > 4 January 2022
27
+
28
+ - Fix cypress tests when using with volto-slate [`#18`](https://github.com/eea/volto-group-block/pull/18)
10
29
 
11
30
  #### [4.3.4](https://github.com/eea/volto-group-block/compare/4.3.3...4.3.4)
12
31
 
package/Jenkinsfile CHANGED
@@ -4,8 +4,9 @@ pipeline {
4
4
  environment {
5
5
  GIT_NAME = "volto-group-block"
6
6
  NAMESPACE = "@eeacms"
7
- SONARQUBE_TAGS = "volto.eea.europa.eu,forest.eea.europa.eu,www.eea.europa.eu-ims,climate-energy.eea.europa.eu,sustainability.eionet.europa.eu,biodiversity.europa.eu,clms.land.copernicus.eu,industry.eea.europa.eu,water.europa.eu-freshwater"
7
+ SONARQUBE_TAGS = "volto.eea.europa.eu,forest.eea.europa.eu,www.eea.europa.eu-ims,climate-energy.eea.europa.eu,sustainability.eionet.europa.eu,biodiversity.europa.eu,clms.land.copernicus.eu,industry.eea.europa.eu,water.europa.eu-freshwater,demo-www.eea.europa.eu,clmsdemo.devel6cph.eea.europa.eu,circularity.eea.europa.eu"
8
8
  DEPENDENCIES = ""
9
+ VOLTO = "16.0.0-alpha.14"
9
10
  }
10
11
 
11
12
  stages {
@@ -124,8 +125,8 @@ pipeline {
124
125
  node(label: 'docker') {
125
126
  script {
126
127
  try {
127
- sh '''docker pull plone; docker run -d --rm --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="profile-plone.restapi:blocks" plone fg'''
128
- sh '''docker pull plone/volto-addon-ci; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" plone/volto-addon-ci cypress'''
128
+ sh '''docker pull eeacms/plone-backend; docker run --rm -d --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="eea.kitkat:testing" eeacms/plone-backend'''
129
+ sh '''docker pull plone/volto-addon-ci; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" -e NODE_ENV=development -e VOLTO="$VOLTO" plone/volto-addon-ci cypress'''
129
130
  } finally {
130
131
  try {
131
132
  sh '''rm -rf cypress-reports cypress-results cypress-coverage'''
@@ -184,10 +185,10 @@ pipeline {
184
185
  unstash "xunit-reports"
185
186
  unstash "cypress-coverage"
186
187
  def scannerHome = tool 'SonarQubeScanner';
187
- def nodeJS = tool 'NodeJS11';
188
+ def nodeJS = tool 'NodeJS';
188
189
  withSonarQubeEnv('Sonarqube') {
189
190
  sh '''sed -i "s#/opt/frontend/my-volto-project/src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info'''
190
- sh "export PATH=$PATH:${scannerHome}/bin:${nodeJS}/bin; 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"
191
+ 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"
191
192
  sh '''try=2; 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 60; try=\$(( \$try - 1 )); fi; done'''
192
193
  }
193
194
  }
@@ -27,7 +27,7 @@ coverage-end */
27
27
  export const setupBeforeEach = () => {
28
28
  cy.autologin();
29
29
  cy.createContent({
30
- contentType: 'Folder',
30
+ contentType: 'Document',
31
31
  contentId: 'cypress',
32
32
  contentTitle: 'Cypress',
33
33
  });
package/cypress.json CHANGED
@@ -1,9 +1,14 @@
1
1
  {
2
2
  "baseUrl": "http://localhost:3000",
3
3
  "viewportWidth": 1280,
4
- "defaultCommandTimeout": 15000,
4
+ "defaultCommandTimeout": 8888,
5
+ "chromeWebSecurity": false,
5
6
  "reporter": "junit",
6
7
  "video": true,
8
+ "retries": {
9
+ "runMode": 8,
10
+ "openMode": 0
11
+ },
7
12
  "reporterOptions": {
8
13
  "mochaFile": "cypress/reports/cypress-[hash].xml",
9
14
  "jenkinsMode": true,
@@ -11,7 +11,8 @@ module.exports = {
11
11
  '@package/(.*)$': '<rootDir>/src/$1',
12
12
  '@plone/volto-quanta/(.*)$': '<rootDir>/src/addons/volto-quanta/src/$1',
13
13
  '@eeacms/(.*?)/(.*)$': '<rootDir>/src/addons/$1/src/$2',
14
- 'volto-slate/(.*)$': '<rootDir>/src/addons/volto-slate/src/$1',
14
+ '@plone/volto-slate':
15
+ '<rootDir>/node_modules/@plone/volto/packages/volto-slate/src',
15
16
  '~/(.*)$': '<rootDir>/src/$1',
16
17
  'load-volto-addons':
17
18
  '<rootDir>/node_modules/@plone/volto/jest-addons-loader.js',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-group-block",
3
- "version": "4.3.5",
3
+ "version": "4.3.8",
4
4
  "description": "volto-group-block: Volto block to be used to group other blocks",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -80,6 +80,9 @@ const Edit = (props) => {
80
80
  */
81
81
  const countTextInBlocks = (blocksObject) => {
82
82
  let groupCharCount = 0;
83
+ if (!props.data.maxChars) {
84
+ return groupCharCount;
85
+ }
83
86
 
84
87
  Object.keys(blocksObject).forEach((blockId) => {
85
88
  const foundText = blocksObject[blockId]?.plaintext