Skip to content

Commit

Permalink
Merge pull request #80 from eea/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
avoinea authored Jun 12, 2023
2 parents ff19c45 + faedee5 commit 1054d17
Show file tree
Hide file tree
Showing 10 changed files with 287 additions and 35 deletions.
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ 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.2.1](https://github.com/eea/volto-block-style/compare/5.2.0...5.2.1) - 12 June 2023

#### :house: Internal changes

- chore: [JENKINS] Deprecate circularity website [valentinab25 - [`458b2f8`](https://github.com/eea/volto-block-style/commit/458b2f86dd2ae6ec5d892bc1501947c48eb829bb)]

#### :hammer_and_wrench: Others

- test: jest should look for addons in node_modules Refs #253277 [valentinab25 - [`cefc0ff`](https://github.com/eea/volto-block-style/commit/cefc0ff11f17f91269a74617731fffd375132ef7)]
- test: Add cypress test for basic functionality - refs #252543 [ana-oprea - [`207f97c`](https://github.com/eea/volto-block-style/commit/207f97cdf73ae97bc58c48f5144d495fd09a900f)]
- test: Add unit tests for withCachedImages and StyleWrapperView - refs #253277 [ana-oprea - [`8004fc6`](https://github.com/eea/volto-block-style/commit/8004fc6ad6e5640fb42ec4ea810b6da6e1944291)]
- test: Fix test config, coverage Refs #253277 [valentinab25 - [`bcb10db`](https://github.com/eea/volto-block-style/commit/bcb10db5e6d740fe3bfdf170ca674ba2090a050c)]
- update getFieldURL function [Miu Razvan - [`eea1f7e`](https://github.com/eea/volto-block-style/commit/eea1f7ea9be571750308de1ced89fbd0b8a40c45)]
### [5.2.0](https://github.com/eea/volto-block-style/compare/5.1.0...5.2.0) - 5 April 2023

#### :nail_care: Enhancements
Expand All @@ -17,10 +30,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 - [`06a29bd`](https://github.com/eea/volto-block-style/commit/06a29bd888f9625c28cd93bfc8e1aef581ec228a)]
### [5.1.0](https://github.com/eea/volto-block-style/compare/5.0.1...5.1.0) - 27 March 2023

#### :hammer_and_wrench: Others

- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`1ee1797`](https://github.com/eea/volto-block-style/commit/1ee1797997c115e997edeaca234ad3d66b901564)]
### [5.0.1](https://github.com/eea/volto-block-style/compare/5.0.0...5.0.1) - 8 February 2023

## [5.0.0](https://github.com/eea/volto-block-style/compare/4.1.2...5.0.0) - 7 February 2023
Expand All @@ -32,7 +47,10 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
#### :hammer_and_wrench: Others

- Add theme picker widget [dana-cfc4 - [`4bbdec3`](https://github.com/eea/volto-block-style/commit/4bbdec33ac328873758c3a6ee03a41b53e2fb5a8)]
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`e6ffe28`](https://github.com/eea/volto-block-style/commit/e6ffe283a571157ef99df399a75fd90e88797925)]
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`0575439`](https://github.com/eea/volto-block-style/commit/0575439dd8967e28281277d91d6d69fc54a1e714)]
- test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`564c363`](https://github.com/eea/volto-block-style/commit/564c36374879ee6810fed58dc2ef8ee01751ec35)]
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`0ff5a93`](https://github.com/eea/volto-block-style/commit/0ff5a938ef53f349dde941671079d37e91db58e0)]
### [4.1.2](https://github.com/eea/volto-block-style/compare/4.1.1...4.1.2) - 29 November 2022

#### :nail_care: Enhancements
Expand All @@ -41,6 +59,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- yarn 3 [Alin Voinea - [`9505f8c`](https://github.com/eea/volto-block-style/commit/9505f8cb21b38586fbe06efd8da353861691bc98)]
- Add Sonarqube tag using demo-kitkat-frontend addons list [EEA Jenkins - [`831f4fa`](https://github.com/eea/volto-block-style/commit/831f4fadd1b60fe47b9fd5352031fd2cc3462a3d)]
### [4.1.1](https://github.com/eea/volto-block-style/compare/4.1.0...4.1.1) - 16 November 2022

#### :nail_care: Enhancements
Expand Down Expand Up @@ -68,6 +88,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
#### :hammer_and_wrench: Others

- Bring this up to date [Miu Razvan - [`6d7e7a4`](https://github.com/eea/volto-block-style/commit/6d7e7a46078d858800eb894ffb1eba42bdd384e0)]
- Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`5529469`](https://github.com/eea/volto-block-style/commit/5529469b468e67300ba9cfca415f6b7bbf1ea0e4)]
### [3.7.2](https://github.com/eea/volto-block-style/compare/3.7.1...3.7.2) - 27 September 2022

#### :bug: Bug Fixes
Expand All @@ -83,6 +104,7 @@ 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 - [`928339f`](https://github.com/eea/volto-block-style/commit/928339ffd2991b24844a9ca3691523d7e692ca91)]
### [3.7.0](https://github.com/eea/volto-block-style/compare/3.6.3...3.7.0) - 22 September 2022

#### :hammer_and_wrench: Others
Expand All @@ -102,11 +124,14 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`c8977dc`](https://github.com/eea/volto-block-style/commit/c8977dc8d8f623601c763aff13c1a8df5fd1eb13)]
### [3.6.0](https://github.com/eea/volto-block-style/compare/3.5.18...3.6.0) - 9 June 2022

#### :hammer_and_wrench: Others

- Release 3.6.0 [Alin Voinea - [`f0b6eb8`](https://github.com/eea/volto-block-style/commit/f0b6eb885feee2bb02fdd4daf6ee7a4747518b23)]
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`e7a6cf9`](https://github.com/eea/volto-block-style/commit/e7a6cf9ba635161d1222e2d5db4c83cb680e3ce2)]
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`a648e9b`](https://github.com/eea/volto-block-style/commit/a648e9b7667bc496050c02c2fcc8b4a3a0a7af1c)]
### [3.5.18](https://github.com/eea/volto-block-style/compare/3.5.17...3.5.18) - 3 March 2022

### [3.5.17](https://github.com/eea/volto-block-style/compare/3.5.16...3.5.17) - 2 March 2022
Expand Down Expand Up @@ -167,6 +192,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`ccd5b62`](https://github.com/eea/volto-block-style/commit/ccd5b622c05a9ee3d906d6eb5df0288fa25a694b)]
- added cy tests [Daniela Mormocea - [`ed8dc6f`](https://github.com/eea/volto-block-style/commit/ed8dc6f55f1f48cb84f6c9879eb4a728e1308639)]
### [3.5.8](https://github.com/eea/volto-block-style/compare/3.5.7...3.5.8) - 13 December 2021

Expand Down Expand Up @@ -196,17 +222,20 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- Add Sonarqube tag using industry-frontend addons list [EEA Jenkins - [`813a0f5`](https://github.com/eea/volto-block-style/commit/813a0f5a2d1f563b184475a3e6ff620a733ba5da)]
### [3.5.2](https://github.com/eea/volto-block-style/compare/3.5.1...3.5.2) - 29 October 2021

### [3.5.1](https://github.com/eea/volto-block-style/compare/3.5.0...3.5.1) - 19 October 2021

#### :hammer_and_wrench: Others

- Add Sonarqube tag using sustainability-frontend addons list [EEA Jenkins - [`8b20d02`](https://github.com/eea/volto-block-style/commit/8b20d02f809e456af84aaea5ad74115c00e39c3e)]
### [3.5.0](https://github.com/eea/volto-block-style/compare/3.4.5...3.5.0) - 25 September 2021

#### :hammer_and_wrench: Others

- Release 3.5.0 [Alin Voinea - [`0a5a98e`](https://github.com/eea/volto-block-style/commit/0a5a98e531f93470956673e50b6c71f37f59b49e)]
- Add Sonarqube tag using ims-frontend addons list [EEA Jenkins - [`30bb3aa`](https://github.com/eea/volto-block-style/commit/30bb3aa5f49ed5264cf609d6b8f234b07b7988ca)]
### [3.4.5](https://github.com/eea/volto-block-style/compare/3.4.4...3.4.5) - 31 August 2021

#### :hammer_and_wrench: Others
Expand Down Expand Up @@ -263,6 +292,10 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Add range slider [Tiberiu Ichim - [`8a91ef1`](https://github.com/eea/volto-block-style/commit/8a91ef168df01e4a0f114596d50a401a14a41251)]
- Separate block wrapping; don't apply multiple times [Tiberiu Ichim - [`2adffd5`](https://github.com/eea/volto-block-style/commit/2adffd58a99af59bb42d72c54f2a05be3b9b2ea1)]
- Separate block wrapping; don't apply multiple times [Tiberiu Ichim - [`584e7a9`](https://github.com/eea/volto-block-style/commit/584e7a9859c7d417708f9aa78b83e94547f2f1ab)]
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`f6737ef`](https://github.com/eea/volto-block-style/commit/f6737ef68ba906c5fb72e18c77b060aa82ed0a73)]
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`6a4c6c1`](https://github.com/eea/volto-block-style/commit/6a4c6c16acc88471279a82a62b92555dc1ac20cc)]
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`2101b55`](https://github.com/eea/volto-block-style/commit/2101b550588402b37cd91b5d582e27a6255d6cac)]
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`2583c68`](https://github.com/eea/volto-block-style/commit/2583c68ea49ddbedc7b90b9d477cbbe4e2b779fd)]
- Add hidden toggle [Tiberiu Ichim - [`3b8ed26`](https://github.com/eea/volto-block-style/commit/3b8ed26a82c31ff430301adceea1174e92464a77)]
- Add a clear button to the box size widget [Tiberiu Ichim - [`4bdf803`](https://github.com/eea/volto-block-style/commit/4bdf8030d7a4d39d3a48b56ed6c8cddc311b3ff7)]
### [3.3.3](https://github.com/eea/volto-block-style/compare/3.3.2...3.3.3) - 25 June 2021
Expand Down Expand Up @@ -420,6 +453,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- React color ~2.18.1 [Alin Voinea - [`597da25`](https://github.com/eea/volto-block-style/commit/597da253f5266ecc9d0d6e10ee4d365432433416)]
- Cleanup [Alin Voinea - [`8fb40cf`](https://github.com/eea/volto-block-style/commit/8fb40cf4fe721cc26120ab1231d48c4c9eab88a9)]
- Fix README screenshot path [Alin Voinea - [`81f09ec`](https://github.com/eea/volto-block-style/commit/81f09ec9d95b3a555d0bc7e0aa3ad08b4ab005db)]
- yarn prettier [Alin Voinea - [`04f3b9a`](https://github.com/eea/volto-block-style/commit/04f3b9ae36ea8c6d99dad1f6d4cf56e81c032e1a)]
### [0.1.1](https://github.com/eea/volto-block-style/compare/0.1.0...0.1.1) - 22 October 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-block-style"
NAMESPACE = "@eeacms"
SONARQUBE_TAGS = "volto.eea.europa.eu,climate-energy.eea.europa.eu,forest.eea.europa.eu,clms.land.copernicus.eu,biodiversity.europa.eu,www.eea.europa.eu-ims,sustainability.eionet.europa.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,clms.land.copernicus.eu,biodiversity.europa.eu,www.eea.europa.eu-ims,sustainability.eionet.europa.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 '''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
30 changes: 0 additions & 30 deletions cypress/e2e/01-block-basics.cy.js

This file was deleted.

45 changes: 45 additions & 0 deletions cypress/e2e/01-style-block-basics.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { slateBeforeEach, slateAfterEach } from '../support/e2e';

describe('Blocks Tests', () => {
beforeEach(slateBeforeEach);
afterEach(slateAfterEach);

it('Style Block', () => {
// Change page title
cy.get('[contenteditable=true]').first().click();

cy.get('[contenteditable=true]').first().clear();

cy.get('[contenteditable=true]').first().type('Volto Style Block Demo');

cy.get('.documentFirstHeading').contains('Volto Style Block Demo');

// Align the block
cy.get('.open-styles-button button').click();
cy.contains('Standard').click();
cy.get(
'.inline.field.align-widget.field-wrapper-textAlign .align-buttons .ui.buttons',
)
.eq(2)
.click();

// Change the background color of the block
cy.contains('Decorations').click();
cy.get(
'.inline.field.simple-color-picker-widget.field-wrapper-backgroundColor .ui.huge.button',
).click();
cy.get('.github-picker.color-picker div[title="#9dc6d4"]').click();

cy.get('[contenteditable=true]').first().type('{enter}');

// Save page
cy.get('#toolbar-save').click();
cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page');

// The page view should contain our changes
cy.contains('Volto Style Block Demo');
cy.get('.has--backgroundColor--9dc6d4.has--textAlign--center').should(
'exist',
);
});
});
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-block-style",
"version": "5.2.0",
"version": "5.2.1",
"description": "volto-block-style: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
3 changes: 2 additions & 1 deletion src/StyleWrapper/StyleWrapperView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { connect } from 'react-redux';
import cx from 'classnames';
import config from '@plone/volto/registry';
import { withCachedImages } from '@eeacms/volto-block-style/hocs';
import { getFieldURL } from '@eeacms/volto-block-style/helpers';
import './stretchStyleDefaultView.css';
import './stretchStyleWideView.css';
import './stretchStyleEdit.css';
Expand Down Expand Up @@ -106,7 +107,7 @@ const StyleWrapperView = (props) => {
} = styleData;

const containerType = data['@type'];
const backgroundImage = styleData.backgroundImage;
const backgroundImage = getFieldURL(styleData.backgroundImage);

const style = getStyle(style_name);
const inlineStyles = getInlineStyles(styleData, props);
Expand Down
Loading

0 comments on commit 1054d17

Please sign in to comment.