Skip to content

Commit

Permalink
Merge pull request #23 from eea/develop
Browse files Browse the repository at this point in the history
develop
  • Loading branch information
avoinea authored Jul 1, 2022
2 parents 0084ba2 + 0c8813c commit 7b578ed
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 135 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
11 changes: 6 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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'''
Expand Down Expand Up @@ -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'''
}
}
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ coverage-end */
export const setupBeforeEach = () => {
cy.autologin();
cy.createContent({
contentType: 'Folder',
contentType: 'Document',
contentId: 'cypress',
contentTitle: 'Cypress',
});
Expand Down
1 change: 1 addition & 0 deletions jest-addon.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
'@plone/volto/babel': '<rootDir>/node_modules/@plone/volto/babel',
'@plone/volto/(.*)$': '<rootDir>/node_modules/@plone/volto/src/$1',
'@package/(.*)$': '<rootDir>/src/$1',
'@root/(.*)$': '<rootDir>/src/$1',
'@plone/volto-quanta/(.*)$': '<rootDir>/src/addons/volto-quanta/src/$1',
'@eeacms/(.*?)/(.*)$': '<rootDir>/src/addons/$1/src/$2',
'volto-slate/(.*)$': '<rootDir>/src/addons/volto-slate/src/$1',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
6 changes: 0 additions & 6 deletions src/components/manage/Widgets/TemporalWidget.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,6 @@ exports[`renders an empty temporal widget edit component when temporal is missin
<span
class="react-select__indicator-separator css-6fp5c8-indicatorSeparator"
/>
<div
aria-hidden="true"
class="react-select__indicator react-select__dropdown-indicator css-7hdh9a-DropdownIndicator"
>
<svg
class="icon"
style="height: 24px; width: auto; fill: #007bc1;"
viewBox=""
xmlns=""
/>
</div>
</div>
</div>
<div>
Expand Down Expand Up @@ -245,17 +234,6 @@ exports[`renders an temporal widget edit component 1`] = `
<span
class="react-select__indicator-separator css-6fp5c8-indicatorSeparator"
/>
<div
aria-hidden="true"
class="react-select__indicator react-select__dropdown-indicator css-7hdh9a-DropdownIndicator"
>
<svg
class="icon"
style="height: 24px; width: auto; fill: #007bc1;"
viewBox=""
xmlns=""
/>
</div>
</div>
</div>
<div>
Expand Down Expand Up @@ -365,17 +343,6 @@ exports[`renders an temporal widget edit component when temporal is an empty lis
<span
class="react-select__indicator-separator css-6fp5c8-indicatorSeparator"
/>
<div
aria-hidden="true"
class="react-select__indicator react-select__dropdown-indicator css-7hdh9a-DropdownIndicator"
>
<svg
class="icon"
style="height: 24px; width: auto; fill: #007bc1;"
viewBox=""
xmlns=""
/>
</div>
</div>
</div>
<div>
Expand Down Expand Up @@ -484,17 +451,6 @@ exports[`renders an temporal widget edit component when temporal is null 1`] = `
<span
class="react-select__indicator-separator css-6fp5c8-indicatorSeparator"
/>
<div
aria-hidden="true"
class="react-select__indicator react-select__dropdown-indicator css-7hdh9a-DropdownIndicator"
>
<svg
class="icon"
style="height: 24px; width: auto; fill: #007bc1;"
viewBox=""
xmlns=""
/>
</div>
</div>
</div>
<div>
Expand Down Expand Up @@ -690,17 +646,6 @@ exports[`renders an temporal widget edit component with existing temporal ranges
<span
class="react-select__indicator-separator css-6fp5c8-indicatorSeparator"
/>
<div
aria-hidden="true"
class="react-select__indicator react-select__dropdown-indicator css-7hdh9a-DropdownIndicator"
>
<svg
class="icon"
style="height: 24px; width: auto; fill: #007bc1;"
viewBox=""
xmlns=""
/>
</div>
</div>
</div>
<div>
Expand Down Expand Up @@ -857,17 +802,6 @@ exports[`renders an temporal widget edit component with existing temporal ranges
<span
class="react-select__indicator-separator css-6fp5c8-indicatorSeparator"
/>
<div
aria-hidden="true"
class="react-select__indicator react-select__dropdown-indicator css-7hdh9a-DropdownIndicator"
>
<svg
class="icon"
style="height: 24px; width: auto; fill: #007bc1;"
viewBox=""
xmlns=""
/>
</div>
</div>
</div>
<div>
Expand Down Expand Up @@ -1014,17 +948,6 @@ exports[`renders an temporal widget edit component with joined temporal ranges f
<span
class="react-select__indicator-separator css-6fp5c8-indicatorSeparator"
/>
<div
aria-hidden="true"
class="react-select__indicator react-select__dropdown-indicator css-7hdh9a-DropdownIndicator"
>
<svg
class="icon"
style="height: 24px; width: auto; fill: #007bc1;"
viewBox=""
xmlns=""
/>
</div>
</div>
</div>
<div>
Expand Down Expand Up @@ -1221,17 +1144,6 @@ exports[`renders an temporal widget edit component with multiple ranges and sing
<span
class="react-select__indicator-separator css-6fp5c8-indicatorSeparator"
/>
<div
aria-hidden="true"
class="react-select__indicator react-select__dropdown-indicator css-7hdh9a-DropdownIndicator"
>
<svg
class="icon"
style="height: 24px; width: auto; fill: #007bc1;"
viewBox=""
xmlns=""
/>
</div>
</div>
</div>
<div>
Expand Down Expand Up @@ -1388,17 +1300,6 @@ exports[`renders an temporal widget edit component with ranges 1`] = `
<span
class="react-select__indicator-separator css-6fp5c8-indicatorSeparator"
/>
<div
aria-hidden="true"
class="react-select__indicator react-select__dropdown-indicator css-7hdh9a-DropdownIndicator"
>
<svg
class="icon"
style="height: 24px; width: auto; fill: #007bc1;"
viewBox=""
xmlns=""
/>
</div>
</div>
</div>
<div>
Expand Down Expand Up @@ -1595,17 +1496,6 @@ exports[`renders an temporal widget edit component with ranges and single values
<span
class="react-select__indicator-separator css-6fp5c8-indicatorSeparator"
/>
<div
aria-hidden="true"
class="react-select__indicator react-select__dropdown-indicator css-7hdh9a-DropdownIndicator"
>
<svg
class="icon"
style="height: 24px; width: auto; fill: #007bc1;"
viewBox=""
xmlns=""
/>
</div>
</div>
</div>
<div>
Expand Down Expand Up @@ -1812,17 +1702,6 @@ exports[`renders an temporal widget edit component with ranges and single values
<span
class="react-select__indicator-separator css-6fp5c8-indicatorSeparator"
/>
<div
aria-hidden="true"
class="react-select__indicator react-select__dropdown-indicator css-7hdh9a-DropdownIndicator"
>
<svg
class="icon"
style="height: 24px; width: auto; fill: #007bc1;"
viewBox=""
xmlns=""
/>
</div>
</div>
</div>
<div>
Expand Down

0 comments on commit 7b578ed

Please sign in to comment.