Skip to content

Commit

Permalink
Merge pull request #74 from eea/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
avoinea committed Jun 12, 2023
2 parents 44928ae + ca50082 commit 4365094
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 5 deletions.
33 changes: 32 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,22 @@ 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).

### [6.3.1](https://github.com/eea/volto-columns-block/compare/6.3.0...6.3.1) - 12 June 2023

#### :house: Internal changes

- chore: [JENKINS] Deprecate circularity website [valentinab25 - [`b535c91`](https://github.com/eea/volto-columns-block/commit/b535c9135bce0dd172e60f7f8af5ebd9fa0c073d)]

#### :hammer_and_wrench: Others

- test: jest should look for addons in node_modules Refs #253277 [valentinab25 - [`f3511a3`](https://github.com/eea/volto-columns-block/commit/f3511a39cd8c3e59dfb211f6cc16dfbdf9b65df7)]
- test: Unit tests - refs #253277 [ana-oprea - [`b5acaa9`](https://github.com/eea/volto-columns-block/commit/b5acaa9d3d45731f49fe6a6d8a834088a246f345)]
- test: Fix test config, coverage Refs #253277 [valentinab25 - [`7ea084c`](https://github.com/eea/volto-columns-block/commit/7ea084c20d22a7e3177d9d0b5fa74869c337aa0d)]
### [6.3.0](https://github.com/eea/volto-columns-block/compare/6.2.0...6.3.0) - 5 April 2023

#### :rocket: New Features

- feat(ColumnsBlockEdit.jsx): add eraser icon for delete column style button [Miu Razvan - [`f966f37`](https://github.com/eea/volto-columns-block/commit/f966f375fe4384d8889ba41c36350156d378a113)]
- feat(ColumnsBlockEdit.jsx): add delete column style button to the sidebar [Miu Razvan - [`9d895c2`](https://github.com/eea/volto-columns-block/commit/9d895c2ca446d3d683baeefc18eea602566f90d4)]

#### :nail_care: Enhancements

Expand All @@ -26,10 +36,12 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`5738a85`](https://github.com/eea/volto-columns-block/commit/5738a85810a7fe5ad64d6ae0362ffffa7bbc6bc5)]
### [6.1.0](https://github.com/eea/volto-columns-block/compare/6.0.2...6.1.0) - 27 March 2023

#### :hammer_and_wrench: Others

- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`8e96c96`](https://github.com/eea/volto-columns-block/commit/8e96c967909944e827a1c1a303283c04d76f5db6)]
### [6.0.2](https://github.com/eea/volto-columns-block/compare/6.0.1...6.0.2) - 21 February 2023

#### :hammer_and_wrench: Others
Expand All @@ -42,20 +54,25 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
#### :hammer_and_wrench: Others

- Release 6.0.0 [Alin Voinea - [`947cd73`](https://github.com/eea/volto-columns-block/commit/947cd730ac967515e8a508924eab6efb3e485196)]
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`10b77f7`](https://github.com/eea/volto-columns-block/commit/10b77f765c2f6a42bf5e79cf46b4a48f5eb1f011)]
### [5.2.0](https://github.com/eea/volto-columns-block/compare/5.1.0...5.2.0) - 28 December 2022

#### :hammer_and_wrench: Others

- Release 5.2.0 [Alin Voinea - [`7ea7976`](https://github.com/eea/volto-columns-block/commit/7ea7976615b932802aece75d68065fa1b5063676)]
- test(eslint): Fix lint [Alin Voinea - [`1a5b9af`](https://github.com/eea/volto-columns-block/commit/1a5b9afeec15d998b24e3d9bedaa9c9044a54f9b)]
- Mock useLocation to fix ColumnsBlockView.test [wesleybl - [`e153a48`](https://github.com/eea/volto-columns-block/commit/e153a481103bc6db74ce19ec536e51cfcd232b6f)]
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`e8c0e8b`](https://github.com/eea/volto-columns-block/commit/e8c0e8bc9d65fbd4e454dd5ff0de158c864dd317)]
- test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`2ae13d2`](https://github.com/eea/volto-columns-block/commit/2ae13d2afdaca0c774b502f716258f6a481d4e49)]
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`e880669`](https://github.com/eea/volto-columns-block/commit/e8806694b640a0130bed701bd01f7a4901cff05d)]
- Don't fail in tests [Tiberiu Ichim - [`6c1dddf`](https://github.com/eea/volto-columns-block/commit/6c1dddf29860762c046393983b52a6609259aa29)]
### [5.1.0](https://github.com/eea/volto-columns-block/compare/5.0.1...5.1.0) - 29 November 2022

#### :hammer_and_wrench: Others

- Release 5.1.0 [Alin Voinea - [`4b199b2`](https://github.com/eea/volto-columns-block/commit/4b199b20a79d5ab3e5cad058565de444c6e3c68a)]
- yarn 3 [Alin Voinea - [`b6993ba`](https://github.com/eea/volto-columns-block/commit/b6993bac1f962be29d719a8bf1e394ff57d9e3cb)]
- Add Sonarqube tag using demo-kitkat-frontend addons list [EEA Jenkins - [`1d93d8d`](https://github.com/eea/volto-columns-block/commit/1d93d8d343b8b43c8eea763630b5d4476d242a44)]
### [5.0.1](https://github.com/eea/volto-columns-block/compare/5.0.0...5.0.1) - 16 November 2022

#### :bug: Bug Fixes
Expand Down Expand Up @@ -93,6 +110,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Cleanup [Miu Razvan - [`86e202e`](https://github.com/eea/volto-columns-block/commit/86e202eac4bc6ef4e776e79f62c0f96883848fab)]
- Cleanup [Alin Voinea - [`1baba7f`](https://github.com/eea/volto-columns-block/commit/1baba7f9959a13eb15070311b6f5f07ce396c84e)]
- Update dependencies [Alin Voinea - [`976c380`](https://github.com/eea/volto-columns-block/commit/976c380bb1ca2d985b2bfb1a88d2144aa2c11028)]
- Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`d978235`](https://github.com/eea/volto-columns-block/commit/d978235da3ab5dff38faba2673bb9a1afa7012a3)]
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`c8daea6`](https://github.com/eea/volto-columns-block/commit/c8daea6cad87650895d063c8d852b01d74cfd326)]
- update(jest): add @plone/volto-slate resolver refs- #153447 [nileshgulia1 - [`50ab9a0`](https://github.com/eea/volto-columns-block/commit/50ab9a0ff903badb677da43d913fd698f031895c)]
### [4.5.3](https://github.com/eea/volto-columns-block/compare/4.5.2...4.5.3) - 17 August 2022

Expand All @@ -106,6 +125,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`bab4f31`](https://github.com/eea/volto-columns-block/commit/bab4f318a773ff4de42f9e1e095a2e7ae39f6b01)]
### [4.5.0](https://github.com/eea/volto-columns-block/compare/4.4.15...4.5.0) - 11 April 2022

#### :hammer_and_wrench: Others
Expand All @@ -121,6 +141,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`ff71f20`](https://github.com/eea/volto-columns-block/commit/ff71f2020b724e2dca5d5f5467f51fc619d5f404)]
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`a8becc0`](https://github.com/eea/volto-columns-block/commit/a8becc0159ab140dcf6bb1b2de7429bae81adb78)]
### [4.4.14](https://github.com/eea/volto-columns-block/compare/4.4.13...4.4.14) - 21 January 2022

### [4.4.13](https://github.com/eea/volto-columns-block/compare/4.4.12...4.4.13) - 13 January 2022
Expand All @@ -141,11 +163,14 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`a745845`](https://github.com/eea/volto-columns-block/commit/a745845507ed2a32b4f50280439875e7287793e0)]
### [4.4.7](https://github.com/eea/volto-columns-block/compare/4.4.6...4.4.7) - 10 December 2021

#### :hammer_and_wrench: Others

- Refs #142010 - Optimize Volto-addons gitflow pipelines [valentinab25 - [`eccf195`](https://github.com/eea/volto-columns-block/commit/eccf19562860a61812187a4e55dd0f03c6a727d7)]
- Add Sonarqube tag using industry-frontend addons list [EEA Jenkins - [`a04ee43`](https://github.com/eea/volto-columns-block/commit/a04ee430e1407f3aa39886e98f4f11fcbec70b66)]
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`946133c`](https://github.com/eea/volto-columns-block/commit/946133c42004febadf2a1c8d330fbac6f820f160)]
### [4.4.6](https://github.com/eea/volto-columns-block/compare/4.4.5...4.4.6) - 14 October 2021

#### :hammer_and_wrench: Others
Expand All @@ -155,6 +180,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Add missing 40/60 grid [kreafox - [`c30b33c`](https://github.com/eea/volto-columns-block/commit/c30b33c393062f7ac2a09e3bc181224d3e8f921f)]
- Add padding for columns [kreafox - [`f945477`](https://github.com/eea/volto-columns-block/commit/f945477cd4150d8a570c26774a8afb3989d6fcba)]
- Add custom class for columns [kreafox - [`0e4783f`](https://github.com/eea/volto-columns-block/commit/0e4783f44d87c526dc0535874f75d41a85c5cf12)]
- Add Sonarqube tag using sustainability-frontend addons list [EEA Jenkins - [`35aa796`](https://github.com/eea/volto-columns-block/commit/35aa79635a03778819365873fdad2937e79b4f5f)]
- Add Sonarqube tag using ims-frontend addons list [EEA Jenkins - [`ab3713a`](https://github.com/eea/volto-columns-block/commit/ab3713a9e696b31f90c57b7e39faab03c767196f)]
### [4.4.5](https://github.com/eea/volto-columns-block/compare/4.4.4...4.4.5) - 13 August 2021

#### :hammer_and_wrench: Others
Expand All @@ -172,6 +199,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

- pretty [Tiberiu Ichim - [`53f1ab7`](https://github.com/eea/volto-columns-block/commit/53f1ab7970018f0a6de5ddf09495d1792320949d)]
- Fix styles in quanta toolbar [Tiberiu Ichim - [`97cfc46`](https://github.com/eea/volto-columns-block/commit/97cfc46e617bc5a22795817f71b1dd826ed1faf5)]
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`b26321b`](https://github.com/eea/volto-columns-block/commit/b26321bdf9eb2e4b5c1282210dfc8faa8849487f)]
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`0809fcb`](https://github.com/eea/volto-columns-block/commit/0809fcb4bce8611e5e417aa2222a7e9b40ba5936)]
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`36a4df2`](https://github.com/eea/volto-columns-block/commit/36a4df2cd83d48ddc2cefe9946a2c604798b9d6c)]
### [4.4.3](https://github.com/eea/volto-columns-block/compare/4.4.2...4.4.3) - 27 May 2021

### [4.4.2](https://github.com/eea/volto-columns-block/compare/4.4.1...4.4.2) - 29 April 2021
Expand Down Expand Up @@ -307,6 +337,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

- Release 1.0.0 [Alin Voinea - [`b432244`](https://github.com/eea/volto-columns-block/commit/b43224465fc15096fd41c61eee3f4cadffaed57f)]
- Update docs [Alin Voinea - [`f698f3c`](https://github.com/eea/volto-columns-block/commit/f698f3ca05b3f5a8f240db409cde4d1ddeeed78b)]
- yarn prettier [Alin Voinea - [`ae092f6`](https://github.com/eea/volto-columns-block/commit/ae092f6a101857cf068ed639c7d4686722db4d58)]
### [0.3.7](https://github.com/eea/volto-columns-block/compare/0.3.6...0.3.7) - 9 November 2020

#### :hammer_and_wrench: Others
Expand Down
3 changes: 2 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pipeline {
environment {
GIT_NAME = "volto-columns-block"
NAMESPACE = "@eeacms"
SONARQUBE_TAGS = "volto.eea.europa.eu,climate-energy.eea.europa.eu,forest.eea.europa.eu,biodiversity.europa.eu,www.eea.europa.eu-ims,sustainability.eionet.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,water.europa.eu-marine,climate-adapt.eea.europa.eu,climate-advisory-board.devel4cph.eea.europa.eu,climate-advisory-board.europa.eu,www.eea.europa.eu-en"
SONARQUBE_TAGS = "volto.eea.europa.eu,climate-energy.eea.europa.eu,forest.eea.europa.eu,biodiversity.europa.eu,www.eea.europa.eu-ims,sustainability.eionet.europa.eu,clms.land.copernicus.eu,industry.eea.europa.eu,water.europa.eu-freshwater,demo-www.eea.europa.eu,clmsdemo.devel6cph.eea.europa.eu,water.europa.eu-marine,climate-adapt.eea.europa.eu,climate-advisory-board.devel4cph.eea.europa.eu,climate-advisory-board.europa.eu,www.eea.europa.eu-en"
DEPENDENCIES = ""
VOLTO = ""
}
Expand Down Expand Up @@ -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 "export PATH=${scannerHome}/bin:${nodeJS}/bin:$PATH; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./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
4 changes: 2 additions & 2 deletions jest-addon.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ module.exports = {
'!src/**/*.d.ts',
],
moduleNameMapper: {
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
'@plone/volto/cypress': '<rootDir>/node_modules/@plone/volto/cypress',
'@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',
'@eeacms/(.*?)/(.*)$': '<rootDir>/node_modules/@eeacms/$1/src/$2',
'@plone/volto-slate':
'<rootDir>/node_modules/@plone/volto/packages/volto-slate/src',
'~/(.*)$': '<rootDir>/src/$1',
'load-volto-addons':
'<rootDir>/node_modules/@plone/volto/jest-addons-loader.js',
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
},
transform: {
'^.+\\.js(x)?$': 'babel-jest',
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-columns-block",
"version": "6.3.0",
"version": "6.3.1",
"description": "volto-columns-block: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
72 changes: 72 additions & 0 deletions src/utils.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import { cloneColumnsBlockData } from './utils';
import { getBlocks } from '@plone/volto/helpers';
import config from '@plone/volto/registry';

jest.mock('@plone/volto/helpers', () => ({
getBlocks: jest.fn(),
getBlocksFieldname: jest.fn(() => 'blocks'),
getBlocksLayoutFieldname: jest.fn(() => 'blocks_layout'),
}));

describe('cloneColumnsBlockData', () => {
it('should clone the blockData without cloneData', () => {
const mockBlockData = {
data: {
'@type': 'columns',
blocks: {
block1: {
'@type': 'test',
},
},
blocks_layout: {
items: ['block1'],
},
},
};

getBlocks.mockReturnValue([['block1', mockBlockData.data.blocks.block1]]);
config.blocks.blocksConfig = {
test: {},
};
const [id, clonedBlockData] = cloneColumnsBlockData(mockBlockData);
expect(clonedBlockData.data.blocks.block1).toEqual(
mockBlockData.data.blocks.block1,
);
expect(id).not.toBeNull();
});

it('should clone the blockData with cloneData', () => {
const mockBlockData = {
data: {
'@type': 'columns',
blocks: {
block1: {
'@type': 'test',
blocks: {},
},
},
blocks_layout: {
items: ['block1'],
},
},
};

getBlocks.mockReturnValue([['block1', mockBlockData.data.blocks.block1]]);
config.blocks.blocksConfig = {
test: {
cloneData: jest.fn(() => [
'test_uuid',
mockBlockData.data.blocks.block1,
]),
},
};
const [id, clonedBlockData] = cloneColumnsBlockData(mockBlockData);
expect(id).not.toEqual('test_uuid');
expect(clonedBlockData.data.blocks.block1).toEqual(
mockBlockData.data.blocks.block1,
);
expect(clonedBlockData.data.blocks['test_uuid']).toEqual(
mockBlockData.data.blocks.block1,
);
});
});

0 comments on commit 4365094

Please sign in to comment.