Skip to content

Commit

Permalink
Merge pull request #24 from eea/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
avoinea authored Jan 18, 2024
2 parents 9adfbc0 + 27fbcea commit 96f0d77
Show file tree
Hide file tree
Showing 8 changed files with 221 additions and 145 deletions.
21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,26 @@ 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).

### [0.5.8](https://github.com/eea/volto-slate-label/compare/0.5.7...0.5.8) - 19 October 2023
### [0.5.9](https://github.com/eea/volto-slate-label/compare/0.5.8...0.5.9) - 18 January 2024

#### :house: Internal changes

- chore: [JENKINS] Refactor automated testing [valentinab25 - [`428cb54`](https://github.com/eea/volto-slate-label/commit/428cb54b660c8e5a974cda7752cbfbb27cd6613e)]

#### :hammer_and_wrench: Others

- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`1af52c6`](https://github.com/eea/volto-slate-label/commit/1af52c65d7a4cc0bad42af4aa90684b30ecfe7f2)]
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`104ad23`](https://github.com/eea/volto-slate-label/commit/104ad23fe3e822e5f5b8a21ffdadf60c241aad59)]
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`e1c542c`](https://github.com/eea/volto-slate-label/commit/e1c542c0261c2af5423875ad9227600f5c49dc38)]
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`15c7f19`](https://github.com/eea/volto-slate-label/commit/15c7f198e8ed52e23e9bbd553a871723c022d816)]
- test: [JENKINS] Improve cypress time [valentinab25 - [`58c0846`](https://github.com/eea/volto-slate-label/commit/58c0846d9760317fc031ad5910dcef57d8cf85d7)]
- test: [JENKINS] improve cypress time [valentinab25 - [`5c1dc4d`](https://github.com/eea/volto-slate-label/commit/5c1dc4d6b8bf2d2577458c0005e2fc41961a82a3)]
- test: increase timeout [valentinab25 - [`2ca8d7a`](https://github.com/eea/volto-slate-label/commit/2ca8d7a2cb4b37992b16f6e1e1076a7ae48c965d)]
- test: generate cypress code coverage [valentinab25 - [`8784584`](https://github.com/eea/volto-slate-label/commit/8784584b8933f310533288f36bf9a292b2433a73)]
- test: remove videos [valentinab25 - [`647977c`](https://github.com/eea/volto-slate-label/commit/647977c1f9b35ee511a653470cdb204c33063f92)]
- test: improve cypress testing time [valentinab25 - [`9237c03`](https://github.com/eea/volto-slate-label/commit/9237c034f2ae1bc10d43e320b2d9cdcb39347ae9)]
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`c079112`](https://github.com/eea/volto-slate-label/commit/c0791125167e7bf01e521bf2558d49d039212b33)]
### [0.5.8](https://github.com/eea/volto-slate-label/compare/0.5.7...0.5.8) - 22 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
296 changes: 162 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: 0 additions & 2 deletions cypress/support/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ import './commands';
// Alternatively you can use CommonJS syntax:
// require('./commands')

/* coverage-start
//Generate code-coverage
import '@cypress/code-coverage/support';
coverage-end */

export const slateBeforeEach = (contentType = 'Document') => {
cy.autologin();
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-slate-label",
"version": "0.5.8",
"version": "0.5.9",
"description": "@eeacms/volto-slate-label: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
2 changes: 1 addition & 1 deletion src/editor/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const withLabel = (editor) => {
const { normalizeNode, isInline } = editor;

editor.isInline = (element) => {
return element.type === LABEL ? true : isInline(element);
return element && element.type === LABEL ? true : isInline(element);
};

editor.normalizeNode = (entry) => {
Expand Down

0 comments on commit 96f0d77

Please sign in to comment.