@eeacms/volto-eea-website-theme 1.22.1 → 1.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -10
- package/RELEASE.md +14 -14
- package/jest-addon.config.js +3 -0
- package/package.json +3 -3
- package/src/config.js +27 -15
- package/src/customizations/@plone/volto-slate/editor/extensions/normalizeExternalData.js +9 -0
- package/src/customizations/volto/components/manage/Blocks/Image/Edit.test.jsx +312 -0
- package/src/customizations/volto/components/manage/Form/Form.test.jsx +1124 -0
- package/src/customizations/volto/components/manage/Widgets/ObjectBrowserWidget.test.jsx +193 -0
- package/src/customizations/volto/components/theme/Comments/Comments.test.jsx +407 -0
- package/src/customizations/volto/components/theme/Header/Header.test.jsx +326 -0
- package/src/index.js +90 -15
- package/src/index.test.js +343 -0
- package/src/customizations/@eeacms/volto-tabs-block/components/templates/default/schema.js +0 -109
- package/src/customizations/@eeacms/volto-tabs-block/components/templates/horizontal-responsive/schema.js +0 -109
package/CHANGELOG.md
CHANGED
@@ -4,6 +4,27 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
4
4
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
6
6
|
|
7
|
+
### [1.23.0](https://github.com/eea/volto-eea-website-theme/compare/1.22.1...1.23.0) - 2 November 2023
|
8
|
+
|
9
|
+
#### :rocket: New Features
|
10
|
+
|
11
|
+
- feat(header): updated environmental information systems websites #251860 [David Ichim - [`647a818`](https://github.com/eea/volto-eea-website-theme/commit/647a818cefc9b24464e282e1ff31b9bc56a01d55)]
|
12
|
+
|
13
|
+
#### :bug: Bug Fixes
|
14
|
+
|
15
|
+
- fix: customize normalizeExternalData until the #5347 is merged in volto core - refs #259857 [dobri1408 - [`19c88a9`](https://github.com/eea/volto-eea-website-theme/commit/19c88a9910646f166e6317a86c6b0ad759b1bd12)]
|
16
|
+
|
17
|
+
#### :house: Internal changes
|
18
|
+
|
19
|
+
- chore: husky, lint-staged use fixed versions [valentinab25 - [`6d15088`](https://github.com/eea/volto-eea-website-theme/commit/6d150886c5aeb2ca0b569270486e60f7cc274e2c)]
|
20
|
+
- chore:volto 16 in tests, update docs, fix stylelint overrides [valentinab25 - [`20c0323`](https://github.com/eea/volto-eea-website-theme/commit/20c032380b33c0077c869a05136f93e2fb68e5d4)]
|
21
|
+
|
22
|
+
#### :hammer_and_wrench: Others
|
23
|
+
|
24
|
+
- bump package version preparing for release [David Ichim - [`cb88e7c`](https://github.com/eea/volto-eea-website-theme/commit/cb88e7c64bb5ac307504e80203ef03dde9420922)]
|
25
|
+
- Moved function to top and added jsdoc [David Ichim - [`2fe74e3`](https://github.com/eea/volto-eea-website-theme/commit/2fe74e332c51caf6f2571b19a75c74174925a3e4)]
|
26
|
+
- Tab variations only if we have variation support [David Ichim - [`f086102`](https://github.com/eea/volto-eea-website-theme/commit/f086102fce8ef103e5d18907a58c1b84f9b7f4e8)]
|
27
|
+
- * test: add unit tests - refs #254313 [ana-oprea - [`a14ecb4`](https://github.com/eea/volto-eea-website-theme/commit/a14ecb4f1b40fad88787041658a126a4a2bb69f9)]
|
7
28
|
### [1.22.1](https://github.com/eea/volto-eea-website-theme/compare/1.22.0...1.22.1) - 29 September 2023
|
8
29
|
|
9
30
|
#### :house: Documentation changes
|
@@ -180,7 +201,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
180
201
|
|
181
202
|
#### :house: Internal changes
|
182
203
|
|
183
|
-
- chore: [JENKINS] Deprecate circularity website [valentinab25 - [`370dcbf`](https://github.com/eea/volto-eea-website-theme/commit/370dcbfbf1a8135ce7b1b3b271b004552a631837)]
|
184
204
|
|
185
205
|
#### :hammer_and_wrench: Others
|
186
206
|
|
@@ -336,7 +356,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
336
356
|
|
337
357
|
#### :hammer_and_wrench: Others
|
338
358
|
|
339
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`6c5e2f8`](https://github.com/eea/volto-eea-website-theme/commit/6c5e2f80456e2061d9e9c15fd0a0b91b9ac70568)]
|
340
359
|
### [1.9.1](https://github.com/eea/volto-eea-website-theme/compare/1.9.0...1.9.1) - 28 February 2023
|
341
360
|
|
342
361
|
#### :bug: Bug Fixes
|
@@ -483,7 +502,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
483
502
|
|
484
503
|
- For some reasons types is a string [Alin Voinea - [`3769a09`](https://github.com/eea/volto-eea-website-theme/commit/3769a0981181d5b633f3498daebbe96be8b4b833)]
|
485
504
|
- Fix(redirect): o.filter - refs #157627 [Alin Voinea - [`deb23da`](https://github.com/eea/volto-eea-website-theme/commit/deb23da846444cc96539697fd798429ae0abe89e)]
|
486
|
-
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`f1fffc5`](https://github.com/eea/volto-eea-website-theme/commit/f1fffc5db96725440863d545580b4e76cce4b796)]
|
487
505
|
### [1.5.0](https://github.com/eea/volto-eea-website-theme/compare/1.4.2...1.5.0) - 9 January 2023
|
488
506
|
|
489
507
|
#### :hammer_and_wrench: Others
|
@@ -517,7 +535,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
517
535
|
|
518
536
|
- Release 1.4.0 [Alin Voinea - [`bd42a0d`](https://github.com/eea/volto-eea-website-theme/commit/bd42a0d26e928cac5d99933194755da3db06b341)]
|
519
537
|
- bump version to use as volto-eea-design-system [David Ichim - [`f4be047`](https://github.com/eea/volto-eea-website-theme/commit/f4be047328b46399b03b612d378b18aaf82e7dc1)]
|
520
|
-
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`9b7cfef`](https://github.com/eea/volto-eea-website-theme/commit/9b7cfefb4d34fc1c948015e491feb370f9795bd8)]
|
521
538
|
- test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`df252a9`](https://github.com/eea/volto-eea-website-theme/commit/df252a9bfed0bb86cadf53c59dd1603b1e2cd822)]
|
522
539
|
### [1.3.2](https://github.com/eea/volto-eea-website-theme/compare/1.3.1...1.3.2) - 16 December 2022
|
523
540
|
|
@@ -527,7 +544,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
527
544
|
|
528
545
|
#### :hammer_and_wrench: Others
|
529
546
|
|
530
|
-
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`a43c658`](https://github.com/eea/volto-eea-website-theme/commit/a43c658a7920c8df95e763b9a637f38ce77eba2c)]
|
531
547
|
- Better razzle.config [Tiberiu Ichim - [`81dbf48`](https://github.com/eea/volto-eea-website-theme/commit/81dbf48815fb27facb4f82c9b764540fdf188b2e)]
|
532
548
|
- Better razzle.config [Tiberiu Ichim - [`7bc9da2`](https://github.com/eea/volto-eea-website-theme/commit/7bc9da2cd837ab62a95cd29979cdd9b0055b7d67)]
|
533
549
|
### [1.3.1](https://github.com/eea/volto-eea-website-theme/compare/1.3.0...1.3.1) - 28 November 2022
|
@@ -538,7 +554,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
538
554
|
|
539
555
|
#### :hammer_and_wrench: Others
|
540
556
|
|
541
|
-
- yarn 3 [Alin Voinea - [`ea7a709`](https://github.com/eea/volto-eea-website-theme/commit/ea7a7094945312776e9b6f44e371178603e92139)]
|
542
557
|
### [1.3.0](https://github.com/eea/volto-eea-website-theme/compare/1.2.0...1.3.0) - 22 November 2022
|
543
558
|
|
544
559
|
#### :rocket: New Features
|
@@ -579,7 +594,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
579
594
|
- Add subsite class to body [Tiberiu Ichim - [`74d700f`](https://github.com/eea/volto-eea-website-theme/commit/74d700fbfd6249a8604762a7e4e49cce857db0f3)]
|
580
595
|
- Add subsite info to header [Tiberiu Ichim - [`47daf8b`](https://github.com/eea/volto-eea-website-theme/commit/47daf8bb6374a1222040626b19d4154df7ba1b83)]
|
581
596
|
- fix eslint [Miu Razvan - [`eb8d0a7`](https://github.com/eea/volto-eea-website-theme/commit/eb8d0a790bc70c0aae256c6ff35f63c4885f338e)]
|
582
|
-
- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`cc578a4`](https://github.com/eea/volto-eea-website-theme/commit/cc578a413b205a8e61e091fab3a88f94cedefc89)]
|
583
597
|
### [1.1.0](https://github.com/eea/volto-eea-website-theme/compare/1.0.0...1.1.0) - 28 October 2022
|
584
598
|
|
585
599
|
#### :nail_care: Enhancements
|
@@ -627,7 +641,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
627
641
|
|
628
642
|
#### :hammer_and_wrench: Others
|
629
643
|
|
630
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`33b56ac`](https://github.com/eea/volto-eea-website-theme/commit/33b56acb13fbaf0c5b79e8fc6e13c4b699c79c90)]
|
631
644
|
### [0.7.3](https://github.com/eea/volto-eea-website-theme/compare/0.7.2...0.7.3) - 22 September 2022
|
632
645
|
|
633
646
|
#### :hammer_and_wrench: Others
|
@@ -895,7 +908,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
895
908
|
- Header refactor, add custom logo #5 [ichim-david - [`4950235`](https://github.com/eea/volto-eea-website-theme/commit/49502358105437cfeac3b144e6d301cb59aa2346)]
|
896
909
|
- Update footer.config with new publication card component [ichim-david - [`2e38e9a`](https://github.com/eea/volto-eea-website-theme/commit/2e38e9a417f835009d60c80d4eb4b30229f55e45)]
|
897
910
|
- feature(breadcrumbs): implement eea-design-system breadcrumb as Volto component #32 #7 [ichim-david - [`181af41`](https://github.com/eea/volto-eea-website-theme/commit/181af4125ce2b9ddac56dab4723cb11c26633221)]
|
898
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`da8ceb6`](https://github.com/eea/volto-eea-website-theme/commit/da8ceb68ea68bfbc9504e48ccd4d68277f11ab9a)]
|
899
911
|
- use breadcrumbs from eea-design-system [nileshgulia1 - [`db2f9e9`](https://github.com/eea/volto-eea-website-theme/commit/db2f9e9a4327420a3cce9a9903cd88549b129eab)]
|
900
912
|
- Update theme.config [ichim-david - [`8eca4f4`](https://github.com/eea/volto-eea-website-theme/commit/8eca4f40397a4aeca6d39029c92db78968d37064)]
|
901
913
|
- Added keyContent component to theme.config [ichim-david - [`d86f202`](https://github.com/eea/volto-eea-website-theme/commit/d86f202d0274d839487a88b51cae9a0e899beb23)]
|
@@ -937,5 +949,4 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
937
949
|
|
938
950
|
#### :hammer_and_wrench: Others
|
939
951
|
|
940
|
-
- yarn bootstrap [Alin Voinea - [`6995e9e`](https://github.com/eea/volto-eea-website-theme/commit/6995e9e091f21fdbbdffa8a44fc0e2c626f6d46a)]
|
941
952
|
- Initial commit [Alin Voinea - [`6a9c03a`](https://github.com/eea/volto-eea-website-theme/commit/6a9c03a7cebe71ca87e82cf58c42904063e9d8d3)]
|
package/RELEASE.md
CHANGED
@@ -20,9 +20,9 @@ You need to first install the [release-it](https://github.com/release-it/release
|
|
20
20
|
```
|
21
21
|
npm install -g release-it
|
22
22
|
```
|
23
|
-
|
23
|
+
|
24
24
|
Release-it uses the configuration written in the [`.release-it.json`](./.release-it.json) file located in the root of the repository.
|
25
|
-
|
25
|
+
|
26
26
|
Release-it is a tool that automates 4 important steps in the release process:
|
27
27
|
|
28
28
|
1. Version increase in `package.json` ( increased from the current version in `package.json`)
|
@@ -30,45 +30,45 @@ Release-it is a tool that automates 4 important steps in the release process:
|
|
30
30
|
3. GitHub release on the commit with the changelog and package.json modification on the develop branch
|
31
31
|
4. NPM release ( by default it's disabled, but can be enabled in the configuration file )
|
32
32
|
|
33
|
-
To configure the authentification, you need to export GITHUB_TOKEN for [GitHub](https://github.com/settings/tokens)
|
33
|
+
To configure the authentification, you need to export GITHUB_TOKEN for [GitHub](https://github.com/settings/tokens)
|
34
34
|
|
35
35
|
```
|
36
36
|
export GITHUB_TOKEN=XXX-XXXXXXXXXXXXXXXXXXXXXX
|
37
37
|
```
|
38
|
-
|
38
|
+
|
39
39
|
To configure npm, you can use the `npm login` command or use a configuration file with a TOKEN :
|
40
|
-
|
40
|
+
|
41
41
|
```
|
42
42
|
echo "//registry.npmjs.org/:_authToken=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" > .npmrc
|
43
43
|
```
|
44
44
|
|
45
45
|
#### Using release-it tool
|
46
|
-
|
46
|
+
|
47
47
|
There are 3 yarn scripts that can be run to do the release
|
48
48
|
|
49
49
|
##### yarn release-beta
|
50
50
|
|
51
|
-
Automatically calculates and presents 3 beta versions - patch, minor and major for you to choose ( or Other for manual input).
|
51
|
+
Automatically calculates and presents 3 beta versions - patch, minor and major for you to choose ( or Other for manual input).
|
52
52
|
|
53
53
|
```
|
54
|
-
? Select increment (next version):
|
55
|
-
❯ prepatch (0.1.1-beta.0)
|
56
|
-
preminor (0.2.0-beta.0)
|
57
|
-
premajor (1.0.0-beta.0)
|
58
|
-
Other, please specify...
|
54
|
+
? Select increment (next version):
|
55
|
+
❯ prepatch (0.1.1-beta.0)
|
56
|
+
preminor (0.2.0-beta.0)
|
57
|
+
premajor (1.0.0-beta.0)
|
58
|
+
Other, please specify...
|
59
59
|
```
|
60
60
|
|
61
61
|
##### yarn release-major-beta
|
62
62
|
|
63
63
|
Same as `yarn release-beta`, but with premajor version pre-selected.
|
64
|
-
|
64
|
+
|
65
65
|
##### yarn release
|
66
66
|
|
67
67
|
Generic command, does not automatically add the `beta` to version, but you can still manually write it if you choose Other.
|
68
68
|
|
69
69
|
#### Important notes
|
70
70
|
|
71
|
-
> Do not use release-it tool on master branch, the commit on CHANGELOG.md file and the version increase in the package.json file can't be done without a PULL REQUEST.
|
71
|
+
> Do not use release-it tool on master branch, the commit on CHANGELOG.md file and the version increase in the package.json file can't be done without a PULL REQUEST.
|
72
72
|
|
73
73
|
> Do not keep Pull Requests from develop to master branches open when you are doing beta releases from the develop branch. As long as a PR to master is open, an automatic script will run on every commit and will update both the version and the changelog to a production-ready state - ( MAJOR.MINOR.PATCH mandatory format for version).
|
74
74
|
|
package/jest-addon.config.js
CHANGED
@@ -25,6 +25,9 @@ module.exports = {
|
|
25
25
|
'^.+\\.(jpg)$': 'jest-file',
|
26
26
|
'^.+\\.(svg)$': './node_modules/@plone/volto/jest-svgsystem-transform.js',
|
27
27
|
},
|
28
|
+
transformIgnorePatterns: [
|
29
|
+
'node_modules/(?!@eeacms)/volto-eea-design-system/ui',
|
30
|
+
],
|
28
31
|
coverageThreshold: {
|
29
32
|
global: {
|
30
33
|
branches: 0,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@eeacms/volto-eea-website-theme",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.23.0",
|
4
4
|
"description": "@eeacms/volto-eea-website-theme: Volto add-on",
|
5
5
|
"main": "src/index.js",
|
6
6
|
"author": "European Environment Agency: IDM2 A-Team",
|
@@ -31,8 +31,8 @@
|
|
31
31
|
"@cypress/code-coverage": "^3.10.0",
|
32
32
|
"@plone/scripts": "*",
|
33
33
|
"babel-plugin-transform-class-properties": "^6.24.1",
|
34
|
-
"husky": "
|
35
|
-
"lint-staged": "
|
34
|
+
"husky": "^8.0.3",
|
35
|
+
"lint-staged": "^14.0.1",
|
36
36
|
"md5": "^2.3.0",
|
37
37
|
"postcss-less": "6.0.0"
|
38
38
|
},
|
package/src/config.js
CHANGED
@@ -194,36 +194,48 @@ export const headerOpts = {
|
|
194
194
|
title: 'Environmental information systems',
|
195
195
|
links: [
|
196
196
|
{
|
197
|
-
title: '
|
198
|
-
href: 'https://
|
197
|
+
title: 'European Environment Agency website',
|
198
|
+
href: 'https://www.eea.europa.eu',
|
199
199
|
},
|
200
200
|
{
|
201
|
-
title: '
|
202
|
-
href: 'https://
|
201
|
+
title: 'WISE marine - Marine information system for Europe',
|
202
|
+
href: 'https://water.europa.eu/marine',
|
203
203
|
},
|
204
204
|
{
|
205
|
-
title: '
|
206
|
-
href: 'https://
|
205
|
+
title: 'WISE freshwater - Freshwater information system for Europe',
|
206
|
+
href: 'https://water.europa.eu/freshwater',
|
207
207
|
},
|
208
208
|
{
|
209
|
-
title: '
|
210
|
-
href: 'https://
|
209
|
+
title: 'BISE - Biodiversity information system for Europe',
|
210
|
+
href: 'https://biodiversity.europa.eu',
|
211
211
|
},
|
212
212
|
{
|
213
|
-
title: 'Forest
|
213
|
+
title: 'FISE - Forest information system for Europe',
|
214
214
|
href: 'https://forest.eea.europa.eu/',
|
215
215
|
},
|
216
216
|
{
|
217
|
-
title: '
|
218
|
-
href: 'https://
|
217
|
+
title: 'European Climate and health observatory',
|
218
|
+
href: 'https://climate-adapt.eea.europa.eu/en/observatory',
|
219
219
|
},
|
220
220
|
{
|
221
|
-
title: '
|
222
|
-
href: 'https://
|
221
|
+
title: 'ClimateADAPT',
|
222
|
+
href: 'https://climate-adapt.eea.europa.eu/',
|
223
223
|
},
|
224
224
|
{
|
225
|
-
title: '
|
226
|
-
href: 'https://
|
225
|
+
title: 'European Industrial Emissions Portal',
|
226
|
+
href: 'https://industry.eea.europa.eu',
|
227
|
+
},
|
228
|
+
{
|
229
|
+
title: 'Climate and energy in the EU',
|
230
|
+
href: 'https://climate-energy.eea.europa.eu',
|
231
|
+
},
|
232
|
+
{
|
233
|
+
title: 'Copernicus Land Monitoring Service',
|
234
|
+
href: 'https://land.copernicus.eu/en',
|
235
|
+
},
|
236
|
+
{
|
237
|
+
title: 'Copernicus InSitu',
|
238
|
+
href: 'https://insitu.copernicus.eu',
|
227
239
|
},
|
228
240
|
],
|
229
241
|
},
|
@@ -0,0 +1,9 @@
|
|
1
|
+
// To be removed when https://github.com/plone/volto/pull/5347 is merged and released in Volto 16.x
|
2
|
+
import { normalizeExternalData as normalize } from '@plone/volto-slate/utils';
|
3
|
+
|
4
|
+
export function normalizeExternalData(editor) {
|
5
|
+
editor.normalizeExternalData = (fragment) => {
|
6
|
+
return normalize(editor, fragment);
|
7
|
+
};
|
8
|
+
return editor;
|
9
|
+
}
|
@@ -0,0 +1,312 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { render } from '@testing-library/react';
|
3
|
+
import { Provider } from 'react-intl-redux';
|
4
|
+
import configureMockStore from 'redux-mock-store';
|
5
|
+
import Edit from './Edit';
|
6
|
+
import config from '@plone/volto/registry';
|
7
|
+
import '@testing-library/jest-dom/extend-expect';
|
8
|
+
|
9
|
+
const mockStore = configureMockStore();
|
10
|
+
const { settings } = config;
|
11
|
+
|
12
|
+
let store;
|
13
|
+
|
14
|
+
config.blocks.blocksConfig = {
|
15
|
+
image: {
|
16
|
+
id: 'image',
|
17
|
+
title: 'Image',
|
18
|
+
group: 'media',
|
19
|
+
extensions: {},
|
20
|
+
variations: [],
|
21
|
+
restricted: false,
|
22
|
+
mostUsed: true,
|
23
|
+
sidebarTab: 1,
|
24
|
+
security: {
|
25
|
+
addPermission: [],
|
26
|
+
view: [],
|
27
|
+
},
|
28
|
+
},
|
29
|
+
};
|
30
|
+
const blockId = '1234';
|
31
|
+
|
32
|
+
describe('Edit', () => {
|
33
|
+
beforeEach(() => {
|
34
|
+
store = mockStore({
|
35
|
+
content: {
|
36
|
+
create: {},
|
37
|
+
data: {},
|
38
|
+
subrequests: {
|
39
|
+
[blockId]: {},
|
40
|
+
},
|
41
|
+
},
|
42
|
+
intl: {
|
43
|
+
locale: 'en',
|
44
|
+
messages: {},
|
45
|
+
},
|
46
|
+
});
|
47
|
+
});
|
48
|
+
|
49
|
+
it('should render without errors', () => {
|
50
|
+
const { container } = render(
|
51
|
+
<Provider store={store}>
|
52
|
+
<Edit
|
53
|
+
data={{
|
54
|
+
url: 'http://localhost:8080/Plone/image',
|
55
|
+
'@type': 'image',
|
56
|
+
align: 'full',
|
57
|
+
}}
|
58
|
+
selected={false}
|
59
|
+
block={blockId}
|
60
|
+
content={{}}
|
61
|
+
request={{
|
62
|
+
loading: false,
|
63
|
+
loaded: false,
|
64
|
+
}}
|
65
|
+
pathname="/news"
|
66
|
+
onChangeBlock={() => {}}
|
67
|
+
onSelectBlock={() => {}}
|
68
|
+
onDeleteBlock={() => {}}
|
69
|
+
createContent={() => {}}
|
70
|
+
onFocusPreviousBlock={() => {}}
|
71
|
+
onFocusNextBlock={() => {}}
|
72
|
+
handleKeyDown={() => {}}
|
73
|
+
index={1}
|
74
|
+
openObjectBrowser={() => {}}
|
75
|
+
/>
|
76
|
+
</Provider>,
|
77
|
+
);
|
78
|
+
|
79
|
+
settings.internalApiPath = 'http://localhost:8080/Plone';
|
80
|
+
|
81
|
+
expect(container.querySelector('.block.image.align')).toBeInTheDocument();
|
82
|
+
expect(
|
83
|
+
container.querySelector('.image-block-container'),
|
84
|
+
).toBeInTheDocument();
|
85
|
+
expect(container.querySelector('.copyright-wrapper')).toBeInTheDocument();
|
86
|
+
});
|
87
|
+
|
88
|
+
it('should render without errors', () => {
|
89
|
+
const { container } = render(
|
90
|
+
<Provider store={store}>
|
91
|
+
<Edit
|
92
|
+
data={{
|
93
|
+
url: 'http://localhost:8080/Plone/image',
|
94
|
+
'@type': 'image',
|
95
|
+
size: 'l',
|
96
|
+
copyright: 'Copyright',
|
97
|
+
}}
|
98
|
+
selected={false}
|
99
|
+
block={blockId}
|
100
|
+
content={{}}
|
101
|
+
request={{
|
102
|
+
loading: false,
|
103
|
+
loaded: false,
|
104
|
+
}}
|
105
|
+
pathname="/news"
|
106
|
+
onChangeBlock={() => {}}
|
107
|
+
onSelectBlock={() => {}}
|
108
|
+
onDeleteBlock={() => {}}
|
109
|
+
createContent={() => {}}
|
110
|
+
onFocusPreviousBlock={() => {}}
|
111
|
+
onFocusNextBlock={() => {}}
|
112
|
+
handleKeyDown={() => {}}
|
113
|
+
index={1}
|
114
|
+
openObjectBrowser={() => {}}
|
115
|
+
/>
|
116
|
+
</Provider>,
|
117
|
+
);
|
118
|
+
|
119
|
+
settings.internalApiPath = 'http://localhost:8080/Plone';
|
120
|
+
|
121
|
+
expect(container.querySelector('.block.image.align')).toBeInTheDocument();
|
122
|
+
expect(
|
123
|
+
container.querySelector('.image-block-container'),
|
124
|
+
).toBeInTheDocument();
|
125
|
+
expect(container.querySelector('.copyright-wrapper')).toBeInTheDocument();
|
126
|
+
});
|
127
|
+
|
128
|
+
it('should render without errors', () => {
|
129
|
+
const { container } = render(
|
130
|
+
<Provider store={store}>
|
131
|
+
<Edit
|
132
|
+
data={{
|
133
|
+
url: 'http://localhost:8080/Plone/image',
|
134
|
+
'@type': 'image',
|
135
|
+
size: 'm',
|
136
|
+
}}
|
137
|
+
selected={false}
|
138
|
+
block={blockId}
|
139
|
+
content={{}}
|
140
|
+
request={{
|
141
|
+
loading: false,
|
142
|
+
loaded: false,
|
143
|
+
}}
|
144
|
+
pathname="/news"
|
145
|
+
onChangeBlock={() => {}}
|
146
|
+
onSelectBlock={() => {}}
|
147
|
+
onDeleteBlock={() => {}}
|
148
|
+
createContent={() => {}}
|
149
|
+
onFocusPreviousBlock={() => {}}
|
150
|
+
onFocusNextBlock={() => {}}
|
151
|
+
handleKeyDown={() => {}}
|
152
|
+
index={1}
|
153
|
+
openObjectBrowser={() => {}}
|
154
|
+
/>
|
155
|
+
</Provider>,
|
156
|
+
);
|
157
|
+
|
158
|
+
settings.internalApiPath = 'http://localhost:8080/Plone';
|
159
|
+
|
160
|
+
expect(container.querySelector('.block.image.align')).toBeInTheDocument();
|
161
|
+
expect(
|
162
|
+
container.querySelector('.image-block-container'),
|
163
|
+
).toBeInTheDocument();
|
164
|
+
expect(container.querySelector('.copyright-wrapper')).toBeInTheDocument();
|
165
|
+
});
|
166
|
+
|
167
|
+
it('should render without errors', () => {
|
168
|
+
const { container } = render(
|
169
|
+
<Provider store={store}>
|
170
|
+
<Edit
|
171
|
+
data={{
|
172
|
+
url: 'http://localhost:8080/Plone/image',
|
173
|
+
'@type': 'image',
|
174
|
+
size: 's',
|
175
|
+
}}
|
176
|
+
selected={false}
|
177
|
+
block={blockId}
|
178
|
+
content={{}}
|
179
|
+
request={{
|
180
|
+
loading: false,
|
181
|
+
loaded: false,
|
182
|
+
}}
|
183
|
+
pathname="/news"
|
184
|
+
onChangeBlock={() => {}}
|
185
|
+
onSelectBlock={() => {}}
|
186
|
+
onDeleteBlock={() => {}}
|
187
|
+
createContent={() => {}}
|
188
|
+
onFocusPreviousBlock={() => {}}
|
189
|
+
onFocusNextBlock={() => {}}
|
190
|
+
handleKeyDown={() => {}}
|
191
|
+
index={1}
|
192
|
+
openObjectBrowser={() => {}}
|
193
|
+
/>
|
194
|
+
</Provider>,
|
195
|
+
);
|
196
|
+
|
197
|
+
settings.internalApiPath = 'http://localhost:8080/Plone';
|
198
|
+
|
199
|
+
expect(container.querySelector('.block.image.align')).toBeInTheDocument();
|
200
|
+
expect(
|
201
|
+
container.querySelector('.image-block-container'),
|
202
|
+
).toBeInTheDocument();
|
203
|
+
expect(container.querySelector('.copyright-wrapper')).toBeInTheDocument();
|
204
|
+
});
|
205
|
+
|
206
|
+
it('should render without errors', () => {
|
207
|
+
const { container } = render(
|
208
|
+
<Provider store={store}>
|
209
|
+
<Edit
|
210
|
+
data={{
|
211
|
+
url: 'http://localhost:8080/Plone/image',
|
212
|
+
'@type': 'image',
|
213
|
+
}}
|
214
|
+
selected={false}
|
215
|
+
block={blockId}
|
216
|
+
content={{}}
|
217
|
+
request={{
|
218
|
+
loading: false,
|
219
|
+
loaded: false,
|
220
|
+
}}
|
221
|
+
pathname="/news"
|
222
|
+
onChangeBlock={() => {}}
|
223
|
+
onSelectBlock={() => {}}
|
224
|
+
onDeleteBlock={() => {}}
|
225
|
+
createContent={() => {}}
|
226
|
+
onFocusPreviousBlock={() => {}}
|
227
|
+
onFocusNextBlock={() => {}}
|
228
|
+
handleKeyDown={() => {}}
|
229
|
+
index={1}
|
230
|
+
openObjectBrowser={() => {}}
|
231
|
+
/>
|
232
|
+
</Provider>,
|
233
|
+
);
|
234
|
+
|
235
|
+
settings.internalApiPath = 'http://localhost:8080/Plone';
|
236
|
+
|
237
|
+
expect(container.querySelector('.block.image.align')).toBeInTheDocument();
|
238
|
+
expect(
|
239
|
+
container.querySelector('.image-block-container'),
|
240
|
+
).toBeInTheDocument();
|
241
|
+
expect(container.querySelector('.copyright-wrapper')).toBeInTheDocument();
|
242
|
+
});
|
243
|
+
|
244
|
+
it('should render without errors', () => {
|
245
|
+
const { container } = render(
|
246
|
+
<Provider store={store}>
|
247
|
+
<Edit
|
248
|
+
data={{
|
249
|
+
url: 'http://localhost:80801/Plone/image',
|
250
|
+
'@type': 'image',
|
251
|
+
}}
|
252
|
+
selected={false}
|
253
|
+
block={blockId}
|
254
|
+
content={{}}
|
255
|
+
request={{
|
256
|
+
loading: false,
|
257
|
+
loaded: false,
|
258
|
+
}}
|
259
|
+
pathname="/news"
|
260
|
+
onChangeBlock={() => {}}
|
261
|
+
onSelectBlock={() => {}}
|
262
|
+
onDeleteBlock={() => {}}
|
263
|
+
createContent={() => {}}
|
264
|
+
onFocusPreviousBlock={() => {}}
|
265
|
+
onFocusNextBlock={() => {}}
|
266
|
+
handleKeyDown={() => {}}
|
267
|
+
index={1}
|
268
|
+
openObjectBrowser={() => {}}
|
269
|
+
/>
|
270
|
+
</Provider>,
|
271
|
+
);
|
272
|
+
|
273
|
+
settings.internalApiPath = 'http://localhost:8080/Plone';
|
274
|
+
|
275
|
+
expect(container.querySelector('.block.image.align')).toBeInTheDocument();
|
276
|
+
expect(
|
277
|
+
container.querySelector('.image-block-container'),
|
278
|
+
).toBeInTheDocument();
|
279
|
+
expect(container.querySelector('.copyright-wrapper')).toBeInTheDocument();
|
280
|
+
});
|
281
|
+
|
282
|
+
it('should render without errors', () => {
|
283
|
+
render(
|
284
|
+
<Provider store={store}>
|
285
|
+
<Edit
|
286
|
+
data={{
|
287
|
+
url: undefined,
|
288
|
+
'@type': 'image',
|
289
|
+
}}
|
290
|
+
selected={false}
|
291
|
+
block={blockId}
|
292
|
+
content={{}}
|
293
|
+
request={{
|
294
|
+
loading: false,
|
295
|
+
loaded: false,
|
296
|
+
}}
|
297
|
+
editable={true}
|
298
|
+
pathname="/news"
|
299
|
+
onChangeBlock={() => {}}
|
300
|
+
onSelectBlock={() => {}}
|
301
|
+
onDeleteBlock={() => {}}
|
302
|
+
createContent={() => {}}
|
303
|
+
onFocusPreviousBlock={() => {}}
|
304
|
+
onFocusNextBlock={() => {}}
|
305
|
+
handleKeyDown={() => {}}
|
306
|
+
index={1}
|
307
|
+
openObjectBrowser={() => {}}
|
308
|
+
/>
|
309
|
+
</Provider>,
|
310
|
+
);
|
311
|
+
});
|
312
|
+
});
|