@eeacms/volto-hero-block 6.0.1 → 7.0.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 CHANGED
@@ -4,6 +4,15 @@ 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
+ ### [7.0.0](https://github.com/eea/volto-hero-block/compare/6.0.1...7.0.0) - 22 April 2024
8
+
9
+ #### :rocket: New Features
10
+
11
+ - feat: Release 7.0.0 - Volto 17 support [alin - [`ae73069`](https://github.com/eea/volto-hero-block/commit/ae73069aca5ca8e7abd909d8692e7eeb3f05d15f)]
12
+ - feat: Volto 17 support - refs #264527 [valentinab25 - [`b35a1d7`](https://github.com/eea/volto-hero-block/commit/b35a1d7d7c367a54cefcc58107cccd60802f97d7)]
13
+
14
+ #### :hammer_and_wrench: Others
15
+
7
16
  ### [6.0.1](https://github.com/eea/volto-hero-block/compare/6.0.0...6.0.1) - 5 April 2024
8
17
 
9
18
  #### :house: Internal changes
@@ -60,7 +69,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
60
69
  - Allow multiline editing of hero block [Tiberiu Ichim - [`373d1a0`](https://github.com/eea/volto-hero-block/commit/373d1a0d243b8e0b3df31f2a51a3c5df62f48214)]
61
70
  - Allow multiline editing of hero block [Tiberiu Ichim - [`b674ca5`](https://github.com/eea/volto-hero-block/commit/b674ca589502a81aaf6abed75dbf8b83ac1731fb)]
62
71
  - fix ESlint [Teodor - [`1439495`](https://github.com/eea/volto-hero-block/commit/14394952ef587f71be8b2c762c7e19698d8a55e4)]
63
- - Add Sonarqube tag using insitu-frontend addons list [EEA Jenkins - [`f133e20`](https://github.com/eea/volto-hero-block/commit/f133e2017ff9c3f13e6c44ce3e6b7757a25b129f)]
64
72
  - test: Update jest,Jenkinsfile,lint to volto-addons-template PR30 [valentinab25 - [`de6a206`](https://github.com/eea/volto-hero-block/commit/de6a206bed9afd53d97f5e6d70e2391ccc01f0f1)]
65
73
  ### [5.4.6](https://github.com/eea/volto-hero-block/compare/5.4.5...5.4.6) - 27 November 2023
66
74
 
@@ -74,16 +82,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
74
82
 
75
83
  #### :house: Internal changes
76
84
 
77
- - chore: [JENKINS] Refactor automated testing [valentinab25 - [`df8242c`](https://github.com/eea/volto-hero-block/commit/df8242c62eb8c706c3854f6bb4a6984932463571)]
78
85
 
79
86
  #### :hammer_and_wrench: Others
80
87
 
81
- - test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`4ea90f6`](https://github.com/eea/volto-hero-block/commit/4ea90f6a23c92fe631ee6025dbe5ee27ec030665)]
82
- - test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`6e9d7f5`](https://github.com/eea/volto-hero-block/commit/6e9d7f593363e08f519ab8296aef229ed2682113)]
83
- - test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`067fa27`](https://github.com/eea/volto-hero-block/commit/067fa27ee26d1d348d5ce1b089ea9931d9f32589)]
84
- - test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`0f6a259`](https://github.com/eea/volto-hero-block/commit/0f6a259fc73db97a7a8af69a808421191b146629)]
85
- - test: [JENKINS] Improve cypress time [valentinab25 - [`c1c72f4`](https://github.com/eea/volto-hero-block/commit/c1c72f4b54a84521f200682b230bba60e6920a70)]
86
- - Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`65744c9`](https://github.com/eea/volto-hero-block/commit/65744c9b2b0944d2aff90fc56485f10390810d1c)]
87
88
  ### [5.4.5](https://github.com/eea/volto-hero-block/compare/5.4.4...5.4.5) - 19 October 2023
88
89
 
89
90
  ### [5.4.4](https://github.com/eea/volto-hero-block/compare/5.4.3...5.4.4) - 19 October 2023
@@ -123,14 +124,12 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
123
124
  - test: add unit tests for Hero, Edit, helpers, hooks - refs #254313 [ana-oprea - [`89b39af`](https://github.com/eea/volto-hero-block/commit/89b39afe7ad5ce94d341482be91ab55e2c1a31ed)]
124
125
  - i18n: Add en [Alin Voinea - [`9cdb7f1`](https://github.com/eea/volto-hero-block/commit/9cdb7f1ff9d81dade3d91551b53cf7200f08937e)]
125
126
  - test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`0fe0d91`](https://github.com/eea/volto-hero-block/commit/0fe0d91fe9c43d10574990e9b163ffc49fe5bee7)]
126
- - Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`b1d1446`](https://github.com/eea/volto-hero-block/commit/b1d14467bcde28023b2831235928db1f328d6b0a)]
127
127
  ### [5.4.1](https://github.com/eea/volto-hero-block/compare/5.4.0...5.4.1) - 24 July 2023
128
128
 
129
129
  ### [5.4.0](https://github.com/eea/volto-hero-block/compare/5.3.1...5.4.0) - 12 June 2023
130
130
 
131
131
  #### :house: Internal changes
132
132
 
133
- - chore: [JENKINS] Deprecate circularity website [valentinab25 - [`395db48`](https://github.com/eea/volto-hero-block/commit/395db484f73c2dd2c56233c120a9620340f17d0b)]
134
133
 
135
134
  #### :hammer_and_wrench: Others
136
135
 
@@ -151,7 +150,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
151
150
  - put return statement [Dobricean Ioan Dorian - [`8eff5fd`](https://github.com/eea/volto-hero-block/commit/8eff5fdf977fcbb8cc952d3f45b577b02ca59cb9)]
152
151
  - change name and refactor to be more efficent [Dobricean Ioan Dorian - [`ff24145`](https://github.com/eea/volto-hero-block/commit/ff2414542833998ef282376de3fbda8698287849)]
153
152
  - stop-image-disappear over and over [Dobricean Ioan Dorian - [`c5b6f54`](https://github.com/eea/volto-hero-block/commit/c5b6f545ac422d95b8d802349aa4cf27af820829)]
154
- - Add Sonarqube tag using industry-frontend addons list [EEA Jenkins - [`3d38dd0`](https://github.com/eea/volto-hero-block/commit/3d38dd09a36525bda448f67a6d218bc7690a4cc3)]
155
153
  ### [5.3.0](https://github.com/eea/volto-hero-block/compare/5.2.0...5.3.0) - 27 March 2023
156
154
 
157
155
  #### :rocket: New Features
@@ -190,11 +188,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
190
188
  - fix onScreen hook error #16 from eea/fix-onscreen-hook [ichim-david - [`9123541`](https://github.com/eea/volto-hero-block/commit/91235413f423d7e6c4788d70b687b3ed5d4884b4)]
191
189
  - no need for comments [andreiggr - [`a14f9c3`](https://github.com/eea/volto-hero-block/commit/a14f9c3bdddfa22e6b4bbc8318f0ca5bdc9c2d38)]
192
190
  - fix hook [andreiggr - [`f7fae73`](https://github.com/eea/volto-hero-block/commit/f7fae73007f79af2f06da1d9b72a53ad86fef4ac)]
193
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`6b78fc0`](https://github.com/eea/volto-hero-block/commit/6b78fc044a933ab9b4b4694901aa26628ef0a836)]
194
191
  - eslint [andreiggr - [`68451b7`](https://github.com/eea/volto-hero-block/commit/68451b725420015fbd5b695e97b8742988d49913)]
195
192
  - lazy load huge img on first 10px [andreiggr - [`67dc7d3`](https://github.com/eea/volto-hero-block/commit/67dc7d3475188d692e053032c2639dd1a585c029)]
196
193
  - lazy load huge bgimage wip [andreiggr - [`86e45ec`](https://github.com/eea/volto-hero-block/commit/86e45ece842f1cd7452920dffa3a9b4aea945f56)]
197
- - Add Sonarqube tag using ims-frontend addons list [EEA Jenkins - [`87cbb38`](https://github.com/eea/volto-hero-block/commit/87cbb383290a168f85703573670e17f4e1ed7747)]
198
194
  ## [4.0.0](https://github.com/eea/volto-hero-block/compare/3.0.1...4.0.0) - 7 February 2023
199
195
 
200
196
  #### :nail_care: Enhancements
@@ -220,7 +216,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
220
216
 
221
217
  #### :hammer_and_wrench: Others
222
218
 
223
- - Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`ab85c7b`](https://github.com/eea/volto-hero-block/commit/ab85c7bd5bd1e3aec95e02f9b4d026b1203d5739)]
224
219
  ## [3.0.0](https://github.com/eea/volto-hero-block/compare/2.1.0...3.0.0) - 22 December 2022
225
220
 
226
221
  #### :rocket: New Features
@@ -229,11 +224,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
229
224
 
230
225
  #### :hammer_and_wrench: Others
231
226
 
232
- - Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`f06f58c`](https://github.com/eea/volto-hero-block/commit/f06f58c7cd4cfc15a03208e9c7a4e31fe2eba2f6)]
233
- - Add Sonarqube tag using climate-energy-frontend addons list [EEA Jenkins - [`20e5bcb`](https://github.com/eea/volto-hero-block/commit/20e5bcb3c4dd538595741928319c3204c5d18f8c)]
234
227
  - Cosmetics [Alin Voinea - [`9dac70c`](https://github.com/eea/volto-hero-block/commit/9dac70c0a3bea8e188ede9123f4f99de8e0f6987)]
235
228
  - test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`2d4005f`](https://github.com/eea/volto-hero-block/commit/2d4005f0f31b121e1b7d2e94414f3dff92ec1a16)]
236
- - Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`2931fcc`](https://github.com/eea/volto-hero-block/commit/2931fccbee5f8e117e5ae9095ba57e63e465ddb3)]
237
229
  ### [2.1.0](https://github.com/eea/volto-hero-block/compare/2.0.0...2.1.0) - 12 December 2022
238
230
 
239
231
  #### :bug: Bug Fixes
@@ -242,12 +234,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
242
234
 
243
235
  #### :hammer_and_wrench: Others
244
236
 
245
- - Add Sonarqube tag using bise-frontend addons list [EEA Jenkins - [`93be4f9`](https://github.com/eea/volto-hero-block/commit/93be4f96fb72cacfc25f9b058cb379d80060ee13)]
246
- - yarn 3 [Alin Voinea - [`8e2dccd`](https://github.com/eea/volto-hero-block/commit/8e2dccd47cbef3c0871407baa376ce61c540c754)]
247
- - Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`6bc3af3`](https://github.com/eea/volto-hero-block/commit/6bc3af35b4edf07971d1b0ce1648965e8d6e3bc0)]
248
- - Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`d7dbbd2`](https://github.com/eea/volto-hero-block/commit/d7dbbd21277dd76bf59d91a4dc8e022b2a6ff99c)]
249
- - Add Sonarqube tag using demo-kitkat-frontend addons list [EEA Jenkins - [`3c1f0d6`](https://github.com/eea/volto-hero-block/commit/3c1f0d6e7f8e5318aee3413ec3687d8492376f9d)]
250
- - Add Sonarqube tag using forests-frontend addons list [EEA Jenkins - [`843017a`](https://github.com/eea/volto-hero-block/commit/843017aa7dbea71cc7888663496e352d287440b4)]
251
237
  ## [2.0.0](https://github.com/eea/volto-hero-block/compare/1.0.0...2.0.0) - 16 November 2022
252
238
 
253
239
  #### :nail_care: Enhancements
@@ -257,7 +243,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
257
243
  #### :hammer_and_wrench: Others
258
244
 
259
245
  - test(estlint): Fix .project.eslintrc.js [Alin Voinea - [`b8f0971`](https://github.com/eea/volto-hero-block/commit/b8f0971b21a5334d40c1b8f5103cea61d9ffe6f1)]
260
- - Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`581dedf`](https://github.com/eea/volto-hero-block/commit/581dedf07410ef2ca09e6ddaa05fbf176400adbb)]
261
246
  ## [1.0.0](https://github.com/eea/volto-hero-block/compare/0.2.0...1.0.0) - 28 October 2022
262
247
 
263
248
  #### :nail_care: Enhancements
@@ -269,7 +254,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
269
254
  - Remove cypress.json [Alin Voinea - [`593bdf2`](https://github.com/eea/volto-hero-block/commit/593bdf207ca4fd3f2393117b6f64a44727881ad0)]
270
255
  - test(cypress): Upgrade to Cypress 10 / Razzle 4 [Alin Voinea - [`edd48a5`](https://github.com/eea/volto-hero-block/commit/edd48a5c13824bce5e03e46790f1890656b340d8)]
271
256
  - Cleanup [Alin Voinea - [`9d72ee7`](https://github.com/eea/volto-hero-block/commit/9d72ee7a06d1c6fed46586d30bb85eae39e670bf)]
272
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`95986d0`](https://github.com/eea/volto-hero-block/commit/95986d0b8fd5c3cbb9e6da9059f71e066a8e171b)]
273
257
  ### [0.2.0](https://github.com/eea/volto-hero-block/compare/0.1.4...0.2.0) - 6 July 2022
274
258
 
275
259
  #### :bug: Bug Fixes
@@ -308,7 +292,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
308
292
  - Update slate footnote support [Miu Razvan - [`c1522b4`](https://github.com/eea/volto-hero-block/commit/c1522b4164dbe6de01771d211d7e0bf3009f44d4)]
309
293
  - Use justify content for text and button as well [Miu Razvan - [`08599cc`](https://github.com/eea/volto-hero-block/commit/08599cc45546d9b349128c4f8ce9c01318385811)]
310
294
  - Add dependencies [Miu Razvan - [`30e2881`](https://github.com/eea/volto-hero-block/commit/30e2881a2a97a899e7f4cc614a0405c300ac6fee)]
311
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`b415422`](https://github.com/eea/volto-hero-block/commit/b41542285edd29440a324b101a4dbae9334830bf)]
312
295
  ### 0.1.0 - 10 June 2022
313
296
 
314
297
  #### :hammer_and_wrench: Others
@@ -14,6 +14,8 @@ module.exports = {
14
14
  '@package/(.*)$': '<rootDir>/node_modules/@plone/volto/src/$1',
15
15
  '@root/(.*)$': '<rootDir>/node_modules/@plone/volto/src/$1',
16
16
  '@plone/volto-quanta/(.*)$': '<rootDir>/src/addons/volto-quanta/src/$1',
17
+ '@eeacms/search/(.*)$': '<rootDir>/src/addons/volto-searchlib/searchlib/$1',
18
+ '@eeacms/search': '<rootDir>/src/addons/volto-searchlib/searchlib',
17
19
  '@eeacms/(.*?)/(.*)$': '<rootDir>/node_modules/@eeacms/$1/src/$2',
18
20
  '@plone/volto-slate$':
19
21
  '<rootDir>/node_modules/@plone/volto/packages/volto-slate/src',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-hero-block",
3
- "version": "6.0.1",
3
+ "version": "7.0.0",
4
4
  "description": "@eeacms/volto-hero-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -1,35 +1,62 @@
1
1
  import React from 'react';
2
- import renderer from 'react-test-renderer';
3
- import Copyright from './Copyright';
2
+ import { render, screen } from '@testing-library/react';
4
3
  import { Icon } from 'semantic-ui-react';
5
4
  import { Provider } from 'react-intl-redux';
6
5
  import configureStore from 'redux-mock-store';
7
6
  import config from '@plone/volto/registry';
7
+ import '@testing-library/jest-dom/extend-expect';
8
+
9
+ import Copyright from './Copyright';
8
10
 
9
11
  const mockStore = configureStore();
10
12
 
11
- test('renders copyright', () => {
13
+ describe('Copyright', () => {
12
14
  const store = mockStore({
13
15
  intl: {
14
16
  locale: 'en',
15
17
  messages: {},
16
18
  },
17
19
  });
18
- const copyrightPrefix =
19
- config.blocks.blocksConfig.hero?.copyrightPrefix || '';
20
+ it('renders copyright with left position', () => {
21
+ const copyrightPrefix =
22
+ config.blocks.blocksConfig.hero?.copyrightPrefix || '';
20
23
 
21
- const component = renderer.create(
22
- <Provider store={store}>
23
- <Copyright copyrightPosition={'left'}>
24
- <Copyright.Prefix>{copyrightPrefix}</Copyright.Prefix>
25
- <Copyright.Icon>
26
- <Icon className={'copyright outline'} />
27
- </Copyright.Icon>
28
- <Copyright.Text>Copyright Text Test</Copyright.Text>
29
- </Copyright>
30
- </Provider>,
31
- );
24
+ const { container } = render(
25
+ <Provider store={store}>
26
+ <Copyright copyrightPosition={'left'}>
27
+ <Copyright.Prefix>{copyrightPrefix}</Copyright.Prefix>
28
+ <Copyright.Icon>
29
+ <Icon className={'copyright outline'} />
30
+ </Copyright.Icon>
31
+ <Copyright.Text>Copyright Text Test</Copyright.Text>
32
+ </Copyright>
33
+ </Provider>,
34
+ );
32
35
 
33
- const json = component.toJSON();
34
- expect(json).toMatchSnapshot();
36
+ expect(screen.getByText('Copyright Text Test')).toBeInTheDocument();
37
+ expect(container.querySelector('i.copyright.outline')).toBeInTheDocument();
38
+ expect(
39
+ container.querySelector('div.eea.copyright.left'),
40
+ ).toBeInTheDocument();
41
+ });
42
+
43
+ it('renders copyright without prefix', () => {
44
+ const { container } = render(
45
+ <Provider store={store}>
46
+ <Copyright copyrightPosition={'right'}>
47
+ <Copyright.Icon>
48
+ <Icon className={'copyright outline'} />
49
+ </Copyright.Icon>
50
+ <Copyright.Text>Copyright Text Test</Copyright.Text>
51
+ </Copyright>
52
+ </Provider>,
53
+ );
54
+
55
+ expect(screen.queryByText('Prefix')).not.toBeInTheDocument();
56
+ expect(screen.getByText('Copyright Text Test')).toBeInTheDocument();
57
+ expect(container.querySelector('i.copyright.outline')).toBeInTheDocument();
58
+ expect(
59
+ container.querySelector('div.eea.copyright.right'),
60
+ ).toBeInTheDocument();
61
+ });
35
62
  });
@@ -1,9 +1,11 @@
1
1
  import React from 'react';
2
- import renderer from 'react-test-renderer';
3
- import Hero from './Hero';
2
+ import { render } from '@testing-library/react';
4
3
  import { Provider } from 'react-intl-redux';
5
4
  import configureStore from 'redux-mock-store';
6
5
  import config from '@plone/volto/registry';
6
+ import '@testing-library/jest-dom/extend-expect';
7
+
8
+ import Hero from './Hero';
7
9
 
8
10
  const { settings } = config;
9
11
 
@@ -28,7 +30,7 @@ describe('Hero block', () => {
28
30
  messages: {},
29
31
  },
30
32
  });
31
- const component = renderer.create(
33
+ const { container } = render(
32
34
  <Provider store={store}>
33
35
  <Hero
34
36
  image=""
@@ -50,8 +52,10 @@ describe('Hero block', () => {
50
52
  </Provider>,
51
53
  );
52
54
 
53
- const json = component.toJSON();
54
- expect(json).toMatchSnapshot();
55
+ expect(container.querySelector('.eea.hero-block')).toBeInTheDocument();
56
+ expect(container.querySelector('.inverted')).toBeInTheDocument();
57
+ expect(container.querySelector('.full-height')).toBeInTheDocument();
58
+ expect(container.querySelector('.full-width')).toBeInTheDocument();
55
59
  });
56
60
 
57
61
  it('renders a hero component', () => {
@@ -61,7 +65,7 @@ describe('Hero block', () => {
61
65
  messages: {},
62
66
  },
63
67
  });
64
- const component = renderer.create(
68
+ const { container } = render(
65
69
  <Provider store={store}>
66
70
  <Hero
67
71
  image=""
@@ -83,8 +87,10 @@ describe('Hero block', () => {
83
87
  </Provider>,
84
88
  );
85
89
 
86
- const json = component.toJSON();
87
- expect(json).toMatchSnapshot();
90
+ expect(container.querySelector('.eea.hero-block')).toBeInTheDocument();
91
+ expect(container.querySelector('.inverted')).toBeInTheDocument();
92
+ expect(container.querySelector('.full-height')).toBeInTheDocument();
93
+ expect(container.querySelector('.full-width')).not.toBeInTheDocument();
88
94
  });
89
95
 
90
96
  it('renders a hero component', () => {
@@ -94,7 +100,7 @@ describe('Hero block', () => {
94
100
  messages: {},
95
101
  },
96
102
  });
97
- const component = renderer.create(
103
+ const { container } = render(
98
104
  <Provider store={store}>
99
105
  <Hero
100
106
  image={{ '@type': 'URL', url: 'url_url', href: 'href_url' }}
@@ -116,8 +122,10 @@ describe('Hero block', () => {
116
122
  </Provider>,
117
123
  );
118
124
 
119
- const json = component.toJSON();
120
- expect(json).toMatchSnapshot();
125
+ expect(container.querySelector('.eea.hero-block')).toBeInTheDocument();
126
+ expect(container.querySelector('.hero-block-image')).toHaveStyle({
127
+ backgroundImage: 'url(url_url)',
128
+ });
121
129
  });
122
130
 
123
131
  it('renders a hero component', () => {
@@ -127,7 +135,7 @@ describe('Hero block', () => {
127
135
  messages: {},
128
136
  },
129
137
  });
130
- const component = renderer.create(
138
+ const { container } = render(
131
139
  <Provider store={store}>
132
140
  <Hero
133
141
  image={`${settings.apiPath}/foo/bar`}
@@ -149,41 +157,10 @@ describe('Hero block', () => {
149
157
  </Provider>,
150
158
  );
151
159
 
152
- const json = component.toJSON();
153
- expect(json).toMatchSnapshot();
154
- });
155
-
156
- it('renders a hero component', () => {
157
- const store = mockStore({
158
- intl: {
159
- locale: 'en',
160
- messages: {},
161
- },
160
+ expect(container.querySelector('.eea.hero-block')).toBeInTheDocument();
161
+ expect(container.querySelector('.hero-block-image')).toHaveStyle({
162
+ backgroundImage: 'url(/foo/bar/@@images/image/huge)',
162
163
  });
163
- const component = renderer.create(
164
- <Provider store={store}>
165
- <Hero
166
- image={`${settings.apiPath}/foo/bar.gif`}
167
- overlay={true}
168
- fullWidth={false}
169
- fullHeight={true}
170
- spaced={false}
171
- inverted={true}
172
- styles={{ alignContent: 'center', backgroundVariant: 'primary' }}
173
- >
174
- <Hero.Text
175
- quoted={true}
176
- styles={{ textVariant: 'white', textAlign: 'left' }}
177
- >
178
- Text test
179
- </Hero.Text>
180
- <Hero.Meta styles={{ buttonAlign: 'left' }}>Test meta</Hero.Meta>
181
- </Hero>
182
- </Provider>,
183
- );
184
-
185
- const json = component.toJSON();
186
- expect(json).toMatchSnapshot();
187
164
  });
188
165
 
189
166
  it('renders a hero component', () => {
@@ -193,7 +170,7 @@ describe('Hero block', () => {
193
170
  messages: {},
194
171
  },
195
172
  });
196
- const component = renderer.create(
173
+ const { container } = render(
197
174
  <Provider store={store}>
198
175
  <Hero
199
176
  image={`${settings.apiPath}/foo/bar.gif`}
@@ -210,8 +187,7 @@ describe('Hero block', () => {
210
187
  </Provider>,
211
188
  );
212
189
 
213
- const json = component.toJSON();
214
- expect(json).toMatchSnapshot();
190
+ expect(container.querySelector('.quoted-wrapper')).toBeInTheDocument();
215
191
  });
216
192
 
217
193
  it('renders a hero component', () => {
@@ -221,7 +197,7 @@ describe('Hero block', () => {
221
197
  messages: {},
222
198
  },
223
199
  });
224
- const component = renderer.create(
200
+ const { container } = render(
225
201
  <Provider store={store}>
226
202
  <Hero image={`${settings.apiPath}/foo/bar.gif`} styles={undefined}>
227
203
  <Hero.Text quoted={true} styles={undefined}>
@@ -232,7 +208,6 @@ describe('Hero block', () => {
232
208
  </Provider>,
233
209
  );
234
210
 
235
- const json = component.toJSON();
236
- expect(json).toMatchSnapshot();
211
+ expect(container.querySelector('.quoted-wrapper')).toBeInTheDocument();
237
212
  });
238
213
  });
@@ -51,8 +51,7 @@ const messages = defineMessages({
51
51
  defaultMessage: 'Fixed layout',
52
52
  },
53
53
  FixedlayoutNewPanesTabs: {
54
- id:
55
- 'Fixed layout, New panes (tabs) created by Editor within this block will be ignored',
54
+ id: 'Fixed layout, New panes (tabs) created by Editor within this block will be ignored',
56
55
  defaultMessage:
57
56
  'Fixed layout, New panes (tabs) created by Editor within this block will be ignored',
58
57
  },
@@ -98,7 +97,7 @@ const messages = defineMessages({
98
97
  },
99
98
  });
100
99
 
101
- export default (intl) => ({
100
+ const layoutSchema = (intl) => ({
102
101
  title: intl.formatMessage(messages.HeroBlockSettings),
103
102
  fieldsets: [
104
103
  {
@@ -172,3 +171,5 @@ export default (intl) => ({
172
171
  },
173
172
  required: [],
174
173
  });
174
+
175
+ export default layoutSchema;