@eeacms/volto-group-block 4.3.4 → 4.3.7
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,8 +4,27 @@ 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.7](https://github.com/eea/volto-group-block/compare/4.3.6...4.3.7)
|
|
8
|
+
|
|
9
|
+
- fix(countTextInBlocks): Don't count text if maxChars is not set - refs #153110 [`230298a`](https://github.com/eea/volto-group-block/commit/230298a23f9f67d76721b201cafdfd60c8be0f17)
|
|
10
|
+
|
|
11
|
+
#### [4.3.6](https://github.com/eea/volto-group-block/compare/4.3.5...4.3.6)
|
|
12
|
+
|
|
13
|
+
> 30 June 2022
|
|
14
|
+
|
|
15
|
+
- develop [`#20`](https://github.com/eea/volto-group-block/pull/20)
|
|
16
|
+
|
|
17
|
+
#### [4.3.5](https://github.com/eea/volto-group-block/compare/4.3.4...4.3.5)
|
|
18
|
+
|
|
19
|
+
> 4 January 2022
|
|
20
|
+
|
|
21
|
+
- Fix cypress tests when using with volto-slate [`#18`](https://github.com/eea/volto-group-block/pull/18)
|
|
22
|
+
|
|
7
23
|
#### [4.3.4](https://github.com/eea/volto-group-block/compare/4.3.3...4.3.4)
|
|
8
24
|
|
|
25
|
+
> 3 January 2022
|
|
26
|
+
|
|
27
|
+
- Release [`#17`](https://github.com/eea/volto-group-block/pull/17)
|
|
9
28
|
- add cy tests [`#16`](https://github.com/eea/volto-group-block/pull/16)
|
|
10
29
|
|
|
11
30
|
#### [4.3.3](https://github.com/eea/volto-group-block/compare/4.3.2...4.3.3)
|
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 --
|
|
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 '
|
|
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=$
|
|
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
|
}
|
|
@@ -22,16 +22,15 @@ describe('Blocks Tests', () => {
|
|
|
22
22
|
cy.get('.blocks-chooser .title').contains('Common').click();
|
|
23
23
|
cy.get('.content.active.common .button.group').contains('Group').click();
|
|
24
24
|
|
|
25
|
-
cy.get('.block.
|
|
26
|
-
cy.get('.block.
|
|
27
|
-
cy.get('.block.
|
|
28
|
-
|
|
29
|
-
cy.get('.block
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
.trigger('
|
|
33
|
-
.trigger('
|
|
34
|
-
.trigger('mouseup', 10, -40, {force:true});
|
|
25
|
+
cy.get('.block-editor-group [contenteditable=true]').focus().click().type('test{enter}');
|
|
26
|
+
cy.get('.block-editor-group [contenteditable=true]').eq(1).focus().click().type('test2{enter}');
|
|
27
|
+
cy.get('.block-editor-group [contenteditable=true]').eq(1).focus().click().type('test3');
|
|
28
|
+
|
|
29
|
+
cy.get('.block-toolbar svg')
|
|
30
|
+
.first()
|
|
31
|
+
.trigger('mousedown', { button: 0 })
|
|
32
|
+
.trigger('mousemove', 10, -40, { force: true })
|
|
33
|
+
.trigger('mouseup', 10, -40, { force: true });
|
|
35
34
|
|
|
36
35
|
// Save
|
|
37
36
|
cy.get('#toolbar-save').click();
|
package/cypress/support/index.js
CHANGED
package/cypress.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"baseUrl": "http://localhost:3000",
|
|
3
3
|
"viewportWidth": 1280,
|
|
4
|
-
"defaultCommandTimeout":
|
|
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,
|
package/package.json
CHANGED
|
@@ -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
|