Skip to content

Commit

Permalink
Merge pull request #101 from eea/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
avoinea authored Nov 24, 2023
2 parents c1e9ffd + 172ec4f commit 1687d5f
Show file tree
Hide file tree
Showing 7 changed files with 223 additions and 144 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@ 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).

### [10.4.4](https://github.com/eea/volto-accordion-block/compare/10.4.3...10.4.4) - 24 November 2023

#### :bug: Bug Fixes

- fix(performance): use cloneDeepSchema for cloning the schema to avoid potential errors [David Ichim - [`725ed0d`](https://github.com/eea/volto-accordion-block/commit/725ed0deb1181620aec2b004c9e33a89ec0fc559)]

#### :house: Internal changes

- chore: [JENKINS] Refactor automated testing [valentinab25 - [`cfdf1cd`](https://github.com/eea/volto-accordion-block/commit/cfdf1cd3f34f4e92b14c0ef83c629066f7ae96e7)]

#### :hammer_and_wrench: Others

- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`0766840`](https://github.com/eea/volto-accordion-block/commit/07668401fffb6d6cb12a71c828c9f1e2ccbf760b)]
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`d96919b`](https://github.com/eea/volto-accordion-block/commit/d96919b3f278832d6ba199786342a7eca0fddab1)]
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`4243468`](https://github.com/eea/volto-accordion-block/commit/4243468110ee1a7a28814386001fad3097b18f11)]
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`41fe792`](https://github.com/eea/volto-accordion-block/commit/41fe792ece0931c3e1561611f9def7df543014c9)]
- test: [JENKINS] Improve cypress time [valentinab25 - [`c8dc782`](https://github.com/eea/volto-accordion-block/commit/c8dc78243f5529604031b5c8bb806c6b1c4bbdcc)]
### [10.4.3](https://github.com/eea/volto-accordion-block/compare/10.4.2...10.4.3) - 17 October 2023

#### :house: Internal changes
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG VOLTO_VERSION
FROM plone/frontend-builder:${VOLTO_VERSION}
FROM eeacms/frontend-builder:${VOLTO_VERSION}

ARG ADDON_NAME
ARG ADDON_PATH
Expand Down
294 changes: 160 additions & 134 deletions Jenkinsfile

Large diffs are not rendered by default.

35 changes: 33 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ VOLTO_VERSION?=16
ADDON_PATH="${DIR}"
ADDON_NAME="@eeacms/${ADDON_PATH}"
DOCKER_COMPOSE=PLONE_VERSION=${PLONE_VERSION} VOLTO_VERSION=${VOLTO_VERSION} ADDON_NAME=${ADDON_NAME} ADDON_PATH=${ADDON_PATH} docker compose
RAZZLE_INTERNAL_API_PATH?="http://localhost:8080/Plone"
RAZZLE_DEV_PROXY_API_PATH?="${RAZZLE_INTERNAL_API_PATH}"
CYPRESS_API_PATH="${RAZZLE_DEV_PROXY_API_PATH}"



# Top-level targets
.PHONY: all
Expand Down Expand Up @@ -77,11 +82,11 @@ shell: ## Start a shell in the frontend container

.PHONY: cypress-open
cypress-open: ## Open cypress integration tests
NODE_ENV=development $(NODE_MODULES)/cypress/bin/cypress open
CYPRESS_API_PATH="${RAZZLE_DEV_PROXY_API_PATH}" NODE_ENV=development $(NODE_MODULES)/cypress/bin/cypress open

.PHONY: cypress-run
cypress-run: ## Run cypress integration tests
NODE_ENV=development $(NODE_MODULES)/cypress/bin/cypress run
CYPRESS_API_PATH="${RAZZLE_DEV_PROXY_API_PATH}" NODE_ENV=development $(NODE_MODULES)/cypress/bin/cypress run --browser chromium

.PHONY: test
test: ## Run jest tests
Expand Down Expand Up @@ -129,3 +134,29 @@ i18n: ## i18n
help: ## Show this help.
@echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)"
head -n 14 Makefile

.PHONY: ci-fix
ci-fix:
echo "Running lint-fix"
make lint-fix
echo "Running prettier-fix"
make prettier-fix
echo "Running stylelint-fix"
make stylelint-fix

.PHONY: test-ci
test-ci:
cd /app
RAZZLE_JEST_CONFIG=src/addons/${ADDON_PATH}/jest-addon.config.js CI=true yarn test src/addons/${ADDON_PATH}/src --watchAll=false --reporters=default --reporters=jest-junit --collectCoverage --coverageReporters lcov cobertura text

.PHONY: start-ci
start-ci:
cp .coverage.babel.config.js /app/babel.config.js
cd ../..
yarn start

.PHONY: cypress-ci
cypress-ci:
$(NODE_MODULES)/.bin/wait-on -t 240000 http://localhost:3000
NODE_ENV=development make cypress-run

6 changes: 3 additions & 3 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ const { defineConfig } = require('cypress');

module.exports = defineConfig({
viewportWidth: 1280,
defaultCommandTimeout: 5000,
defaultCommandTimeout: 8888,
chromeWebSecurity: false,
reporter: 'junit',
video: true,
video: false,
retries: {
runMode: 1,
runMode: 2,
openMode: 0,
},
reporterOptions: {
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-accordion-block",
"version": "10.4.3",
"version": "10.4.4",
"description": "volto-accordion-block: Volto accordion block",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
11 changes: 8 additions & 3 deletions src/components/manage/Blocks/Accordion/Edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import {
getBlocksLayoutFieldname,
withBlockExtensions,
} from '@plone/volto/helpers';
import { cloneDeepSchema } from '@plone/volto/helpers/Utils/Utils';
import helpSVG from '@plone/volto/icons/help.svg';
import { isEmpty, without, cloneDeep, pickBy } from 'lodash';
import { isEmpty, without, pickBy } from 'lodash';
import React, { useState } from 'react';
import { Button, Segment } from 'semantic-ui-react';
import { defineMessages, useIntl } from 'react-intl';
Expand Down Expand Up @@ -131,8 +132,12 @@ const Edit = (props) => {
schemaEnhancer = activeItem?.['schemaEnhancer'];

schema = schemaEnhancer
? schemaEnhancer({ schema: cloneDeep(originalSchema), formData, intl })
: cloneDeep(originalSchema);
? schemaEnhancer({
schema: cloneDeepSchema(originalSchema),
formData,
intl,
})
: cloneDeepSchema(originalSchema);

return schema;
};
Expand Down

0 comments on commit 1687d5f

Please sign in to comment.