diff --git a/CHANGELOG.md b/CHANGELOG.md index 244d7c1..7d37717 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,14 @@ 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). +#### [4.0.6](https://github.com/eea/volto-widget-temporal-coverage/compare/4.0.5...4.0.6) + + #### [4.0.5](https://github.com/eea/volto-widget-temporal-coverage/compare/4.0.4...4.0.5) -- Fix missing temporal [`b5d8b49`](https://github.com/eea/volto-widget-temporal-coverage/commit/b5d8b49414588933d5e0e8e4490db743f72d1468) +> 20 January 2022 + +- Fix missing temporal [`#22`](https://github.com/eea/volto-widget-temporal-coverage/pull/22) #### [4.0.4](https://github.com/eea/volto-widget-temporal-coverage/compare/4.0.3...4.0.4) diff --git a/Jenkinsfile b/Jenkinsfile index 3553185..2e046e8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,8 +4,9 @@ pipeline { environment { GIT_NAME = "volto-widget-temporal-coverage" NAMESPACE = "@eeacms" - SONARQUBE_TAGS = "volto.eea.europa.eu,www.eea.europa.eu-ims,climate-energy.eea.europa.eu,sustainability.eionet.europa.eu,forest.eea.europa.eu,biodiversity.europa.eu,clms.land.copernicus.eu,industry.eea.europa.eu,water.europa.eu-freshwater" + SONARQUBE_TAGS = "volto.eea.europa.eu,www.eea.europa.eu-ims,climate-energy.eea.europa.eu,sustainability.eionet.europa.eu,forest.eea.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" DEPENDENCIES = "" + VOLTO = "alpha" } stages { @@ -124,8 +125,8 @@ pipeline { node(label: 'docker') { script { try { - sh '''docker pull plone; docker run -d --rm --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="profile-plone.restapi:blocks" plone fg''' - 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''' + 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''' + 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''' } finally { try { sh '''rm -rf cypress-reports cypress-results cypress-coverage''' @@ -184,10 +185,10 @@ pipeline { unstash "xunit-reports" unstash "cypress-coverage" def scannerHome = tool 'SonarQubeScanner'; - def nodeJS = tool 'NodeJS11'; + 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 "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" + 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/cypress/support/index.js b/cypress/support/index.js index 89aab00..32395ab 100644 --- a/cypress/support/index.js +++ b/cypress/support/index.js @@ -27,7 +27,7 @@ coverage-end */ export const setupBeforeEach = () => { cy.autologin(); cy.createContent({ - contentType: 'Folder', + contentType: 'Document', contentId: 'cypress', contentTitle: 'Cypress', }); diff --git a/jest-addon.config.js b/jest-addon.config.js index 7c15499..1e5c80c 100644 --- a/jest-addon.config.js +++ b/jest-addon.config.js @@ -9,6 +9,7 @@ module.exports = { '@plone/volto/babel': '/node_modules/@plone/volto/babel', '@plone/volto/(.*)$': '/node_modules/@plone/volto/src/$1', '@package/(.*)$': '/src/$1', + '@root/(.*)$': '/src/$1', '@plone/volto-quanta/(.*)$': '/src/addons/volto-quanta/src/$1', '@eeacms/(.*?)/(.*)$': '/src/addons/$1/src/$2', 'volto-slate/(.*)$': '/src/addons/volto-slate/src/$1', diff --git a/package.json b/package.json index a77e067..35e2ff4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@eeacms/volto-widget-temporal-coverage", - "version": "4.0.5", + "version": "4.0.6", "description": "volto-widget-temporal-coverage: Volto add-on", "main": "src/index.js", "author": "European Environment Agency: IDM2 A-Team", diff --git a/src/components/manage/Widgets/TemporalWidget.test.jsx b/src/components/manage/Widgets/TemporalWidget.test.jsx index 8e7bd5e..b9f5a70 100644 --- a/src/components/manage/Widgets/TemporalWidget.test.jsx +++ b/src/components/manage/Widgets/TemporalWidget.test.jsx @@ -7,12 +7,6 @@ import TemporalWidget from './TemporalWidget'; const mockStore = configureStore(); -jest.mock('@plone/volto/helpers/Loadable/Loadable'); -beforeAll( - async () => - await require('@plone/volto/helpers/Loadable/Loadable').__setLoadables(), -); - test('renders an empty temporal widget edit component when temporal is missing', async () => { const store = mockStore({ intl: { diff --git a/src/components/manage/Widgets/__snapshots__/TemporalWidget.test.jsx.snap b/src/components/manage/Widgets/__snapshots__/TemporalWidget.test.jsx.snap index 8f6e3a7..990359f 100644 --- a/src/components/manage/Widgets/__snapshots__/TemporalWidget.test.jsx.snap +++ b/src/components/manage/Widgets/__snapshots__/TemporalWidget.test.jsx.snap @@ -89,17 +89,6 @@ exports[`renders an empty temporal widget edit component when temporal is missin -
@@ -245,17 +234,6 @@ exports[`renders an temporal widget edit component 1`] = ` -
@@ -365,17 +343,6 @@ exports[`renders an temporal widget edit component when temporal is an empty lis -
@@ -484,17 +451,6 @@ exports[`renders an temporal widget edit component when temporal is null 1`] = ` -
@@ -690,17 +646,6 @@ exports[`renders an temporal widget edit component with existing temporal ranges -
@@ -857,17 +802,6 @@ exports[`renders an temporal widget edit component with existing temporal ranges -
@@ -1014,17 +948,6 @@ exports[`renders an temporal widget edit component with joined temporal ranges f -
@@ -1221,17 +1144,6 @@ exports[`renders an temporal widget edit component with multiple ranges and sing -
@@ -1388,17 +1300,6 @@ exports[`renders an temporal widget edit component with ranges 1`] = ` -
@@ -1595,17 +1496,6 @@ exports[`renders an temporal widget edit component with ranges and single values -
@@ -1812,17 +1702,6 @@ exports[`renders an temporal widget edit component with ranges and single values -