Skip to content

Commit 1687d5f

Browse files
authored
Merge pull request #101 from eea/develop
Release
2 parents c1e9ffd + 172ec4f commit 1687d5f

File tree

7 files changed

+223
-144
lines changed

7 files changed

+223
-144
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file. Dates are d
44

55
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
66

7+
### [10.4.4](https://github.com/eea/volto-accordion-block/compare/10.4.3...10.4.4) - 24 November 2023
8+
9+
#### :bug: Bug Fixes
10+
11+
- fix(performance): use cloneDeepSchema for cloning the schema to avoid potential errors [David Ichim - [`725ed0d`](https://github.com/eea/volto-accordion-block/commit/725ed0deb1181620aec2b004c9e33a89ec0fc559)]
12+
13+
#### :house: Internal changes
14+
15+
- chore: [JENKINS] Refactor automated testing [valentinab25 - [`cfdf1cd`](https://github.com/eea/volto-accordion-block/commit/cfdf1cd3f34f4e92b14c0ef83c629066f7ae96e7)]
16+
17+
#### :hammer_and_wrench: Others
18+
19+
- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`0766840`](https://github.com/eea/volto-accordion-block/commit/07668401fffb6d6cb12a71c828c9f1e2ccbf760b)]
20+
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`d96919b`](https://github.com/eea/volto-accordion-block/commit/d96919b3f278832d6ba199786342a7eca0fddab1)]
21+
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`4243468`](https://github.com/eea/volto-accordion-block/commit/4243468110ee1a7a28814386001fad3097b18f11)]
22+
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`41fe792`](https://github.com/eea/volto-accordion-block/commit/41fe792ece0931c3e1561611f9def7df543014c9)]
23+
- test: [JENKINS] Improve cypress time [valentinab25 - [`c8dc782`](https://github.com/eea/volto-accordion-block/commit/c8dc78243f5529604031b5c8bb806c6b1c4bbdcc)]
724
### [10.4.3](https://github.com/eea/volto-accordion-block/compare/10.4.2...10.4.3) - 17 October 2023
825

926
#### :house: Internal changes

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
22
ARG VOLTO_VERSION
3-
FROM plone/frontend-builder:${VOLTO_VERSION}
3+
FROM eeacms/frontend-builder:${VOLTO_VERSION}
44

55
ARG ADDON_NAME
66
ARG ADDON_PATH

Jenkinsfile

Lines changed: 160 additions & 134 deletions
Large diffs are not rendered by default.

Makefile

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ VOLTO_VERSION?=16
5050
ADDON_PATH="${DIR}"
5151
ADDON_NAME="@eeacms/${ADDON_PATH}"
5252
DOCKER_COMPOSE=PLONE_VERSION=${PLONE_VERSION} VOLTO_VERSION=${VOLTO_VERSION} ADDON_NAME=${ADDON_NAME} ADDON_PATH=${ADDON_PATH} docker compose
53+
RAZZLE_INTERNAL_API_PATH?="http://localhost:8080/Plone"
54+
RAZZLE_DEV_PROXY_API_PATH?="${RAZZLE_INTERNAL_API_PATH}"
55+
CYPRESS_API_PATH="${RAZZLE_DEV_PROXY_API_PATH}"
56+
57+
5358

5459
# Top-level targets
5560
.PHONY: all
@@ -77,11 +82,11 @@ shell: ## Start a shell in the frontend container
7782

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

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

8691
.PHONY: test
8792
test: ## Run jest tests
@@ -129,3 +134,29 @@ i18n: ## i18n
129134
help: ## Show this help.
130135
@echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)"
131136
head -n 14 Makefile
137+
138+
.PHONY: ci-fix
139+
ci-fix:
140+
echo "Running lint-fix"
141+
make lint-fix
142+
echo "Running prettier-fix"
143+
make prettier-fix
144+
echo "Running stylelint-fix"
145+
make stylelint-fix
146+
147+
.PHONY: test-ci
148+
test-ci:
149+
cd /app
150+
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
151+
152+
.PHONY: start-ci
153+
start-ci:
154+
cp .coverage.babel.config.js /app/babel.config.js
155+
cd ../..
156+
yarn start
157+
158+
.PHONY: cypress-ci
159+
cypress-ci:
160+
$(NODE_MODULES)/.bin/wait-on -t 240000 http://localhost:3000
161+
NODE_ENV=development make cypress-run
162+

cypress.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ const { defineConfig } = require('cypress');
22

33
module.exports = defineConfig({
44
viewportWidth: 1280,
5-
defaultCommandTimeout: 5000,
5+
defaultCommandTimeout: 8888,
66
chromeWebSecurity: false,
77
reporter: 'junit',
8-
video: true,
8+
video: false,
99
retries: {
10-
runMode: 1,
10+
runMode: 2,
1111
openMode: 0,
1212
},
1313
reporterOptions: {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eeacms/volto-accordion-block",
3-
"version": "10.4.3",
3+
"version": "10.4.4",
44
"description": "volto-accordion-block: Volto accordion block",
55
"main": "src/index.js",
66
"author": "European Environment Agency: IDM2 A-Team",

src/components/manage/Blocks/Accordion/Edit.jsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ import {
1010
getBlocksLayoutFieldname,
1111
withBlockExtensions,
1212
} from '@plone/volto/helpers';
13+
import { cloneDeepSchema } from '@plone/volto/helpers/Utils/Utils';
1314
import helpSVG from '@plone/volto/icons/help.svg';
14-
import { isEmpty, without, cloneDeep, pickBy } from 'lodash';
15+
import { isEmpty, without, pickBy } from 'lodash';
1516
import React, { useState } from 'react';
1617
import { Button, Segment } from 'semantic-ui-react';
1718
import { defineMessages, useIntl } from 'react-intl';
@@ -131,8 +132,12 @@ const Edit = (props) => {
131132
schemaEnhancer = activeItem?.['schemaEnhancer'];
132133

133134
schema = schemaEnhancer
134-
? schemaEnhancer({ schema: cloneDeep(originalSchema), formData, intl })
135-
: cloneDeep(originalSchema);
135+
? schemaEnhancer({
136+
schema: cloneDeepSchema(originalSchema),
137+
formData,
138+
intl,
139+
})
140+
: cloneDeepSchema(originalSchema);
136141

137142
return schema;
138143
};

0 commit comments

Comments
 (0)