Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
Merge pull request #136 from eea/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
avoinea authored Aug 24, 2021
2 parents 5849f40 + fd71566 commit 8499da4
Show file tree
Hide file tree
Showing 14 changed files with 501 additions and 56 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,30 @@ 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).

#### [2.9.2](https://github.com/eea/volto-slate/compare/2.9.1...2.9.2)

- Fix toolbar position in Link plugin [`#135`](https://github.com/eea/volto-slate/pull/135)
- I18n [`#119`](https://github.com/eea/volto-slate/pull/119)
- Update docker files [`#134`](https://github.com/eea/volto-slate/pull/134)
- Use BlockChooserButton component [`#133`](https://github.com/eea/volto-slate/pull/133)
- cy wait 1000 [`6cd4ec1`](https://github.com/eea/volto-slate/commit/6cd4ec188d652c3c43978fd1612560ad36aa7a89)
- Better fix [`46822c0`](https://github.com/eea/volto-slate/commit/46822c0cf5c8b9603d714b46ebb17cb4544bd807)
- Don't overoptimize calculate toolbar position [`bc28375`](https://github.com/eea/volto-slate/commit/bc283750c8f37855ace5e9e9b3ee2512996b1166)
- Remove production NODE_ENV flag from jenkins [`8c3cab3`](https://github.com/eea/volto-slate/commit/8c3cab3cfe895e6d71badea3a791df3c1aa86fe4)
- Merge develop [`03f842c`](https://github.com/eea/volto-slate/commit/03f842cddf65425077b0258536009ccedd64323e)
- Imrpove docker-compose.yml [`428b568`](https://github.com/eea/volto-slate/commit/428b568f4a762ad90ffdd5b9f0379271b88dc975)
- Fix tests [`008922d`](https://github.com/eea/volto-slate/commit/008922d57bfae3020123a8117e786c669e602fa8)
- Rename babel.config to make tests pass [`28d3c71`](https://github.com/eea/volto-slate/commit/28d3c719c88e46f59b715ef85aafedfc1e3283b1)
- Set NODE_ENV to production [`a7eb4ef`](https://github.com/eea/volto-slate/commit/a7eb4ef9e4d8cc01aaae6a0935b8df8a21abc0e5)
- Update snapshot [`b3beebf`](https://github.com/eea/volto-slate/commit/b3beebf7c7f0c7518c0cccc5bcb8f6db3fdb162a)
- Add i18n artifacts [`7d25290`](https://github.com/eea/volto-slate/commit/7d2529020afb72ba2a558085fbb5c6786153f15e)
- WIP on i18n [`d48e979`](https://github.com/eea/volto-slate/commit/d48e9791131cb2a4f1a32c5da3b90d69169bba45)

#### [2.9.1](https://github.com/eea/volto-slate/compare/2.9.0...2.9.1)

> 13 August 2021
- Release [`#132`](https://github.com/eea/volto-slate/pull/132)
- add handle to unwrap note if empty string [`#129`](https://github.com/eea/volto-slate/pull/129)
- Set CSS class according inline style menu selection paragraph style [`#111`](https://github.com/eea/volto-slate/pull/111)

Expand Down
10 changes: 5 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ pipeline {
])
} finally {
catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') {
junit testResults: 'xunit-reports/junit.xml', allowEmptyResults: true
}
junit testResults: 'xunit-reports/junit.xml', allowEmptyResults: true
}
sh script: '''docker rm -v $BUILD_TAG-volto''', returnStatus: true
}
}
Expand All @@ -91,7 +91,7 @@ pipeline {
sh '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/src/addons/$GIT_NAME/cypress/videos cypress-reports/'''
sh '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/src/addons/$GIT_NAME/cypress/reports cypress-results/'''
coverage = sh script: '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/src/addons/$GIT_NAME/coverage cypress-coverage/''', returnStatus: true
if ( coverage == 0 ) {
if ( coverage == 0 ) {
publishHTML (target : [allowMissing: false,
alwaysLinkToLastBuild: true,
keepAll: true,
Expand All @@ -106,11 +106,11 @@ pipeline {
finally {
catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') {
junit testResults: 'cypress-results/**/*.xml', allowEmptyResults: true
}
}
sh script: "docker stop $BUILD_TAG-plone", returnStatus: true
sh script: "docker rm -v $BUILD_TAG-plone", returnStatus: true
sh script: "docker rm -v $BUILD_TAG-cypress", returnStatus: true

}
}
}
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ test:
test-update:
docker pull plone/volto-addon-ci
docker run -it --rm -e GIT_NAME=volto-slate -e RAZZLE_JEST_CONFIG=jest-addon.config.js -v "$$(pwd):/opt/frontend/my-volto-project/src/addons/volto-slate" plone/volto-addon-ci yarn test --watchAll=false -u

.PHONY: test-acceptance-server
test-acceptance-server: ## Run test acceptance server
docker run -i --rm --name=plone -e ZSERVER_HOST=0.0.0.0 -e ZSERVER_PORT=55001 -p 55001:55001 -e SITE=plone -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,kitconcept.volto:default-homepage -e CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,kitconcept.volto,kitconcept.volto.cors -e ADDONS='plone.app.robotframework plone.app.contenttypes plone.restapi kitconcept.volto' plone ./bin/robot-server plone.app.robotframework.testing.PLONE_ROBOT_TESTING

#
# build-frontend:
# yarn && RAZZLE_API_PATH=http://localhost:55001/plone yarn build
Expand Down
1 change: 1 addition & 0 deletions babel.config.js-use-with-i18n
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@plone/volto/babel');
6 changes: 4 additions & 2 deletions cypress/integration/04-block-focus.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ describe('Block Tests', () => {
'Colorless green ideas sleep furiously.',
).setSelection('furiously');

cy.wait(500);
cy.wait(1000);

cy.get('.slate-inline-toolbar .button-wrapper a[title="Link"]').click();
cy.get('.sidebar-container a.item:nth-child(3)').click();
cy.get('input[name="external_link-0-external"]').click().type('https://google.com{enter}');
cy.get('input[name="external_link-0-external"]')
.click()
.type('https://google.com{enter}');
cy.get('.sidebar-container .form .header button:first-of-type').click();

cy.get('#toolbar-save').click();
Expand Down
40 changes: 40 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: "3"
services:

volto:
image: plone/volto-addon-ci
environment:
- GIT_NAME=volto-slate
- RAZZLE_JEST_CONFIG=jest-addon.config.js
volumes:
- .:/opt/frontend/my-volto-project/src/addons/volto-slate
# - ./project/package.json:/opt/frontend/my-volto-project/package.json
# - ./jest-addon.config.js:/opt/frontend/my-volto-project/jest-addon.config.js
command: cat
stdin_open: true
tty: true
working_dir: /opt/frontend/my-volto-project

# user: root
# entrypoint: sh -c 'tail -f /dev/null'

ci:
image: plone/volto-addon-ci
environment:
- GIT_NAME=volto-slate
- RAZZLE_JEST_CONFIG=jest-addon.config.js
- RAZZLE_API_PATH="http://plone:55001/plone"
- CYPRESS_BACKEND_HOST="plone"
- GIT_BRANCH=i18n
entrypoint: sh -c "tail -f /dev/null"
# command: cypress
# command: cat
# stdin_open: true
# tty: true
# working_dir: /opt/frontend/my-volto-project

# project/node_modules/.bin/start-test ci:test-acceptance-server http-get://localhost:55001/plone 'docker run -i -e RAZZLE_API_PATH="http://plone:55001/plone" -e CYPRESS_BACKEND_HOST="plone" --name="cypress" -e DEPENDENCIES="" -e GI
# T_NAME=volto-slate plone/volto-addon-ci cypress'

# docker run -it --rm -e GIT_NAME=volto-slate -e RAZZLE_JEST_CONFIG=jest-addon.config.js
# -v "$$(pwd):/opt/frontend/my-volto-project/src/addons/volto-slate" plone/volto-addon-ci yarn test --watchAll=false
175 changes: 175 additions & 0 deletions locales/volto.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
msgid ""
msgstr ""
"Project-Id-Version: Plone\n"
"POT-Creation-Date: 2021-07-12T13:13:36.922Z\n"
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"Language-Code: en\n"
"Language-Name: English\n"
"Preferred-Encodings: utf-8\n"
"Domain: volto\n"

#: editor/plugins/SimpleLink/index
# defaultMessage: Add link
msgid "Add link"
msgstr ""

#: editor/plugins/StyleMenu/StyleMenu
# defaultMessage: All Styles Applied
msgid "All Styles Applied"
msgstr ""

#: widgets/BlocksBrowser/BlocksBrowserNav
# defaultMessage: Back
msgid "Back"
msgstr ""

#: widgets/BlocksBrowser/BlocksBrowserNav
# defaultMessage: Browse
msgid "Browse"
msgstr ""

#: blocks/Table/Edit
# defaultMessage: Cell
msgid "Cell"
msgstr ""

#: widgets/BlocksBrowser/BlocksBrowserBody
# defaultMessage: Choose Target
msgid "Choose Target"
msgstr ""

#: widgets/BlocksBrowser/BlocksBrowserWidget
# defaultMessage: Delete
msgid "Delete"
msgstr ""

#: blocks/Table/Edit
# defaultMessage: Delete col
msgid "Delete col"
msgstr ""

#: blocks/Table/Edit
# defaultMessage: Delete row
msgid "Delete row"
msgstr ""

#: blocks/Table/Edit
# defaultMessage: Divide each row into separate cells
msgid "Divide each row into separate cells"
msgstr ""

#: widgets/BlocksBrowser/BlocksBrowserWidget
# defaultMessage: Edit
msgid "Edit"
msgstr ""

#: components/ElementEditor/messages
# defaultMessage: Edit element
msgid "Edit element"
msgstr ""

#: editor/plugins/Link/index
#: editor/plugins/SimpleLink/index
# defaultMessage: Edit link
msgid "Edit link"
msgstr ""

#: blocks/Table/Edit
# defaultMessage: Fixed width table cells
msgid "Fixed width table cells"
msgstr ""

#: editor/plugins/StyleMenu/StyleMenu
# defaultMessage: Font Style
msgid "Font Style"
msgstr ""

#: blocks/Table/Edit
# defaultMessage: Insert col after
msgid "Insert col after"
msgstr ""

#: blocks/Table/Edit
# defaultMessage: Insert col before
msgid "Insert col before"
msgstr ""

#: blocks/Table/Edit
# defaultMessage: Insert row after
msgid "Insert row after"
msgstr ""

#: blocks/Table/Edit
# defaultMessage: Insert row before
msgid "Insert row before"
msgstr ""

#: blocks/Table/Edit
# defaultMessage: Make the table compact
msgid "Make the table compact"
msgstr ""

#: editor/plugins/StyleMenu/StyleMenu
# defaultMessage: No Style
msgid "No Style"
msgstr ""

#: widgets/BlocksBrowser/BlocksBrowserWidget
# defaultMessage: No items selected
msgid "No items selected"
msgstr ""

#: widgets/BlocksBrowser/BlocksBrowserWidget
# defaultMessage: Open object browser
msgid "Open object browser"
msgstr ""

#: editor/plugins/StyleMenu/StyleMenu
# defaultMessage: Paragraph Style
msgid "Paragraph Style"
msgstr ""

#: blocks/Table/Edit
# defaultMessage: Reduce complexity
msgid "Reduce complexity"
msgstr ""

#: components/ElementEditor/messages
# defaultMessage: Remove element
msgid "Remove element"
msgstr ""

#: editor/plugins/Link/index
# defaultMessage: Remove link
msgid "Remove link"
msgstr ""

#: widgets/BlocksBrowser/BlocksBrowserNav
# defaultMessage: Select
msgid "Select"
msgstr ""

#: blocks/Table/Edit
# defaultMessage: Stripe alternate rows with color
msgid "Stripe alternate rows with color"
msgstr ""

#: blocks/Table/Edit
# defaultMessage: Table
msgid "Table"
msgstr ""

#: blocks/Table/Edit
# defaultMessage: Table color inverted
msgid "Table color inverted"
msgstr ""

#: blocks/Text/TextBlockEdit
# defaultMessage: Type text…
msgid "Type text…"
msgstr ""
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "volto-slate",
"version": "2.9.1",
"version": "2.9.2",
"description": "Slate.js integration with Volto",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down Expand Up @@ -60,6 +60,13 @@
"lint": "../../../node_modules/eslint/bin/eslint.js --max-warnings=0 'src/**/*.{js,jsx}'",
"lint:fix": "../../../node_modules/eslint/bin/eslint.js --fix 'src/**/*.{js,jsx}'",
"cypress:run": "if [ -d ./project ]; then ./project/node_modules/cypress/bin/cypress run; else ../../../node_modules/cypress/bin/cypress run; fi",
"cypress:open": "if [ -d ./project ]; then ./project/node_modules/cypress/bin/cypress open; else ../../../node_modules/cypress/bin/cypress open; fi"
"cypress:open": "if [ -d ./project ]; then ./project/node_modules/cypress/bin/cypress open; else ../../../node_modules/cypress/bin/cypress open; fi",
"i18n": "rm -rf build/messages && NODE_ENV=production node src/i18n.js",
"cypress:start-frontend": "cd ../../../ && RAZZLE_API_PATH=http://localhost:55001/plone yarn start",
"ci:cypress:run": "make cypress",
"ci:cypress": "start-test ci:test-acceptance-server http-get://localhost:55001/plone ci:cypress:run",
"ci:test-acceptance-server": "make test-acceptance-server",
"cy:test:fixture:setup": "node cypress/support/reset-fixture.js",
"cy:test:fixture:teardown": "node cypress/support/reset-fixture.js teardown"
}
}
Loading

0 comments on commit 8499da4

Please sign in to comment.