@eeacms/volto-group-block 4.3.3 → 4.3.6
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 +19 -1
- package/Jenkinsfile +8 -6
- package/cypress/integration/block-basics.js +13 -3
- package/cypress/support/index.js +1 -1
- package/cypress.json +6 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,9 +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.6](https://github.com/eea/volto-group-block/compare/4.3.5...4.3.6)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
#### [4.3.5](https://github.com/eea/volto-group-block/compare/4.3.4...4.3.5)
|
|
11
|
+
|
|
12
|
+
> 4 January 2022
|
|
13
|
+
|
|
14
|
+
- Fix cypress tests when using with volto-slate [`#18`](https://github.com/eea/volto-group-block/pull/18)
|
|
15
|
+
|
|
16
|
+
#### [4.3.4](https://github.com/eea/volto-group-block/compare/4.3.3...4.3.4)
|
|
17
|
+
|
|
18
|
+
> 3 January 2022
|
|
19
|
+
|
|
20
|
+
- Release [`#17`](https://github.com/eea/volto-group-block/pull/17)
|
|
21
|
+
- add cy tests [`#16`](https://github.com/eea/volto-group-block/pull/16)
|
|
22
|
+
|
|
7
23
|
#### [4.3.3](https://github.com/eea/volto-group-block/compare/4.3.2...4.3.3)
|
|
8
24
|
|
|
9
|
-
|
|
25
|
+
> 18 December 2021
|
|
26
|
+
|
|
27
|
+
- Add SonarQube badges [`#15`](https://github.com/eea/volto-group-block/pull/15)
|
|
10
28
|
|
|
11
29
|
#### [4.3.2](https://github.com/eea/volto-group-block/compare/4.3.1...4.3.2)
|
|
12
30
|
|
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 = "alpha"
|
|
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 --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="
|
|
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'''
|
|
@@ -142,7 +143,8 @@ pipeline {
|
|
|
142
143
|
reportName: 'CypressCoverage',
|
|
143
144
|
reportTitles: 'Integration Tests Code Coverage'])
|
|
144
145
|
}
|
|
145
|
-
|
|
146
|
+
sh '''touch empty_file; for ok_test in $(grep -E 'file=.*failures="0"' $(grep 'testsuites .*failures="0"' $(find cypress-results -name *.xml) empty_file | awk -F: '{print $1}') empty_file | sed 's/.* file="\\(.*\\)" time.*/\\1/' | sed 's#^cypress/integration/##g' | sed 's#^../../../node_modules/@eeacms/##g'); do rm -f cypress-reports/videos/$ok_test.mp4; rm -f cypress-reports/$ok_test.mp4; done'''
|
|
147
|
+
archiveArtifacts artifacts: 'cypress-reports/**/*.mp4', fingerprint: true, allowEmptyArchive: true
|
|
146
148
|
stash name: "cypress-coverage", includes: "cypress-coverage/**", allowEmpty: true
|
|
147
149
|
}
|
|
148
150
|
finally {
|
|
@@ -183,10 +185,10 @@ pipeline {
|
|
|
183
185
|
unstash "xunit-reports"
|
|
184
186
|
unstash "cypress-coverage"
|
|
185
187
|
def scannerHome = tool 'SonarQubeScanner';
|
|
186
|
-
def nodeJS = tool '
|
|
188
|
+
def nodeJS = tool 'NodeJS';
|
|
187
189
|
withSonarQubeEnv('Sonarqube') {
|
|
188
190
|
sh '''sed -i "s#/opt/frontend/my-volto-project/src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info'''
|
|
189
|
-
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"
|
|
190
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'''
|
|
191
193
|
}
|
|
192
194
|
}
|
|
@@ -19,8 +19,18 @@ describe('Blocks Tests', () => {
|
|
|
19
19
|
|
|
20
20
|
// Add block
|
|
21
21
|
cy.get('.ui.basic.icon.button.block-add-button').first().click();
|
|
22
|
-
cy.get('.blocks-chooser .title').contains('
|
|
23
|
-
cy.get('.content.active.
|
|
22
|
+
cy.get('.blocks-chooser .title').contains('Common').click();
|
|
23
|
+
cy.get('.content.active.common .button.group').contains('Group').click();
|
|
24
|
+
|
|
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 });
|
|
24
34
|
|
|
25
35
|
// Save
|
|
26
36
|
cy.get('#toolbar-save').click();
|
|
@@ -28,6 +38,6 @@ describe('Blocks Tests', () => {
|
|
|
28
38
|
|
|
29
39
|
// then the page view should contain our changes
|
|
30
40
|
cy.contains('My Add-on Page');
|
|
31
|
-
cy.
|
|
41
|
+
cy.contains('test2');
|
|
32
42
|
});
|
|
33
43
|
});
|
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