From 0c50d920feb3fb69278dbaf2f1a06b0c85121077 Mon Sep 17 00:00:00 2001 From: Dobricean Ioan Dorian Date: Wed, 24 May 2023 14:35:56 +0300 Subject: [PATCH 1/6] check if url is undefined --- src/PrivacyProtection/PrivacyProtection.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PrivacyProtection/PrivacyProtection.jsx b/src/PrivacyProtection/PrivacyProtection.jsx index db60478..8634a17 100644 --- a/src/PrivacyProtection/PrivacyProtection.jsx +++ b/src/PrivacyProtection/PrivacyProtection.jsx @@ -129,7 +129,7 @@ const PrivacyProtection = (props) => { //screenshot api React.useEffect(() => { - if (enabled && !bgImg && !show) { + if (enabled && !bgImg && !show && url) { fetch( `${getBaseUrl( '', From e13959e8a910f18682620479f0b069557896e794 Mon Sep 17 00:00:00 2001 From: Dobricean Ioan Dorian Date: Wed, 24 May 2023 17:16:39 +0300 Subject: [PATCH 2/6] fix cypress --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index 2417b3a..4385390 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,9 @@ "@eeacms/volto-corsproxy", "@eeacms/volto-datablocks" ], + "resolutions": { + "react-countup/countup.js": "6.1.1" + }, "dependencies": { "@eeacms/volto-corsproxy": "*", "@eeacms/volto-datablocks": "*", From 762035851ca5bdad7b4522740895809ddea6337e Mon Sep 17 00:00:00 2001 From: Dobricean Ioan Dorian Date: Wed, 24 May 2023 17:18:29 +0300 Subject: [PATCH 3/6] fix cypress --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4385390..5f47702 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@eeacms/volto-datablocks" ], "resolutions": { - "react-countup/countup.js": "6.1.1" + "react-countup/countup.js": "2.5.0" }, "dependencies": { "@eeacms/volto-corsproxy": "*", From 2d7757ad98ac23785851f564f1f7cd635e9ace0b Mon Sep 17 00:00:00 2001 From: valentinab25 Date: Thu, 8 Jun 2023 20:33:01 +0300 Subject: [PATCH 4/6] test: Fix test config, coverage Refs #253277 --- Jenkinsfile | 1 + jest-addon.config.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6dc7c42..ae1e8d0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -188,6 +188,7 @@ pipeline { def nodeJS = tool 'NodeJS'; withSonarQubeEnv('Sonarqube') { sh '''sed -i "s#/opt/frontend/my-volto-project/src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info''' + sh '''sed -i "s#src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info''' 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" 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''' } diff --git a/jest-addon.config.js b/jest-addon.config.js index da38318..e23a6c3 100644 --- a/jest-addon.config.js +++ b/jest-addon.config.js @@ -5,6 +5,7 @@ module.exports = { '!src/**/*.d.ts', ], moduleNameMapper: { + '\\.(css|less|scss|sass)$': 'identity-obj-proxy', '@plone/volto/cypress': '/node_modules/@plone/volto/cypress', '@plone/volto/babel': '/node_modules/@plone/volto/babel', '@plone/volto/(.*)$': '/node_modules/@plone/volto/src/$1', @@ -17,7 +18,6 @@ module.exports = { '~/(.*)$': '/src/$1', 'load-volto-addons': '/node_modules/@plone/volto/jest-addons-loader.js', - '\\.(css|less|scss|sass)$': 'identity-obj-proxy', }, transform: { '^.+\\.js(x)?$': 'babel-jest', From 43a34615c31e53da84d68afe8bb9312729e72b4d Mon Sep 17 00:00:00 2001 From: valentinab25 Date: Fri, 9 Jun 2023 19:45:23 +0300 Subject: [PATCH 5/6] test: jest should look for addons in node_modules Refs #253277 --- jest-addon.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jest-addon.config.js b/jest-addon.config.js index e23a6c3..3c86610 100644 --- a/jest-addon.config.js +++ b/jest-addon.config.js @@ -12,7 +12,7 @@ module.exports = { '@package/(.*)$': '/src/$1', '@root/(.*)$': '/src/$1', '@plone/volto-quanta/(.*)$': '/src/addons/volto-quanta/src/$1', - '@eeacms/(.*?)/(.*)$': '/src/addons/$1/src/$2', + '@eeacms/(.*?)/(.*)$': '/node_modules/@eeacms/$1/src/$2', '@plone/volto-slate': '/node_modules/@plone/volto/packages/volto-slate/src', '~/(.*)$': '/src/$1', From b8774c12e26ac1a0f00b45f5dc68a15f9ff1f25c Mon Sep 17 00:00:00 2001 From: EEA Jenkins <@users.noreply.github.com> Date: Tue, 13 Jun 2023 11:28:39 +0000 Subject: [PATCH 6/6] Automated release 5.0.4 --- CHANGELOG.md | 9 +++++++++ package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6108660..0cf466b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +### [5.0.4](https://github.com/eea/volto-embed/compare/5.0.3...5.0.4) - 13 June 2023 + +#### :hammer_and_wrench: Others + +- test: jest should look for addons in node_modules Refs #253277 [valentinab25 - [`43a3461`](https://github.com/eea/volto-embed/commit/43a34615c31e53da84d68afe8bb9312729e72b4d)] +- test: Fix test config, coverage Refs #253277 [valentinab25 - [`2d7757a`](https://github.com/eea/volto-embed/commit/2d7757ad98ac23785851f564f1f7cd635e9ace0b)] +- fix cypress [Dobricean Ioan Dorian - [`7620358`](https://github.com/eea/volto-embed/commit/762035851ca5bdad7b4522740895809ddea6337e)] +- fix cypress [Dobricean Ioan Dorian - [`e13959e`](https://github.com/eea/volto-embed/commit/e13959e8a910f18682620479f0b069557896e794)] +- check if url is undefined [Dobricean Ioan Dorian - [`0c50d92`](https://github.com/eea/volto-embed/commit/0c50d920feb3fb69278dbaf2f1a06b0c85121077)] ### [5.0.3](https://github.com/eea/volto-embed/compare/5.0.2...5.0.3) - 29 May 2023 #### :hammer_and_wrench: Others diff --git a/package.json b/package.json index 36e9b3b..b3b3bff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@eeacms/volto-embed", - "version": "5.0.3", + "version": "5.0.4", "description": "Embed external content", "main": "src/index.js", "author": "European Environment Agency: IDM2 A-Team",