@eeacms/volto-tableau 8.1.4 → 9.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 +18 -18
- package/DEVELOP.md +19 -17
- package/Dockerfile +10 -1
- package/Jenkinsfile +42 -39
- package/Makefile +1 -1
- package/README.md +33 -19
- package/cypress/e2e/block-basics.cy.js +9 -7
- package/cypress/e2e/block-tableau.cy.js +12 -5
- package/cypress/support/commands.js +7 -3
- package/docker-compose.yml +1 -1
- package/jest-addon.config.js +16 -4
- package/locales/de/LC_MESSAGES/volto.po +15 -13
- package/locales/en/LC_MESSAGES/volto.po +15 -13
- package/locales/it/LC_MESSAGES/volto.po +15 -13
- package/locales/ro/LC_MESSAGES/volto.po +15 -13
- package/locales/volto.pot +17 -15
- package/package.json +1 -1
- package/src/Blocks/EmbedTableauVisualization/Edit.test.jsx +10 -5
- package/src/Blocks/EmbedTableauVisualization/View.test.jsx +1 -1
- package/src/Blocks/TableauBlock/View.jsx +1 -1
- package/src/Blocks/TableauBlock/View.test.jsx +1 -1
- package/src/Tableau/Tableau.test.jsx +1 -1
- package/src/Tableau/helpers.js +1 -1
- package/src/Views/VisualizationView.test.jsx +1 -1
- package/src/Widgets/VisualizationViewWidget.test.jsx +1 -1
- package/src/Widgets/VisualizationWidget.test.jsx +9 -4
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,24 @@ 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
|
+
### [9.0.0](https://github.com/eea/volto-tableau/compare/8.1.5...9.0.0) - 25 March 2026
|
|
8
|
+
|
|
9
|
+
#### :rocket: New Features
|
|
10
|
+
|
|
11
|
+
- feat: Volto 18 support - refs #287700 [Alin Voinea - [`9b3e664`](https://github.com/eea/volto-tableau/commit/9b3e664c40418e950816242f95f306399dc527c4)]
|
|
12
|
+
|
|
13
|
+
#### :house: Internal changes
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
#### :hammer_and_wrench: Others
|
|
17
|
+
|
|
18
|
+
- tests: Fix Sonar Qube tags - refs #297339 [Alin Voinea - [`cfbd646`](https://github.com/eea/volto-tableau/commit/cfbd646a9c09cb90f6ffa6a886822e7a4759ba4d)]
|
|
19
|
+
### [8.1.5](https://github.com/eea/volto-tableau/compare/8.1.4...8.1.5) - 4 August 2025
|
|
20
|
+
|
|
21
|
+
#### :hammer_and_wrench: Others
|
|
22
|
+
|
|
23
|
+
- fix import for volto 18 qs should be imported from query-string 2 [David Ichim - [`bc99080`](https://github.com/eea/volto-tableau/commit/bc990804e552cde4ebb7913f8e924a13dac1dd39)]
|
|
24
|
+
- fix import for volto 18 qs should be imported from query-string [David Ichim - [`228e755`](https://github.com/eea/volto-tableau/commit/228e7550cde1b7f1d7e692716cc5544da75beb46)]
|
|
7
25
|
### [8.1.4](https://github.com/eea/volto-tableau/compare/8.1.3...8.1.4) - 8 April 2025
|
|
8
26
|
|
|
9
27
|
#### :bug: Bug Fixes
|
|
@@ -77,7 +95,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
77
95
|
|
|
78
96
|
#### :hammer_and_wrench: Others
|
|
79
97
|
|
|
80
|
-
- Add Sonarqube tag using insitu-frontend addons list [EEA Jenkins - [`22eeee9`](https://github.com/eea/volto-tableau/commit/22eeee93cfa8516261bb037a4bffef654af7a179)]
|
|
81
98
|
- Revert "Add fullwidth property" [Miu Razvan - [`ea36e3c`](https://github.com/eea/volto-tableau/commit/ea36e3c4be0ff20999a5ea7ced69cc77f287ced5)]
|
|
82
99
|
- Add fullwidth property [Miu Razvan - [`8d21ed0`](https://github.com/eea/volto-tableau/commit/8d21ed0b219f94d18998155a77acf2a0c50c9338)]
|
|
83
100
|
### [8.0.3](https://github.com/eea/volto-tableau/compare/8.0.2...8.0.3) - 14 June 2024
|
|
@@ -209,14 +226,12 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
209
226
|
- test [Dobricean Ioan Dorian - [`48505ca`](https://github.com/eea/volto-tableau/commit/48505caef84d12091035fdd79cf64067e7f819e2)]
|
|
210
227
|
- split the view and edit [Dobricean Ioan Dorian - [`7227bb1`](https://github.com/eea/volto-tableau/commit/7227bb1fb70e5d895f15872ed6533e089be99836)]
|
|
211
228
|
- update embed tableau so it can work with serialized data [Dobricean Ioan Dorian - [`59d958c`](https://github.com/eea/volto-tableau/commit/59d958c7a1a5055ea62e04abcbf34ee93f52e23a)]
|
|
212
|
-
- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`c452d70`](https://github.com/eea/volto-tableau/commit/c452d704819fb485e3cd3b39c2501361d20e8559)]
|
|
213
229
|
### [6.0.6](https://github.com/eea/volto-tableau/compare/6.0.5...6.0.6) - 17 November 2023
|
|
214
230
|
|
|
215
231
|
#### :hammer_and_wrench: Others
|
|
216
232
|
|
|
217
233
|
- tests: add cypress for tableau [nileshgulia1 - [`6eca683`](https://github.com/eea/volto-tableau/commit/6eca6834b85cdab4ed82367fee32fdbbb35b0f5e)]
|
|
218
234
|
- tests: update unit tests [nileshgulia1 - [`96cae09`](https://github.com/eea/volto-tableau/commit/96cae09eab2e737f032c97eb401a3efa88e68ec6)]
|
|
219
|
-
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`c7e81cb`](https://github.com/eea/volto-tableau/commit/c7e81cb0768f755dd4107a4998253d9bccc33809)]
|
|
220
235
|
- comment test [Miu Razvan - [`a459525`](https://github.com/eea/volto-tableau/commit/a459525fdccf8ee61651d4cb2e04eb253e841c61)]
|
|
221
236
|
### [6.0.5](https://github.com/eea/volto-tableau/compare/6.0.4...6.0.5) - 15 November 2023
|
|
222
237
|
|
|
@@ -243,7 +258,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
243
258
|
|
|
244
259
|
#### :house: Internal changes
|
|
245
260
|
|
|
246
|
-
- chore: [JENKINS] Refactor automated testing [valentinab25 - [`903b90a`](https://github.com/eea/volto-tableau/commit/903b90a2df0abc183aa68d99a89bb688de3a0c73)]
|
|
247
261
|
|
|
248
262
|
#### :hammer_and_wrench: Others
|
|
249
263
|
|
|
@@ -253,9 +267,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
253
267
|
- tests: increase coverage [kreafox - [`ecb9262`](https://github.com/eea/volto-tableau/commit/ecb92625a44365faf4c39f0ff3f02ccc4ca21656)]
|
|
254
268
|
- Fix tableau height [kreafox - [`6194c24`](https://github.com/eea/volto-tableau/commit/6194c2405e2bd93aba9865caed76292cd55193d3)]
|
|
255
269
|
- Show share & download button on widget view [kreafox - [`a66e253`](https://github.com/eea/volto-tableau/commit/a66e2537d08dc7129e249c28e1daa27246c88815)]
|
|
256
|
-
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`9d2189d`](https://github.com/eea/volto-tableau/commit/9d2189d4edb13dd449d75cd6dd9052bbed67304d)]
|
|
257
|
-
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`f2fa3f9`](https://github.com/eea/volto-tableau/commit/f2fa3f9ccabab918586179ac16ead44e2eba8498)]
|
|
258
|
-
- test: [JENKINS] Improve cypress time [valentinab25 - [`5748183`](https://github.com/eea/volto-tableau/commit/5748183c27dae18a4ebbc067d659cbc24cad8f71)]
|
|
259
270
|
- use toolbar from volto-embed [Miu Razvan - [`1a232a1`](https://github.com/eea/volto-tableau/commit/1a232a15f2bbe05da75307800590d0a0a1c4996b)]
|
|
260
271
|
## [6.0.0](https://github.com/eea/volto-tableau/compare/5.0.2...6.0.0) - 30 October 2023
|
|
261
272
|
|
|
@@ -313,7 +324,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
313
324
|
- test: change volto version in Jenkinsfile [ana-oprea - [`347aceb`](https://github.com/eea/volto-tableau/commit/347aceb07d152fddeebbf3a7e7a6ac9c55dc21ba)]
|
|
314
325
|
- test: increase cypress timeout [ana-oprea - [`bdf4408`](https://github.com/eea/volto-tableau/commit/bdf44083cd84c96b4914d3f8a3bb17c5187f191c)]
|
|
315
326
|
- test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`caff974`](https://github.com/eea/volto-tableau/commit/caff9742a703b224133a8dd2a969629e70c9fd33)]
|
|
316
|
-
- test: Fix eslint and yarn i18n [Alin Voinea - [`b8be7fb`](https://github.com/eea/volto-tableau/commit/b8be7fb9ab10faed0a1be8ce7e3d4e7c78ebe020)]
|
|
317
327
|
- i18n: Add en [Alin Voinea - [`c5e20dd`](https://github.com/eea/volto-tableau/commit/c5e20ddea25c830ac80665ee9a71e557e8cd117d)]
|
|
318
328
|
- test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`2116ff9`](https://github.com/eea/volto-tableau/commit/2116ff95c6454e813bdca44e6c3aa81fa0a916b8)]
|
|
319
329
|
## [5.0.0](https://github.com/eea/volto-tableau/compare/4.1.1...5.0.0) - 25 July 2023
|
|
@@ -325,21 +335,17 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
325
335
|
#### :hammer_and_wrench: Others
|
|
326
336
|
|
|
327
337
|
- Release 5.0.0 [Alin Voinea - [`97c98e9`](https://github.com/eea/volto-tableau/commit/97c98e98b1295a4ad45756326dc20cd59517515f)]
|
|
328
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`2acb3a5`](https://github.com/eea/volto-tableau/commit/2acb3a5490f62ce0a95ebbd03c32874ac3a42603)]
|
|
329
338
|
### [4.1.1](https://github.com/eea/volto-tableau/compare/4.1.0...4.1.1) - 21 July 2023
|
|
330
339
|
|
|
331
340
|
#### :hammer_and_wrench: Others
|
|
332
341
|
|
|
333
342
|
- Add VisualizationViewWidget [Tiberiu Ichim - [`fa881cb`](https://github.com/eea/volto-tableau/commit/fa881cbc3643a46697fb16d1c86ada1d4121a46a)]
|
|
334
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`cbcbad2`](https://github.com/eea/volto-tableau/commit/cbcbad26f7aa3683122199c8d5cbd142903df93b)]
|
|
335
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`51abe6d`](https://github.com/eea/volto-tableau/commit/51abe6d4db80825fe2e396e04c7003c6ad79b480)]
|
|
336
343
|
### [4.1.0](https://github.com/eea/volto-tableau/compare/4.0.0...4.1.0) - 15 June 2023
|
|
337
344
|
|
|
338
345
|
## [4.0.0](https://github.com/eea/volto-tableau/compare/3.0.8...4.0.0) - 13 June 2023
|
|
339
346
|
|
|
340
347
|
#### :house: Internal changes
|
|
341
348
|
|
|
342
|
-
- chore: [JENKINS] Remove alpha testing version [valentinab25 - [`e33bb21`](https://github.com/eea/volto-tableau/commit/e33bb21eb429c33e3a15d771487a1c9af8ccb0d5)]
|
|
343
349
|
|
|
344
350
|
#### :hammer_and_wrench: Others
|
|
345
351
|
|
|
@@ -371,7 +377,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
371
377
|
|
|
372
378
|
#### :hammer_and_wrench: Others
|
|
373
379
|
|
|
374
|
-
- Add Sonarqube tag using industry-frontend addons list [EEA Jenkins - [`f5deccd`](https://github.com/eea/volto-tableau/commit/f5deccd84372752908b300c5cfd78134818e5ce4)]
|
|
375
380
|
### [3.0.6](https://github.com/eea/volto-tableau/compare/3.0.5...3.0.6) - 30 January 2023
|
|
376
381
|
|
|
377
382
|
### [3.0.5](https://github.com/eea/volto-tableau/compare/3.0.4...3.0.5) - 26 January 2023
|
|
@@ -443,7 +448,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
443
448
|
- Update commands.js [Nilesh - [`7c48437`](https://github.com/eea/volto-tableau/commit/7c4843780efb9b85a4728de73c00d831c1d8fdcf)]
|
|
444
449
|
- Update e2e.js [Nilesh - [`f67b45c`](https://github.com/eea/volto-tableau/commit/f67b45c170f58f8d0301192994226f173e4cb00a)]
|
|
445
450
|
- latest volto compatibility refs #154757 [nileshgulia1 - [`881ba48`](https://github.com/eea/volto-tableau/commit/881ba482dc9b82e7fdac16549d41e80a6d26b3de)]
|
|
446
|
-
- Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`58e25df`](https://github.com/eea/volto-tableau/commit/58e25df2291add09670143bee54cde103ee835b9)]
|
|
447
451
|
### [1.3.0](https://github.com/eea/volto-tableau/compare/1.2.5...1.3.0) - 28 September 2022
|
|
448
452
|
|
|
449
453
|
#### :hammer_and_wrench: Others
|
|
@@ -457,15 +461,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
457
461
|
- Use volto 16 alpha 14 [Miu Razvan - [`93641be`](https://github.com/eea/volto-tableau/commit/93641be4c2393f49008aff789400cf7c947949fd)]
|
|
458
462
|
- Revert volto-tableau group to common [Andrei Grigore - [`9d24c6d`](https://github.com/eea/volto-tableau/commit/9d24c6d2767fed6a840cddaee55dbd5cecb544b5)]
|
|
459
463
|
- Tableaugroup typo fix [Andrei Grigore - [`b0b5378`](https://github.com/eea/volto-tableau/commit/b0b5378a437043120a96c9e5e8802584145daa22)]
|
|
460
|
-
- Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`3234347`](https://github.com/eea/volto-tableau/commit/3234347e524cc0ed4918242f503fe9e7dba266b2)]
|
|
461
464
|
- Refs #142010 - Optimize Volto-addons gitflow pipelines [valentinab25 - [`d237e1c`](https://github.com/eea/volto-tableau/commit/d237e1c72817d7e68a3eb698563674d1514db24f)]
|
|
462
465
|
### [1.2.4](https://github.com/eea/volto-tableau/compare/1.2.3...1.2.4) - 25 October 2021
|
|
463
466
|
|
|
464
467
|
#### :hammer_and_wrench: Others
|
|
465
468
|
|
|
466
|
-
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`2b19679`](https://github.com/eea/volto-tableau/commit/2b19679e2c7bcdc83082d1c73a595eea8b86d14f)]
|
|
467
|
-
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`384ccae`](https://github.com/eea/volto-tableau/commit/384ccaebed8c414a5c90eb96c6ce0a2b091f249c)]
|
|
468
|
-
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`589258e`](https://github.com/eea/volto-tableau/commit/589258e9b3cbba9cee37c57bb85ca5b707bc65d7)]
|
|
469
469
|
### [1.2.3](https://github.com/eea/volto-tableau/compare/1.2.2...1.2.3) - 14 June 2021
|
|
470
470
|
|
|
471
471
|
#### :hammer_and_wrench: Others
|
package/DEVELOP.md
CHANGED
|
@@ -26,21 +26,20 @@
|
|
|
26
26
|
|
|
27
27
|
### Or add @eeacms/volto-tableau to your Volto project
|
|
28
28
|
|
|
29
|
-
Before starting make sure your development environment is properly set. See [Volto
|
|
29
|
+
Before starting make sure your development environment is properly set. See the official Plone documentation for [creating a project with Cookieplone](https://6.docs.plone.org/install/create-project-cookieplone.html) and [installing an add-on in development mode in Volto 18 and 19](https://6.docs.plone.org/volto/development/add-ons/install-an-add-on-dev-18.html).
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
For new Volto 18+ projects, use Cookieplone. It includes `mrs-developer` by default.
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
1. Create a new Volto project with Cookieplone
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
yo @plone/volto my-volto-project --addon @eeacms/volto-tableau --skip-install
|
|
38
|
-
cd my-volto-project
|
|
35
|
+
uvx cookieplone project
|
|
36
|
+
cd project-title
|
|
39
37
|
|
|
40
38
|
1. Add the following to `mrs.developer.json`:
|
|
41
39
|
|
|
42
40
|
{
|
|
43
41
|
"volto-tableau": {
|
|
42
|
+
"output": "packages",
|
|
44
43
|
"url": "https://github.com/eea/volto-tableau.git",
|
|
45
44
|
"package": "@eeacms/volto-tableau",
|
|
46
45
|
"branch": "develop",
|
|
@@ -48,28 +47,31 @@ Before starting make sure your development environment is properly set. See [Vol
|
|
|
48
47
|
}
|
|
49
48
|
}
|
|
50
49
|
|
|
51
|
-
1.
|
|
50
|
+
1. Add `@eeacms/volto-tableau` to the `addons` key in your project `volto.config.js`
|
|
51
|
+
|
|
52
|
+
1. Install or refresh the project setup
|
|
52
53
|
|
|
53
|
-
make
|
|
54
|
-
yarn
|
|
54
|
+
make install
|
|
55
55
|
|
|
56
|
-
1. Start backend
|
|
56
|
+
1. Start backend in one terminal
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
make backend-start
|
|
59
59
|
|
|
60
|
-
...wait for backend to setup and start
|
|
60
|
+
...wait for backend to setup and start, ending with `Ready to handle requests`
|
|
61
61
|
|
|
62
62
|
...you can also check http://localhost:8080/Plone
|
|
63
63
|
|
|
64
|
-
1. Start frontend
|
|
64
|
+
1. Start frontend in a second terminal
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
make frontend-start
|
|
67
67
|
|
|
68
68
|
1. Go to http://localhost:3000
|
|
69
69
|
|
|
70
70
|
1. Happy hacking!
|
|
71
71
|
|
|
72
|
-
cd
|
|
72
|
+
cd packages/volto-tableau
|
|
73
|
+
|
|
74
|
+
For legacy Volto 17 projects, keep using the yarn-based workflow from the Volto 17 documentation.
|
|
73
75
|
|
|
74
76
|
## Cypress
|
|
75
77
|
|
|
@@ -81,7 +83,7 @@ project where you added `volto-tableau` to `mrs.developer.json`
|
|
|
81
83
|
Go to:
|
|
82
84
|
|
|
83
85
|
```BASH
|
|
84
|
-
cd
|
|
86
|
+
cd packages/volto-tableau/
|
|
85
87
|
```
|
|
86
88
|
|
|
87
89
|
Start:
|
package/Dockerfile
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
# syntax=docker/dockerfile:1
|
|
2
2
|
ARG VOLTO_VERSION
|
|
3
|
-
FROM
|
|
3
|
+
FROM plone/frontend-builder:${VOLTO_VERSION}
|
|
4
4
|
|
|
5
5
|
ARG ADDON_NAME
|
|
6
6
|
ARG ADDON_PATH
|
|
7
|
+
ENV HOST="0.0.0.0"
|
|
8
|
+
|
|
9
|
+
USER root
|
|
10
|
+
RUN apt-get update -q \
|
|
11
|
+
&& apt-get install -qy --no-install-recommends \
|
|
12
|
+
chromium libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb \
|
|
13
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
14
|
+
USER node
|
|
7
15
|
|
|
8
16
|
COPY --chown=node:node ./ /app/src/addons/${ADDON_PATH}/
|
|
9
17
|
|
|
10
18
|
RUN /setupAddon
|
|
19
|
+
RUN yarn add jest-junit
|
|
11
20
|
RUN yarn install
|
|
12
21
|
|
|
13
22
|
ENTRYPOINT ["yarn"]
|
package/Jenkinsfile
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
pipeline {
|
|
2
|
-
tools {
|
|
3
|
-
jdk 'Java17'
|
|
4
|
-
}
|
|
5
2
|
agent {
|
|
6
3
|
node { label 'docker-host' }
|
|
7
4
|
}
|
|
@@ -9,12 +6,12 @@ pipeline {
|
|
|
9
6
|
environment {
|
|
10
7
|
GIT_NAME = "volto-tableau"
|
|
11
8
|
NAMESPACE = "@eeacms"
|
|
12
|
-
SONARQUBE_TAGS = "volto.eea.europa.eu,climate-energy.eea.europa.eu,forest.eea.europa.eu,biodiversity.europa.eu,water.europa.eu-freshwater,water.europa.eu-marine,industry.eea.europa.eu,demo-www.eea.europa.eu,www.eea.europa.eu-en,insitu.copernicus.eu"
|
|
9
|
+
SONARQUBE_TAGS = "volto.eea.europa.eu,climate-energy.eea.europa.eu,forest.eea.europa.eu,biodiversity.europa.eu,water.europa.eu-freshwater,water.europa.eu-marine,industry.eea.europa.eu,demo-www.eea.europa.eu,www.eea.europa.eu-en,www.eea.europa.eu,insitu.copernicus.eu"
|
|
13
10
|
DEPENDENCIES = ""
|
|
14
11
|
BACKEND_PROFILES = "eea.kitkat:testing"
|
|
15
12
|
BACKEND_ADDONS = ""
|
|
16
13
|
VOLTO = "17"
|
|
17
|
-
|
|
14
|
+
VOLTO18_BREAKING_CHANGES = "no"
|
|
18
15
|
IMAGE_NAME = BUILD_TAG.toLowerCase()
|
|
19
16
|
}
|
|
20
17
|
|
|
@@ -242,11 +239,17 @@ pipeline {
|
|
|
242
239
|
script {
|
|
243
240
|
def scannerHome = tool 'SonarQubeScanner'
|
|
244
241
|
def nodeJS = tool 'NodeJS'
|
|
242
|
+
if (env.CHANGE_ID) {
|
|
243
|
+
env.sonarParams = " -Dsonar.pullrequest.base=${env.CHANGE_TARGET} -Dsonar.pullrequest.branch=${env.CHANGE_BRANCH} -Dsonar.pullrequest.key=${env.CHANGE_ID} "
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
env.sonarParams = " -Dsonar.branch.name=${env.BRANCH_NAME}"
|
|
247
|
+
}
|
|
245
248
|
withSonarQubeEnv('Sonarqube') {
|
|
246
249
|
sh '''sed -i "s#/app/src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info'''
|
|
247
250
|
sh '''sed -i "s#src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info'''
|
|
248
|
-
sh "export PATH=${scannerHome}/bin:${nodeJS}/bin:$PATH; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./xunit-reports/coverage/lcov.info,./cypress-coverage/coverage/lcov.info -Dsonar.sources=./src -Dsonar.projectKey=$GIT_NAME
|
|
249
|
-
sh '''try=5; while [ \$try -gt 0 ]; do curl -s -XPOST -u "${SONAR_AUTH_TOKEN}:" "${SONAR_HOST_URL}api/project_tags/set?project=${GIT_NAME}
|
|
251
|
+
sh "export PATH=${scannerHome}/bin:${nodeJS}/bin:$PATH; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./xunit-reports/coverage/lcov.info,./cypress-coverage/coverage/lcov.info -Dsonar.sources=./src -Dsonar.projectKey=$GIT_NAME -Dsonar.projectName=$GIT_NAME -Dsonar.projectVersion=\$(jq -r '.version' package.json) ${env.sonarParams}"
|
|
252
|
+
sh '''try=5; while [ \$try -gt 0 ]; do curl -s -XPOST -u "${SONAR_AUTH_TOKEN}:" "${SONAR_HOST_URL}api/project_tags/set?project=${GIT_NAME}&tags=${SONARQUBE_TAGS}" > set_tags_result; if [ \$(grep -ic error set_tags_result ) -eq 0 ]; then try=0; else cat set_tags_result; echo "... Will retry"; sleep 15; try=\$(( \$try - 1 )); fi; done'''
|
|
250
253
|
}
|
|
251
254
|
}
|
|
252
255
|
}
|
|
@@ -256,75 +259,75 @@ pipeline {
|
|
|
256
259
|
}
|
|
257
260
|
}
|
|
258
261
|
|
|
259
|
-
stage('Volto
|
|
262
|
+
stage('Volto 18') {
|
|
260
263
|
agent { node { label 'integration'} }
|
|
261
264
|
when {
|
|
262
265
|
environment name: 'SKIP_TESTS', value: ''
|
|
263
|
-
not { environment name: '
|
|
266
|
+
not { environment name: 'VOLTO18_BREAKING_CHANGES', value: 'yes' }
|
|
264
267
|
}
|
|
265
268
|
stages {
|
|
266
269
|
stage('Build test image') {
|
|
267
270
|
steps {
|
|
268
|
-
sh '''docker build --pull --build-arg="VOLTO_VERSION=
|
|
271
|
+
sh '''docker build --pull --build-arg="VOLTO_VERSION=18-yarn" --build-arg="ADDON_NAME=$NAMESPACE/$GIT_NAME" --build-arg="ADDON_PATH=$GIT_NAME" . -t $IMAGE_NAME-frontend18'''
|
|
269
272
|
}
|
|
270
273
|
}
|
|
271
274
|
|
|
272
|
-
stage('Unit tests Volto
|
|
275
|
+
stage('Unit tests Volto 18') {
|
|
273
276
|
steps {
|
|
274
277
|
script {
|
|
275
278
|
try {
|
|
276
|
-
sh '''docker run --name="$IMAGE_NAME-
|
|
277
|
-
sh '''rm -rf xunit-
|
|
278
|
-
sh '''mkdir -p xunit-
|
|
279
|
-
sh '''docker cp $IMAGE_NAME-
|
|
279
|
+
sh '''docker run --name="$IMAGE_NAME-volto18" --entrypoint=make --workdir=/app/src/addons/$GIT_NAME $IMAGE_NAME-frontend18 test-ci'''
|
|
280
|
+
sh '''rm -rf xunit-reports18'''
|
|
281
|
+
sh '''mkdir -p xunit-reports18'''
|
|
282
|
+
sh '''docker cp $IMAGE_NAME-volto18:/app/junit.xml xunit-reports18/'''
|
|
280
283
|
} finally {
|
|
281
284
|
catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') {
|
|
282
|
-
junit testResults: 'xunit-
|
|
285
|
+
junit testResults: 'xunit-reports18/junit.xml', allowEmptyResults: true
|
|
283
286
|
}
|
|
284
|
-
sh script: '''docker rm -v $IMAGE_NAME-
|
|
287
|
+
sh script: '''docker rm -v $IMAGE_NAME-volto18''', returnStatus: true
|
|
285
288
|
}
|
|
286
289
|
}
|
|
287
290
|
}
|
|
288
291
|
}
|
|
289
292
|
|
|
290
|
-
stage('Integration tests Volto
|
|
293
|
+
stage('Integration tests Volto 18') {
|
|
291
294
|
steps {
|
|
292
295
|
script {
|
|
293
296
|
try {
|
|
294
|
-
sh '''docker run --pull always --rm -d --name="$IMAGE_NAME-
|
|
295
|
-
sh '''docker run -d --shm-size=4g --link $IMAGE_NAME-
|
|
296
|
-
frontend = sh script:'''docker exec --workdir=/app/src/addons/${GIT_NAME} $IMAGE_NAME-
|
|
297
|
+
sh '''docker run --pull always --rm -d --name="$IMAGE_NAME-plone18" -e SITE="Plone" -e PROFILES="$BACKEND_PROFILES" -e ADDONS="$BACKEND_ADDONS" eeacms/plone-backend'''
|
|
298
|
+
sh '''docker run -d --shm-size=4g --link $IMAGE_NAME-plone18:plone --name="$IMAGE_NAME-cypress18" -e "RAZZLE_INTERNAL_API_PATH=http://plone:8080/Plone" --entrypoint=make --workdir=/app/src/addons/$GIT_NAME $IMAGE_NAME-frontend18 start-ci'''
|
|
299
|
+
frontend = sh script:'''docker exec --workdir=/app/src/addons/${GIT_NAME} $IMAGE_NAME-cypress18 make check-ci''', returnStatus: true
|
|
297
300
|
if ( frontend != 0 ) {
|
|
298
|
-
sh '''docker logs $IMAGE_NAME-
|
|
301
|
+
sh '''docker logs $IMAGE_NAME-cypress18; exit 1'''
|
|
299
302
|
}
|
|
300
|
-
sh '''timeout -s 9 1800 docker exec --workdir=/app/src/addons/${GIT_NAME} $IMAGE_NAME-
|
|
303
|
+
sh '''timeout -s 9 1800 docker exec --workdir=/app/src/addons/${GIT_NAME} $IMAGE_NAME-cypress18 make cypress-ci'''
|
|
301
304
|
} finally {
|
|
302
305
|
try {
|
|
303
306
|
if ( frontend == 0 ) {
|
|
304
|
-
sh '''rm -rf cypress-
|
|
305
|
-
sh '''mkdir -p cypress-
|
|
306
|
-
videos = sh script: '''docker cp $IMAGE_NAME-
|
|
307
|
-
sh '''docker cp $IMAGE_NAME-
|
|
308
|
-
screenshots = sh script: '''docker cp $IMAGE_NAME-
|
|
307
|
+
sh '''rm -rf cypress-videos18 cypress-results18 cypress-coverage18 cypress-screenshots18'''
|
|
308
|
+
sh '''mkdir -p cypress-videos18 cypress-results18 cypress-coverage18 cypress-screenshots18'''
|
|
309
|
+
videos = sh script: '''docker cp $IMAGE_NAME-cypress18:/app/src/addons/$GIT_NAME/cypress/videos cypress-videos18/''', returnStatus: true
|
|
310
|
+
sh '''docker cp $IMAGE_NAME-cypress18:/app/src/addons/$GIT_NAME/cypress/reports cypress-results18/'''
|
|
311
|
+
screenshots = sh script: '''docker cp $IMAGE_NAME-cypress18:/app/src/addons/$GIT_NAME/cypress/screenshots cypress-screenshots18''', returnStatus: true
|
|
309
312
|
|
|
310
|
-
archiveArtifacts artifacts: 'cypress-
|
|
313
|
+
archiveArtifacts artifacts: 'cypress-screenshots18/**', fingerprint: true, allowEmptyArchive: true
|
|
311
314
|
|
|
312
315
|
if ( videos == 0 ) {
|
|
313
|
-
sh '''for file in $(find cypress-
|
|
314
|
-
archiveArtifacts artifacts: 'cypress-
|
|
316
|
+
sh '''for file in $(find cypress-results18 -name *.xml); do if [ $(grep -E 'failures="[1-9].*"' $file | wc -l) -eq 0 ]; then testname=$(grep -E 'file=.*failures="0"' $file | sed 's#.* file=".*\\/\\(.*\\.[jsxt]\\+\\)" time.*#\\1#' ); rm -f cypress-videos18/videos/$testname.mp4; fi; done'''
|
|
317
|
+
archiveArtifacts artifacts: 'cypress-videos18/**/*.mp4', fingerprint: true, allowEmptyArchive: true
|
|
315
318
|
}
|
|
316
319
|
}
|
|
317
320
|
} finally {
|
|
318
321
|
catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') {
|
|
319
|
-
junit testResults: 'cypress-
|
|
322
|
+
junit testResults: 'cypress-results18/**/*.xml', allowEmptyResults: true
|
|
320
323
|
}
|
|
321
324
|
catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') {
|
|
322
|
-
sh '''docker logs $IMAGE_NAME-
|
|
325
|
+
sh '''docker logs $IMAGE_NAME-cypress18'''
|
|
323
326
|
}
|
|
324
|
-
sh script: "docker stop $IMAGE_NAME-
|
|
325
|
-
sh script: "docker stop $IMAGE_NAME-
|
|
326
|
-
sh script: "docker rm -v $IMAGE_NAME-
|
|
327
|
-
sh script: "docker rm -v $IMAGE_NAME-
|
|
327
|
+
sh script: "docker stop $IMAGE_NAME-cypress18", returnStatus: true
|
|
328
|
+
sh script: "docker stop $IMAGE_NAME-plone18", returnStatus: true
|
|
329
|
+
sh script: "docker rm -v $IMAGE_NAME-plone18", returnStatus: true
|
|
330
|
+
sh script: "docker rm -v $IMAGE_NAME-cypress18", returnStatus: true
|
|
328
331
|
}
|
|
329
332
|
}
|
|
330
333
|
}
|
|
@@ -337,7 +340,7 @@ pipeline {
|
|
|
337
340
|
post {
|
|
338
341
|
always {
|
|
339
342
|
sh script: "docker rmi $IMAGE_NAME-frontend", returnStatus: true
|
|
340
|
-
sh script: "docker rmi $IMAGE_NAME-
|
|
343
|
+
sh script: "docker rmi $IMAGE_NAME-frontend18", returnStatus: true
|
|
341
344
|
}
|
|
342
345
|
}
|
|
343
346
|
}
|
|
@@ -363,7 +366,7 @@ pipeline {
|
|
|
363
366
|
script {
|
|
364
367
|
sh '''echo "Error" > checkresult.txt'''
|
|
365
368
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
|
366
|
-
sh '''set -o pipefail; docker run -i --rm --pull always --name="$IMAGE_NAME-gitflow-sn" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" eeacms/gitflow /
|
|
369
|
+
sh '''set -o pipefail; docker run -i --rm --pull always --name="$IMAGE_NAME-gitflow-sn" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" eeacms/gitflow /checkSonarqubemasterV2.sh | grep -v "Found script" | tee checkresult.txt'''
|
|
367
370
|
}
|
|
368
371
|
|
|
369
372
|
publishChecks name: 'SonarQube', title: 'Sonarqube Code Quality Check', summary: 'Quality check on the SonarQube metrics from branch develop, comparing it with the ones from master branch. No bugs are allowed',
|
package/Makefile
CHANGED
|
@@ -46,7 +46,7 @@ endif
|
|
|
46
46
|
DIR=$(shell basename $$(pwd))
|
|
47
47
|
NODE_MODULES?="../../../node_modules"
|
|
48
48
|
PLONE_VERSION?=6
|
|
49
|
-
VOLTO_VERSION?=
|
|
49
|
+
VOLTO_VERSION?=18-yarn
|
|
50
50
|
ADDON_PATH="${DIR}"
|
|
51
51
|
ADDON_NAME="@eeacms/${ADDON_PATH}"
|
|
52
52
|
DOCKER_COMPOSE=PLONE_VERSION=${PLONE_VERSION} VOLTO_VERSION=${VOLTO_VERSION} ADDON_NAME=${ADDON_NAME} ADDON_PATH=${ADDON_PATH} docker compose
|
package/README.md
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
[](https://github.com/eea/volto-tableau/releases)
|
|
4
4
|
|
|
5
5
|
[](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-tableau/job/master/display/redirect)
|
|
6
|
-
[](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-tableau
|
|
6
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-tableau)
|
|
7
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-tableau)
|
|
8
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-tableau)
|
|
9
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-tableau)
|
|
10
10
|
|
|
11
11
|
[](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-tableau/job/develop/display/redirect)
|
|
12
|
-
[](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-tableau
|
|
12
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-tableau&branch=develop)
|
|
13
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-tableau&branch=develop)
|
|
14
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-tableau&branch=develop)
|
|
15
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-tableau&branch=develop)
|
|
16
16
|
|
|
17
17
|
[Volto](https://github.com/plone/volto) add-on
|
|
18
18
|
|
|
@@ -37,6 +37,11 @@ Registers a VisualizationView component for a content type named 'tableau_visual
|
|
|
37
37
|
|
|
38
38
|
Go to http://localhost:3000
|
|
39
39
|
|
|
40
|
+
`make start` now defaults to Volto 18. To run the same setup against Volto 17, use:
|
|
41
|
+
|
|
42
|
+
VOLTO_VERSION=17 make
|
|
43
|
+
VOLTO_VERSION=17 make start
|
|
44
|
+
|
|
40
45
|
### Add volto-tableau to your Volto project
|
|
41
46
|
|
|
42
47
|
1. Make sure you have a [Plone backend](https://plone.org/download) up-and-running at http://localhost:8080/Plone
|
|
@@ -50,30 +55,39 @@ Go to http://localhost:3000
|
|
|
50
55
|
- If you already have a volto project, just update `package.json`:
|
|
51
56
|
|
|
52
57
|
```JSON
|
|
53
|
-
"addons": [
|
|
54
|
-
"@eeacms/volto-tableau"
|
|
55
|
-
],
|
|
56
|
-
|
|
57
58
|
"dependencies": {
|
|
58
59
|
"@eeacms/volto-tableau": "*"
|
|
59
60
|
}
|
|
60
61
|
```
|
|
61
62
|
|
|
62
|
-
|
|
63
|
+
and `volto.config.js`:
|
|
64
|
+
|
|
65
|
+
```JavaScript
|
|
66
|
+
const addons = ['@eeacms/volto-tableau'];
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
- If not, create one with Cookieplone, as recommended by the official Plone documentation for Volto 18+:
|
|
63
70
|
|
|
64
71
|
```
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
cd my-volto-project
|
|
72
|
+
uvx cookieplone project
|
|
73
|
+
cd project-title
|
|
68
74
|
```
|
|
69
75
|
|
|
70
|
-
1. Install
|
|
76
|
+
1. Install or update dependencies, then start the project:
|
|
71
77
|
|
|
72
78
|
```
|
|
73
|
-
|
|
74
|
-
yarn start
|
|
79
|
+
make install
|
|
75
80
|
```
|
|
76
81
|
|
|
82
|
+
For a Cookieplone project, start the backend and frontend in separate terminals:
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
make backend-start
|
|
86
|
+
make frontend-start
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
For a legacy Volto 17 project, install the package with `yarn` and restart the frontend as usual.
|
|
90
|
+
|
|
77
91
|
1. Go to http://localhost:3000
|
|
78
92
|
|
|
79
93
|
1. Happy editing!
|
|
@@ -5,22 +5,24 @@ describe('Blocks Tests', () => {
|
|
|
5
5
|
afterEach(slateAfterEach);
|
|
6
6
|
|
|
7
7
|
it('Add Block: Empty', () => {
|
|
8
|
+
const titleSelector = '.block.inner.title [contenteditable="true"]';
|
|
9
|
+
|
|
8
10
|
// Change page title
|
|
9
|
-
cy.
|
|
10
|
-
cy.
|
|
11
|
+
cy.get(titleSelector).clear();
|
|
12
|
+
cy.get(titleSelector).type('My Add-on Page');
|
|
11
13
|
|
|
12
14
|
cy.get('.documentFirstHeading').contains('My Add-on Page');
|
|
13
15
|
|
|
14
|
-
cy.
|
|
16
|
+
cy.get(titleSelector).type('{enter}');
|
|
15
17
|
|
|
16
18
|
// Add block
|
|
17
19
|
cy.get('.ui.basic.icon.button.block-add-button')
|
|
18
20
|
.first()
|
|
19
21
|
.click({ force: true });
|
|
20
|
-
cy.get(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
cy.get(".blocks-chooser .ui.form .field.searchbox input[type='text']").type(
|
|
23
|
+
'image',
|
|
24
|
+
);
|
|
25
|
+
cy.get('.button.image').contains('Image').click({ force: true });
|
|
24
26
|
|
|
25
27
|
// Save
|
|
26
28
|
cy.get('#toolbar-save').click({ force: true });
|
|
@@ -27,15 +27,22 @@ describe('Blocks Tests', () => {
|
|
|
27
27
|
afterEach(slateAfterEach);
|
|
28
28
|
|
|
29
29
|
it('Add Tableau block', () => {
|
|
30
|
-
cy.
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
cy.on('uncaught:exception', (err) => {
|
|
31
|
+
if (err.message?.includes('Not Found')) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
cy.intercept('GET', `/**/*?expand*`).as('content');
|
|
33
37
|
// when I add a maps block
|
|
34
|
-
cy.addNewBlock('tableau');
|
|
38
|
+
cy.addNewBlock('tableau', true);
|
|
35
39
|
|
|
36
40
|
cy.get(
|
|
37
41
|
`.sidebar-container .field-wrapper-tableau_vis_url #field-tableau_vis_url`,
|
|
38
|
-
).
|
|
42
|
+
).clear({ force: true });
|
|
43
|
+
cy.get(
|
|
44
|
+
`.sidebar-container .field-wrapper-tableau_vis_url #field-tableau_vis_url`,
|
|
45
|
+
).type('/cypress/my-page', { force: true });
|
|
39
46
|
cy.wait('@content');
|
|
40
47
|
cy.get('#toolbar-save').click({ force: true });
|
|
41
48
|
cy.intercept('GET', `/**/*?expand*`).as('content');
|
|
@@ -387,8 +387,9 @@ Cypress.Commands.add('getSlate', ({ createNewSlate = true } = {}) => {
|
|
|
387
387
|
},
|
|
388
388
|
() => {
|
|
389
389
|
if (createNewSlate) {
|
|
390
|
-
cy.get(
|
|
391
|
-
.
|
|
390
|
+
cy.get(SLATE_TITLE_SELECTOR)
|
|
391
|
+
.focus()
|
|
392
|
+
.click({ force: true })
|
|
392
393
|
.type('{moveToEnd}{enter}', { force: true });
|
|
393
394
|
}
|
|
394
395
|
slate = cy.get(SLATE_SELECTOR, { timeout: 10000 }).last();
|
|
@@ -548,7 +549,10 @@ Cypress.Commands.add('addNewBlock', (blockName, createNewSlate = false) => {
|
|
|
548
549
|
Cypress.Commands.add('getSlate', (createNewSlate = false) => {
|
|
549
550
|
let slate;
|
|
550
551
|
if (createNewSlate) {
|
|
551
|
-
cy.get(
|
|
552
|
+
cy.get(SLATE_TITLE_SELECTOR)
|
|
553
|
+
.focus()
|
|
554
|
+
.click({ force: true })
|
|
555
|
+
.type('{moveToEnd}{enter}', { force: true });
|
|
552
556
|
}
|
|
553
557
|
cy.getIfExists(
|
|
554
558
|
SLATE_SELECTOR,
|
package/docker-compose.yml
CHANGED
package/jest-addon.config.js
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
require('dotenv').config({ path: __dirname + '/.env' })
|
|
2
2
|
|
|
3
|
+
const fs = require('fs')
|
|
4
|
+
const path = require('path')
|
|
5
|
+
|
|
6
|
+
const voltoSlatePath = fs.existsSync(
|
|
7
|
+
path.join(__dirname, '../../../node_modules/@plone/volto-slate/src'),
|
|
8
|
+
)
|
|
9
|
+
? '<rootDir>/node_modules/@plone/volto-slate/src'
|
|
10
|
+
: '<rootDir>/node_modules/@plone/volto/packages/volto-slate/src'
|
|
11
|
+
|
|
12
|
+
const countupPath = fs.existsSync(path.join(__dirname, '../countup/src'))
|
|
13
|
+
? '<rootDir>/src/addons/countup/src'
|
|
14
|
+
: '<rootDir>/node_modules/@eeacms/countup'
|
|
15
|
+
|
|
3
16
|
module.exports = {
|
|
4
17
|
testMatch: ['**/src/addons/**/?(*.)+(spec|test).[jt]s?(x)'],
|
|
5
18
|
collectCoverageFrom: [
|
|
@@ -16,11 +29,10 @@ module.exports = {
|
|
|
16
29
|
'@plone/volto-quanta/(.*)$': '<rootDir>/src/addons/volto-quanta/src/$1',
|
|
17
30
|
'@eeacms/search/(.*)$': '<rootDir>/src/addons/volto-searchlib/searchlib/$1',
|
|
18
31
|
'@eeacms/search': '<rootDir>/src/addons/volto-searchlib/searchlib',
|
|
32
|
+
'@eeacms/countup$': countupPath,
|
|
19
33
|
'@eeacms/(.*?)/(.*)$': '<rootDir>/node_modules/@eeacms/$1/src/$2',
|
|
20
|
-
'@plone/volto-slate$':
|
|
21
|
-
|
|
22
|
-
'@plone/volto-slate/(.*)$':
|
|
23
|
-
'<rootDir>/node_modules/@plone/volto/packages/volto-slate/src/$1',
|
|
34
|
+
'@plone/volto-slate$': voltoSlatePath,
|
|
35
|
+
'@plone/volto-slate/(.*)$': `${voltoSlatePath}/$1`,
|
|
24
36
|
'~/(.*)$': '<rootDir>/src/$1',
|
|
25
37
|
'load-volto-addons':
|
|
26
38
|
'<rootDir>/node_modules/@plone/volto/jest-addons-loader.js',
|
|
@@ -11,67 +11,69 @@ msgstr ""
|
|
|
11
11
|
"Content-Transfer-Encoding: \n"
|
|
12
12
|
"Plural-Forms: \n"
|
|
13
13
|
|
|
14
|
+
#. Default: "CSS height"
|
|
14
15
|
#: Blocks/EmbedTableauVisualization/schema
|
|
15
|
-
|
|
16
|
+
#: Widgets/schema
|
|
16
17
|
msgid "CSS height"
|
|
17
18
|
msgstr ""
|
|
18
19
|
|
|
20
|
+
#. Default: "Choices"
|
|
19
21
|
#: Widgets/CreatableSelectWidget
|
|
20
|
-
# defaultMessage: Choices
|
|
21
22
|
msgid "Choices"
|
|
22
23
|
msgstr ""
|
|
23
24
|
|
|
25
|
+
#. Default: "Close"
|
|
24
26
|
#: Widgets/CreatableSelectWidget
|
|
25
|
-
# defaultMessage: Close
|
|
26
27
|
msgid "Close"
|
|
27
28
|
msgstr ""
|
|
28
29
|
|
|
30
|
+
#. Default: "Default"
|
|
29
31
|
#: Widgets/CreatableSelectWidget
|
|
30
|
-
# defaultMessage: Default
|
|
31
32
|
msgid "Default"
|
|
32
33
|
msgstr ""
|
|
33
34
|
|
|
35
|
+
#. Default: "Description"
|
|
34
36
|
#: Widgets/CreatableSelectWidget
|
|
35
|
-
# defaultMessage: Description
|
|
36
37
|
msgid "Description"
|
|
37
38
|
msgstr ""
|
|
38
39
|
|
|
40
|
+
#. Default: "No options"
|
|
39
41
|
#: Widgets/CreatableSelectWidget
|
|
40
|
-
# defaultMessage: No options
|
|
41
42
|
msgid "No options"
|
|
42
43
|
msgstr ""
|
|
43
44
|
|
|
45
|
+
#. Default: "No value"
|
|
44
46
|
#: Widgets/CreatableSelectWidget
|
|
45
|
-
# defaultMessage: No value
|
|
46
47
|
msgid "No value"
|
|
47
48
|
msgstr ""
|
|
48
49
|
|
|
50
|
+
#. Default: "Required"
|
|
49
51
|
#: Widgets/CreatableSelectWidget
|
|
50
|
-
# defaultMessage: Required
|
|
51
52
|
msgid "Required"
|
|
52
53
|
msgstr ""
|
|
53
54
|
|
|
55
|
+
#. Default: "Select…"
|
|
54
56
|
#: Widgets/CreatableSelectWidget
|
|
55
|
-
# defaultMessage: Select…
|
|
56
57
|
msgid "Select…"
|
|
57
58
|
msgstr ""
|
|
58
59
|
|
|
60
|
+
#. Default: "Short Name"
|
|
59
61
|
#: Widgets/CreatableSelectWidget
|
|
60
|
-
# defaultMessage: Short Name
|
|
61
62
|
msgid "Short Name"
|
|
62
63
|
msgstr ""
|
|
63
64
|
|
|
65
|
+
#. Default: "Tableau height"
|
|
64
66
|
#: Blocks/EmbedTableauVisualization/schema
|
|
65
|
-
|
|
67
|
+
#: Widgets/schema
|
|
66
68
|
msgid "Tableau height"
|
|
67
69
|
msgstr ""
|
|
68
70
|
|
|
71
|
+
#. Default: "Title"
|
|
69
72
|
#: Widgets/CreatableSelectWidget
|
|
70
|
-
# defaultMessage: Title
|
|
71
73
|
msgid "Title"
|
|
72
74
|
msgstr ""
|
|
73
75
|
|
|
76
|
+
#. Default: "Used for programmatic access to the fieldset."
|
|
74
77
|
#: Widgets/CreatableSelectWidget
|
|
75
|
-
# defaultMessage: Used for programmatic access to the fieldset.
|
|
76
78
|
msgid "Used for programmatic access to the fieldset."
|
|
77
79
|
msgstr ""
|
|
@@ -11,67 +11,69 @@ msgstr ""
|
|
|
11
11
|
"Content-Transfer-Encoding: \n"
|
|
12
12
|
"Plural-Forms: \n"
|
|
13
13
|
|
|
14
|
+
#. Default: "CSS height"
|
|
14
15
|
#: Blocks/EmbedTableauVisualization/schema
|
|
15
|
-
|
|
16
|
+
#: Widgets/schema
|
|
16
17
|
msgid "CSS height"
|
|
17
18
|
msgstr ""
|
|
18
19
|
|
|
20
|
+
#. Default: "Choices"
|
|
19
21
|
#: Widgets/CreatableSelectWidget
|
|
20
|
-
# defaultMessage: Choices
|
|
21
22
|
msgid "Choices"
|
|
22
23
|
msgstr ""
|
|
23
24
|
|
|
25
|
+
#. Default: "Close"
|
|
24
26
|
#: Widgets/CreatableSelectWidget
|
|
25
|
-
# defaultMessage: Close
|
|
26
27
|
msgid "Close"
|
|
27
28
|
msgstr ""
|
|
28
29
|
|
|
30
|
+
#. Default: "Default"
|
|
29
31
|
#: Widgets/CreatableSelectWidget
|
|
30
|
-
# defaultMessage: Default
|
|
31
32
|
msgid "Default"
|
|
32
33
|
msgstr ""
|
|
33
34
|
|
|
35
|
+
#. Default: "Description"
|
|
34
36
|
#: Widgets/CreatableSelectWidget
|
|
35
|
-
# defaultMessage: Description
|
|
36
37
|
msgid "Description"
|
|
37
38
|
msgstr ""
|
|
38
39
|
|
|
40
|
+
#. Default: "No options"
|
|
39
41
|
#: Widgets/CreatableSelectWidget
|
|
40
|
-
# defaultMessage: No options
|
|
41
42
|
msgid "No options"
|
|
42
43
|
msgstr ""
|
|
43
44
|
|
|
45
|
+
#. Default: "No value"
|
|
44
46
|
#: Widgets/CreatableSelectWidget
|
|
45
|
-
# defaultMessage: No value
|
|
46
47
|
msgid "No value"
|
|
47
48
|
msgstr ""
|
|
48
49
|
|
|
50
|
+
#. Default: "Required"
|
|
49
51
|
#: Widgets/CreatableSelectWidget
|
|
50
|
-
# defaultMessage: Required
|
|
51
52
|
msgid "Required"
|
|
52
53
|
msgstr ""
|
|
53
54
|
|
|
55
|
+
#. Default: "Select…"
|
|
54
56
|
#: Widgets/CreatableSelectWidget
|
|
55
|
-
# defaultMessage: Select…
|
|
56
57
|
msgid "Select…"
|
|
57
58
|
msgstr ""
|
|
58
59
|
|
|
60
|
+
#. Default: "Short Name"
|
|
59
61
|
#: Widgets/CreatableSelectWidget
|
|
60
|
-
# defaultMessage: Short Name
|
|
61
62
|
msgid "Short Name"
|
|
62
63
|
msgstr ""
|
|
63
64
|
|
|
65
|
+
#. Default: "Tableau height"
|
|
64
66
|
#: Blocks/EmbedTableauVisualization/schema
|
|
65
|
-
|
|
67
|
+
#: Widgets/schema
|
|
66
68
|
msgid "Tableau height"
|
|
67
69
|
msgstr ""
|
|
68
70
|
|
|
71
|
+
#. Default: "Title"
|
|
69
72
|
#: Widgets/CreatableSelectWidget
|
|
70
|
-
# defaultMessage: Title
|
|
71
73
|
msgid "Title"
|
|
72
74
|
msgstr ""
|
|
73
75
|
|
|
76
|
+
#. Default: "Used for programmatic access to the fieldset."
|
|
74
77
|
#: Widgets/CreatableSelectWidget
|
|
75
|
-
# defaultMessage: Used for programmatic access to the fieldset.
|
|
76
78
|
msgid "Used for programmatic access to the fieldset."
|
|
77
79
|
msgstr ""
|
|
@@ -11,67 +11,69 @@ msgstr ""
|
|
|
11
11
|
"Content-Transfer-Encoding: \n"
|
|
12
12
|
"Plural-Forms: \n"
|
|
13
13
|
|
|
14
|
+
#. Default: "CSS height"
|
|
14
15
|
#: Blocks/EmbedTableauVisualization/schema
|
|
15
|
-
|
|
16
|
+
#: Widgets/schema
|
|
16
17
|
msgid "CSS height"
|
|
17
18
|
msgstr ""
|
|
18
19
|
|
|
20
|
+
#. Default: "Choices"
|
|
19
21
|
#: Widgets/CreatableSelectWidget
|
|
20
|
-
# defaultMessage: Choices
|
|
21
22
|
msgid "Choices"
|
|
22
23
|
msgstr ""
|
|
23
24
|
|
|
25
|
+
#. Default: "Close"
|
|
24
26
|
#: Widgets/CreatableSelectWidget
|
|
25
|
-
# defaultMessage: Close
|
|
26
27
|
msgid "Close"
|
|
27
28
|
msgstr ""
|
|
28
29
|
|
|
30
|
+
#. Default: "Default"
|
|
29
31
|
#: Widgets/CreatableSelectWidget
|
|
30
|
-
# defaultMessage: Default
|
|
31
32
|
msgid "Default"
|
|
32
33
|
msgstr ""
|
|
33
34
|
|
|
35
|
+
#. Default: "Description"
|
|
34
36
|
#: Widgets/CreatableSelectWidget
|
|
35
|
-
# defaultMessage: Description
|
|
36
37
|
msgid "Description"
|
|
37
38
|
msgstr ""
|
|
38
39
|
|
|
40
|
+
#. Default: "No options"
|
|
39
41
|
#: Widgets/CreatableSelectWidget
|
|
40
|
-
# defaultMessage: No options
|
|
41
42
|
msgid "No options"
|
|
42
43
|
msgstr ""
|
|
43
44
|
|
|
45
|
+
#. Default: "No value"
|
|
44
46
|
#: Widgets/CreatableSelectWidget
|
|
45
|
-
# defaultMessage: No value
|
|
46
47
|
msgid "No value"
|
|
47
48
|
msgstr ""
|
|
48
49
|
|
|
50
|
+
#. Default: "Required"
|
|
49
51
|
#: Widgets/CreatableSelectWidget
|
|
50
|
-
# defaultMessage: Required
|
|
51
52
|
msgid "Required"
|
|
52
53
|
msgstr ""
|
|
53
54
|
|
|
55
|
+
#. Default: "Select…"
|
|
54
56
|
#: Widgets/CreatableSelectWidget
|
|
55
|
-
# defaultMessage: Select…
|
|
56
57
|
msgid "Select…"
|
|
57
58
|
msgstr ""
|
|
58
59
|
|
|
60
|
+
#. Default: "Short Name"
|
|
59
61
|
#: Widgets/CreatableSelectWidget
|
|
60
|
-
# defaultMessage: Short Name
|
|
61
62
|
msgid "Short Name"
|
|
62
63
|
msgstr ""
|
|
63
64
|
|
|
65
|
+
#. Default: "Tableau height"
|
|
64
66
|
#: Blocks/EmbedTableauVisualization/schema
|
|
65
|
-
|
|
67
|
+
#: Widgets/schema
|
|
66
68
|
msgid "Tableau height"
|
|
67
69
|
msgstr ""
|
|
68
70
|
|
|
71
|
+
#. Default: "Title"
|
|
69
72
|
#: Widgets/CreatableSelectWidget
|
|
70
|
-
# defaultMessage: Title
|
|
71
73
|
msgid "Title"
|
|
72
74
|
msgstr ""
|
|
73
75
|
|
|
76
|
+
#. Default: "Used for programmatic access to the fieldset."
|
|
74
77
|
#: Widgets/CreatableSelectWidget
|
|
75
|
-
# defaultMessage: Used for programmatic access to the fieldset.
|
|
76
78
|
msgid "Used for programmatic access to the fieldset."
|
|
77
79
|
msgstr ""
|
|
@@ -11,67 +11,69 @@ msgstr ""
|
|
|
11
11
|
"Content-Transfer-Encoding: \n"
|
|
12
12
|
"Plural-Forms: \n"
|
|
13
13
|
|
|
14
|
+
#. Default: "CSS height"
|
|
14
15
|
#: Blocks/EmbedTableauVisualization/schema
|
|
15
|
-
|
|
16
|
+
#: Widgets/schema
|
|
16
17
|
msgid "CSS height"
|
|
17
18
|
msgstr ""
|
|
18
19
|
|
|
20
|
+
#. Default: "Choices"
|
|
19
21
|
#: Widgets/CreatableSelectWidget
|
|
20
|
-
# defaultMessage: Choices
|
|
21
22
|
msgid "Choices"
|
|
22
23
|
msgstr ""
|
|
23
24
|
|
|
25
|
+
#. Default: "Close"
|
|
24
26
|
#: Widgets/CreatableSelectWidget
|
|
25
|
-
# defaultMessage: Close
|
|
26
27
|
msgid "Close"
|
|
27
28
|
msgstr ""
|
|
28
29
|
|
|
30
|
+
#. Default: "Default"
|
|
29
31
|
#: Widgets/CreatableSelectWidget
|
|
30
|
-
# defaultMessage: Default
|
|
31
32
|
msgid "Default"
|
|
32
33
|
msgstr ""
|
|
33
34
|
|
|
35
|
+
#. Default: "Description"
|
|
34
36
|
#: Widgets/CreatableSelectWidget
|
|
35
|
-
# defaultMessage: Description
|
|
36
37
|
msgid "Description"
|
|
37
38
|
msgstr ""
|
|
38
39
|
|
|
40
|
+
#. Default: "No options"
|
|
39
41
|
#: Widgets/CreatableSelectWidget
|
|
40
|
-
# defaultMessage: No options
|
|
41
42
|
msgid "No options"
|
|
42
43
|
msgstr ""
|
|
43
44
|
|
|
45
|
+
#. Default: "No value"
|
|
44
46
|
#: Widgets/CreatableSelectWidget
|
|
45
|
-
# defaultMessage: No value
|
|
46
47
|
msgid "No value"
|
|
47
48
|
msgstr ""
|
|
48
49
|
|
|
50
|
+
#. Default: "Required"
|
|
49
51
|
#: Widgets/CreatableSelectWidget
|
|
50
|
-
# defaultMessage: Required
|
|
51
52
|
msgid "Required"
|
|
52
53
|
msgstr ""
|
|
53
54
|
|
|
55
|
+
#. Default: "Select…"
|
|
54
56
|
#: Widgets/CreatableSelectWidget
|
|
55
|
-
# defaultMessage: Select…
|
|
56
57
|
msgid "Select…"
|
|
57
58
|
msgstr ""
|
|
58
59
|
|
|
60
|
+
#. Default: "Short Name"
|
|
59
61
|
#: Widgets/CreatableSelectWidget
|
|
60
|
-
# defaultMessage: Short Name
|
|
61
62
|
msgid "Short Name"
|
|
62
63
|
msgstr ""
|
|
63
64
|
|
|
65
|
+
#. Default: "Tableau height"
|
|
64
66
|
#: Blocks/EmbedTableauVisualization/schema
|
|
65
|
-
|
|
67
|
+
#: Widgets/schema
|
|
66
68
|
msgid "Tableau height"
|
|
67
69
|
msgstr ""
|
|
68
70
|
|
|
71
|
+
#. Default: "Title"
|
|
69
72
|
#: Widgets/CreatableSelectWidget
|
|
70
|
-
# defaultMessage: Title
|
|
71
73
|
msgid "Title"
|
|
72
74
|
msgstr ""
|
|
73
75
|
|
|
76
|
+
#. Default: "Used for programmatic access to the fieldset."
|
|
74
77
|
#: Widgets/CreatableSelectWidget
|
|
75
|
-
# defaultMessage: Used for programmatic access to the fieldset.
|
|
76
78
|
msgid "Used for programmatic access to the fieldset."
|
|
77
79
|
msgstr ""
|
package/locales/volto.pot
CHANGED
|
@@ -1,79 +1,81 @@
|
|
|
1
1
|
msgid ""
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Project-Id-Version: Plone\n"
|
|
4
|
-
"POT-Creation-Date:
|
|
4
|
+
"POT-Creation-Date: 2025-06-20T18:03:49.336Z\n"
|
|
5
5
|
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
6
6
|
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
7
|
-
"MIME-Version: 1.0\n"
|
|
8
7
|
"Content-Type: text/plain; charset=utf-8\n"
|
|
9
8
|
"Content-Transfer-Encoding: 8bit\n"
|
|
10
9
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
10
|
+
"MIME-Version: 1.0\n"
|
|
11
11
|
"Language-Code: en\n"
|
|
12
12
|
"Language-Name: English\n"
|
|
13
13
|
"Preferred-Encodings: utf-8\n"
|
|
14
14
|
"Domain: volto\n"
|
|
15
15
|
|
|
16
|
+
#. Default: "CSS height"
|
|
16
17
|
#: Blocks/EmbedTableauVisualization/schema
|
|
17
|
-
|
|
18
|
+
#: Widgets/schema
|
|
18
19
|
msgid "CSS height"
|
|
19
20
|
msgstr ""
|
|
20
21
|
|
|
22
|
+
#. Default: "Choices"
|
|
21
23
|
#: Widgets/CreatableSelectWidget
|
|
22
|
-
# defaultMessage: Choices
|
|
23
24
|
msgid "Choices"
|
|
24
25
|
msgstr ""
|
|
25
26
|
|
|
27
|
+
#. Default: "Close"
|
|
26
28
|
#: Widgets/CreatableSelectWidget
|
|
27
|
-
# defaultMessage: Close
|
|
28
29
|
msgid "Close"
|
|
29
30
|
msgstr ""
|
|
30
31
|
|
|
32
|
+
#. Default: "Default"
|
|
31
33
|
#: Widgets/CreatableSelectWidget
|
|
32
|
-
# defaultMessage: Default
|
|
33
34
|
msgid "Default"
|
|
34
35
|
msgstr ""
|
|
35
36
|
|
|
37
|
+
#. Default: "Description"
|
|
36
38
|
#: Widgets/CreatableSelectWidget
|
|
37
|
-
# defaultMessage: Description
|
|
38
39
|
msgid "Description"
|
|
39
40
|
msgstr ""
|
|
40
41
|
|
|
42
|
+
#. Default: "No options"
|
|
41
43
|
#: Widgets/CreatableSelectWidget
|
|
42
|
-
# defaultMessage: No options
|
|
43
44
|
msgid "No options"
|
|
44
45
|
msgstr ""
|
|
45
46
|
|
|
47
|
+
#. Default: "No value"
|
|
46
48
|
#: Widgets/CreatableSelectWidget
|
|
47
|
-
# defaultMessage: No value
|
|
48
49
|
msgid "No value"
|
|
49
50
|
msgstr ""
|
|
50
51
|
|
|
52
|
+
#. Default: "Required"
|
|
51
53
|
#: Widgets/CreatableSelectWidget
|
|
52
|
-
# defaultMessage: Required
|
|
53
54
|
msgid "Required"
|
|
54
55
|
msgstr ""
|
|
55
56
|
|
|
57
|
+
#. Default: "Select…"
|
|
56
58
|
#: Widgets/CreatableSelectWidget
|
|
57
|
-
# defaultMessage: Select…
|
|
58
59
|
msgid "Select…"
|
|
59
60
|
msgstr ""
|
|
60
61
|
|
|
62
|
+
#. Default: "Short Name"
|
|
61
63
|
#: Widgets/CreatableSelectWidget
|
|
62
|
-
# defaultMessage: Short Name
|
|
63
64
|
msgid "Short Name"
|
|
64
65
|
msgstr ""
|
|
65
66
|
|
|
67
|
+
#. Default: "Tableau height"
|
|
66
68
|
#: Blocks/EmbedTableauVisualization/schema
|
|
67
|
-
|
|
69
|
+
#: Widgets/schema
|
|
68
70
|
msgid "Tableau height"
|
|
69
71
|
msgstr ""
|
|
70
72
|
|
|
73
|
+
#. Default: "Title"
|
|
71
74
|
#: Widgets/CreatableSelectWidget
|
|
72
|
-
# defaultMessage: Title
|
|
73
75
|
msgid "Title"
|
|
74
76
|
msgstr ""
|
|
75
77
|
|
|
78
|
+
#. Default: "Used for programmatic access to the fieldset."
|
|
76
79
|
#: Widgets/CreatableSelectWidget
|
|
77
|
-
# defaultMessage: Used for programmatic access to the fieldset.
|
|
78
80
|
msgid "Used for programmatic access to the fieldset."
|
|
79
81
|
msgstr ""
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { render, screen } from '@testing-library/react';
|
|
2
|
+
import { render, screen, waitFor } from '@testing-library/react';
|
|
3
3
|
import { Provider } from 'react-intl-redux';
|
|
4
4
|
import config from '@plone/volto/registry';
|
|
5
|
-
import '@testing-library/jest-dom
|
|
5
|
+
import '@testing-library/jest-dom';
|
|
6
6
|
|
|
7
7
|
import Edit from './Edit';
|
|
8
8
|
import installEmbedTableau from '.';
|
|
@@ -22,7 +22,7 @@ describe('Edit', () => {
|
|
|
22
22
|
with_share: true,
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
it('should render the component', () => {
|
|
25
|
+
it('should render the component', async () => {
|
|
26
26
|
const { container } = render(
|
|
27
27
|
<Provider store={global.store}>
|
|
28
28
|
<Edit
|
|
@@ -44,6 +44,10 @@ describe('Edit', () => {
|
|
|
44
44
|
</Provider>,
|
|
45
45
|
);
|
|
46
46
|
|
|
47
|
+
await waitFor(() => {
|
|
48
|
+
expect(container.querySelector('#sidebar .ui.form')).toBeInTheDocument();
|
|
49
|
+
});
|
|
50
|
+
|
|
47
51
|
expect(container.querySelector('.embed-tableau')).toBeInTheDocument();
|
|
48
52
|
expect(
|
|
49
53
|
container.querySelector('.privacy-protection-wrapper'),
|
|
@@ -56,11 +60,12 @@ describe('Edit', () => {
|
|
|
56
60
|
});
|
|
57
61
|
expect(container.querySelector('.tableau-wrapper')).toBeInTheDocument();
|
|
58
62
|
expect(container.querySelector('#sidebar')).toBeInTheDocument();
|
|
59
|
-
expect(container.querySelector('#sidebar .ui.form')).toBeInTheDocument();
|
|
60
63
|
expect(
|
|
61
64
|
container.querySelector('#sidebar .ui.form .header.pulled'),
|
|
62
65
|
).toBeInTheDocument();
|
|
63
|
-
expect(
|
|
66
|
+
expect(
|
|
67
|
+
await screen.findByText('Embed Dashboard (Tableau)'),
|
|
68
|
+
).toBeInTheDocument();
|
|
64
69
|
expect(
|
|
65
70
|
container.querySelector('#blockform-fieldset-default'),
|
|
66
71
|
).toBeInTheDocument();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { connect } from 'react-redux';
|
|
3
3
|
import Tableau from '@eeacms/volto-tableau/Tableau/Tableau';
|
|
4
|
-
import qs from '
|
|
4
|
+
import qs from 'query-string';
|
|
5
5
|
import config from '@plone/volto/registry';
|
|
6
6
|
import '@eeacms/volto-tableau/less/tableau.less';
|
|
7
7
|
|
|
@@ -3,7 +3,7 @@ import { render, screen } from '@testing-library/react';
|
|
|
3
3
|
import { Provider } from 'react-redux';
|
|
4
4
|
import configureStore from 'redux-mock-store';
|
|
5
5
|
import View from './View';
|
|
6
|
-
import '@testing-library/jest-dom
|
|
6
|
+
import '@testing-library/jest-dom';
|
|
7
7
|
import Tableau from '@eeacms/volto-tableau/Tableau/Tableau';
|
|
8
8
|
|
|
9
9
|
jest.mock('@eeacms/volto-tableau/Tableau/Tableau', () =>
|
package/src/Tableau/helpers.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render } from '@testing-library/react';
|
|
3
|
-
import '@testing-library/jest-dom
|
|
3
|
+
import '@testing-library/jest-dom';
|
|
4
4
|
import { Provider } from 'react-redux';
|
|
5
5
|
|
|
6
6
|
import VisualizationViewWidget from './VisualizationViewWidget';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
import '@testing-library/jest-dom
|
|
2
|
+
import { render, screen, waitFor } from '@testing-library/react';
|
|
3
|
+
import '@testing-library/jest-dom';
|
|
4
4
|
import { Provider } from 'react-intl-redux';
|
|
5
5
|
import VisualizationWidget from './VisualizationWidget';
|
|
6
6
|
|
|
7
7
|
describe('VisualizationWidget', () => {
|
|
8
|
-
it('should render the component', () => {
|
|
8
|
+
it('should render the component', async () => {
|
|
9
9
|
const data = {
|
|
10
10
|
value: {
|
|
11
11
|
url: 'http://localhost:3000/tableau-ct',
|
|
@@ -29,6 +29,11 @@ describe('VisualizationWidget', () => {
|
|
|
29
29
|
<VisualizationWidget {...data} id={'1234'} title="Title" />
|
|
30
30
|
</Provider>,
|
|
31
31
|
);
|
|
32
|
-
expect(
|
|
32
|
+
expect(
|
|
33
|
+
await screen.findByRole('button', { name: /open tableau editor/i }),
|
|
34
|
+
).toBeInTheDocument();
|
|
35
|
+
await waitFor(() => {
|
|
36
|
+
expect(container.querySelector('.tableau-wrapper')).toBeInTheDocument();
|
|
37
|
+
});
|
|
33
38
|
});
|
|
34
39
|
});
|