diff --git a/.env b/.env new file mode 100644 index 0000000..ef282fa --- /dev/null +++ b/.env @@ -0,0 +1,3 @@ +# Jest configuration variables +# - possible values: ON, OFF +JEST_USE_SETUP=OFF \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..0cbd65c --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,65 @@ +const fs = require('fs'); +const path = require('path'); +const projectRootPath = fs.realpathSync(__dirname + '/../../../'); + +let voltoPath = path.join(projectRootPath, 'node_modules/@plone/volto'); +let configFile; +if (fs.existsSync(`${projectRootPath}/tsconfig.json`)) + configFile = `${projectRootPath}/tsconfig.json`; +else if (fs.existsSync(`${projectRootPath}/jsconfig.json`)) + configFile = `${projectRootPath}/jsconfig.json`; + +if (configFile) { + const jsConfig = require(configFile).compilerOptions; + const pathsConfig = jsConfig.paths; + if (pathsConfig['@plone/volto']) + voltoPath = `./${jsConfig.baseUrl}/${pathsConfig['@plone/volto'][0]}`; +} + +const AddonConfigurationRegistry = require(`${voltoPath}/addon-registry.js`); +const reg = new AddonConfigurationRegistry(projectRootPath); + +// Extends ESlint configuration for adding the aliases to `src` directories in Volto addons +const addonAliases = Object.keys(reg.packages).map((o) => [ + o, + reg.packages[o].modulePath, +]); + +const addonExtenders = reg.getEslintExtenders().map((m) => require(m)); + +const defaultConfig = { + extends: `${voltoPath}/.eslintrc`, + settings: { + 'import/resolver': { + alias: { + map: [ + ['@plone/volto', '@plone/volto/src'], + ['@plone/volto-slate', '@plone/volto/packages/volto-slate/src'], + ...addonAliases, + ['@package', `${__dirname}/src`], + ['@root', `${__dirname}/src`], + ['~', `${__dirname}/src`], + ], + extensions: ['.js', '.jsx', '.json'], + }, + 'babel-plugin-root-import': { + rootPathSuffix: 'src', + }, + }, + }, + rules: { + 'react/jsx-no-target-blank': [ + 'error', + { + allowReferrer: true, + }, + ], + } +}; + +const config = addonExtenders.reduce( + (acc, extender) => extender.modify(acc), + defaultConfig, +); + +module.exports = config; diff --git a/.gitignore b/.gitignore index 53b9801..f1be4ff 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ .vscode/ .history -.eslintrc.js .nyc_output project coverage diff --git a/.project.eslintrc.js b/.project.eslintrc.js deleted file mode 100644 index 765070f..0000000 --- a/.project.eslintrc.js +++ /dev/null @@ -1,48 +0,0 @@ -const fs = require('fs'); -const path = require('path'); - -const projectRootPath = fs.existsSync('./project') - ? fs.realpathSync('./project') - : fs.realpathSync('./../../../'); -const packageJson = require(path.join(projectRootPath, 'package.json')); -const jsConfig = require(path.join(projectRootPath, 'jsconfig.json')).compilerOptions; - -const pathsConfig = jsConfig.paths; - -let voltoPath = path.join(projectRootPath, 'node_modules/@plone/volto'); - -Object.keys(pathsConfig).forEach(pkg => { - if (pkg === '@plone/volto') { - voltoPath = `./${jsConfig.baseUrl}/${pathsConfig[pkg][0]}`; - } -}); -const AddonConfigurationRegistry = require(`${voltoPath}/addon-registry.js`); -const reg = new AddonConfigurationRegistry(projectRootPath); - -// Extends ESlint configuration for adding the aliases to `src` directories in Volto addons -const addonAliases = Object.keys(reg.packages).map(o => [ - o, - reg.packages[o].modulePath, -]); - - -module.exports = { - extends: `${projectRootPath}/node_modules/@plone/volto/.eslintrc`, - settings: { - 'import/resolver': { - alias: { - map: [ - ['@plone/volto', '@plone/volto/src'], - ...addonAliases, - ['@package', `${__dirname}/src`], - ['~', `${__dirname}/src`], - ], - extensions: ['.js', '.jsx', '.json'], - }, - 'babel-plugin-root-import': { - rootPathSuffix: 'src', - }, - }, - }, -}; - diff --git a/CHANGELOG.md b/CHANGELOG.md index 985efdc..0c56d37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +### [7.0.0](https://github.com/eea/volto-metadata-block/compare/6.0.6...7.0.0) - 22 April 2024 + +#### :rocket: New Features + +- feat: Release 7.0.0 - Volto 17 support [alin - [`8d59c59`](https://github.com/eea/volto-metadata-block/commit/8d59c591875c251e5ab0b93d96a0f4ce99ca173d)] +- feat: Volto 17 support - refs #264527 [EEA Jenkins - [`27a36bd`](https://github.com/eea/volto-metadata-block/commit/27a36bdde9ab0418320692c8a427d2d9f8402a7f)] + +#### :hammer_and_wrench: Others + ### [6.0.6](https://github.com/eea/volto-metadata-block/compare/6.0.5...6.0.6) - 8 December 2023 #### :bug: Bug Fixes @@ -18,20 +27,14 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). #### :hammer_and_wrench: Others -- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`1b03bcf`](https://github.com/eea/volto-metadata-block/commit/1b03bcff0ca18ea13ef5efe4cacb41ffe8990d97)] -- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`9376a3d`](https://github.com/eea/volto-metadata-block/commit/9376a3d9789f71cfdfc042cabfd5e1358f823ffa)] ### [6.0.4](https://github.com/eea/volto-metadata-block/compare/6.0.3...6.0.4) - 13 November 2023 #### :house: Internal changes -- chore: [JENKINS] Refactor automated testing [valentinab25 - [`9daf84d`](https://github.com/eea/volto-metadata-block/commit/9daf84d9dc45049dfa64b20ed2590ef03ac46690)] #### :hammer_and_wrench: Others - remove console.log [Miu Razvan - [`b7fb80a`](https://github.com/eea/volto-metadata-block/commit/b7fb80a1b3b92f2f42d767791731bd15139c0dce)] -- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`3ae83cc`](https://github.com/eea/volto-metadata-block/commit/3ae83cc04ff3dfbf98f0440fffce08add28874fa)] -- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`46e86b2`](https://github.com/eea/volto-metadata-block/commit/46e86b2c5aa12f16c3cac5f2ad60d44839fe8695)] -- test: [JENKINS] Improve cypress time [valentinab25 - [`ff6d11d`](https://github.com/eea/volto-metadata-block/commit/ff6d11d4b5c3326d34725c714c546b0e2b5da84a)] ### [6.0.3](https://github.com/eea/volto-metadata-block/compare/6.0.2...6.0.3) - 22 October 2023 #### :house: Internal changes @@ -68,7 +71,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - test: delete volto.eea.europa.eu SonarQube tag in Jenkinsfile [ana-oprea - [`1c9164d`](https://github.com/eea/volto-metadata-block/commit/1c9164db6829f3d17218e97edf5e29c810ae37f2)] - test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`a79a78c`](https://github.com/eea/volto-metadata-block/commit/a79a78c755bb59c4854f6e1652e0f118589995a8)] - test: Add cypress test for metadata in DX Layout - refs #254894 [Crețu Mihaela - [`21b601d`](https://github.com/eea/volto-metadata-block/commit/21b601de25878d1c37a758f7cf69707e7b25bf2b)] -- test: Fix eslint and yarn i18n [Alin Voinea - [`de3aa7e`](https://github.com/eea/volto-metadata-block/commit/de3aa7ed26c84921ce11d09a568d5e318dd44baf)] - i18n: Add en [Alin Voinea - [`b2b278c`](https://github.com/eea/volto-metadata-block/commit/b2b278c68c7e2588be4f11a75dc212df57a35fe9)] - test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`4d23771`](https://github.com/eea/volto-metadata-block/commit/4d23771ddb839e9b8d0c8a60acb8045d08e7a11b)] ## [6.0.0](https://github.com/eea/volto-metadata-block/compare/5.1.2...6.0.0) - 25 July 2023 @@ -86,25 +88,17 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). #### :house: Internal changes -- chore: [JENKINS] Deprecate circularity website [valentinab25 - [`627e18c`](https://github.com/eea/volto-metadata-block/commit/627e18c9e9a01a5c18fe72080a2786bab3703574)] #### :hammer_and_wrench: Others - test: jest should look for addons in node_modules Refs #253277 [valentinab25 - [`480b427`](https://github.com/eea/volto-metadata-block/commit/480b427df460e59bcce9acd3c2f421610de73500)] - test: Add unit tests for utils - refs #253277 [ana-oprea - [`07b2d3d`](https://github.com/eea/volto-metadata-block/commit/07b2d3d0d107e993a3f7f04e8126a0198afa1c6c)] - test: Fix test config, coverage Refs #253277 [valentinab25 - [`8dc0e4f`](https://github.com/eea/volto-metadata-block/commit/8dc0e4fa505be0b13723ea41178c977c0e21c62a)] -- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`7fd3a87`](https://github.com/eea/volto-metadata-block/commit/7fd3a8772cceadd4f14b2921f9d4c04b87efd71c)] ### [5.1.0](https://github.com/eea/volto-metadata-block/compare/5.0.1...5.1.0) - 27 March 2023 #### :hammer_and_wrench: Others -- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`e9134d5`](https://github.com/eea/volto-metadata-block/commit/e9134d5cefc98491be81f0560d255b3cbdbd510e)] -- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`76365f7`](https://github.com/eea/volto-metadata-block/commit/76365f7f2f225b62851d82e9b5a7e4553ef6d8eb)] -- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`681cf4c`](https://github.com/eea/volto-metadata-block/commit/681cf4ca129afc2d03e35e53bd896bfe3e3e7714)] - test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`857cdb2`](https://github.com/eea/volto-metadata-block/commit/857cdb2fc1814112d1ca4a76abb864a70043f0e4)] -- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`7436e2a`](https://github.com/eea/volto-metadata-block/commit/7436e2aaaa7963b14147e01336f49334790d50af)] -- yarn 3 [Alin Voinea - [`bd2959e`](https://github.com/eea/volto-metadata-block/commit/bd2959e524d05ce5e3ddaa284167d1229d7923cb)] -- Add Sonarqube tag using demo-kitkat-frontend addons list [EEA Jenkins - [`fe89613`](https://github.com/eea/volto-metadata-block/commit/fe896131f3629e1a64e7602018e6ed266e61eed4)] ### [5.0.1](https://github.com/eea/volto-metadata-block/compare/5.0.0...5.0.1) - 16 November 2022 #### :hammer_and_wrench: Others @@ -120,16 +114,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). #### :hammer_and_wrench: Others - Update dependencies [Alin Voinea - [`d71c3f7`](https://github.com/eea/volto-metadata-block/commit/d71c3f7c372f7e38af3b8a1ec029d00e99e759a8)] -- Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`c501a20`](https://github.com/eea/volto-metadata-block/commit/c501a209bd8f6908b45616b7f376088d481acb44)] -- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`d6c43b2`](https://github.com/eea/volto-metadata-block/commit/d6c43b2e58d968e4ad2a0410baf05adfaa4353a1)] - update(jest): add @plone/volto-slate resolver refs- #153447 [nileshgulia1 - [`223220c`](https://github.com/eea/volto-metadata-block/commit/223220cebc5c836a48c147db08f7b2e4832a050e)] ### [4.0.8](https://github.com/eea/volto-metadata-block/compare/4.0.7...4.0.8) - 1 July 2022 #### :hammer_and_wrench: Others -- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`4003281`](https://github.com/eea/volto-metadata-block/commit/40032819dd5cec0d74647e08833e1148824422ac)] -- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`69e59f6`](https://github.com/eea/volto-metadata-block/commit/69e59f688570c6c140d3784a90028d838dacfdc3)] -- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`2c832f9`](https://github.com/eea/volto-metadata-block/commit/2c832f9b5e0854f8902afae1842c36f20c5d3e98)] ### [4.0.7](https://github.com/eea/volto-metadata-block/compare/4.0.6...4.0.7) - 4 March 2022 ### [4.0.6](https://github.com/eea/volto-metadata-block/compare/4.0.5...4.0.6) - 25 January 2022 @@ -140,7 +129,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). #### :hammer_and_wrench: Others -- Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`b3eabc9`](https://github.com/eea/volto-metadata-block/commit/b3eabc95e8cc2eb95551c76c62ce335d496f2ad0)] ### [4.0.3](https://github.com/eea/volto-metadata-block/compare/4.0.2...4.0.3) - 10 December 2021 #### :hammer_and_wrench: Others @@ -151,18 +139,12 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). #### :hammer_and_wrench: Others - Refs #141204 added word-break to metadata block: [David Ichim - [`1641f1f`](https://github.com/eea/volto-metadata-block/commit/1641f1fd832bcd8eb2b5d265a4b3831351f7a5d4)] -- Add Sonarqube tag using industry-frontend addons list [EEA Jenkins - [`00b421c`](https://github.com/eea/volto-metadata-block/commit/00b421c2ae124f6842ca9f9ece37a3b140ba9dd8)] -- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`72e669a`](https://github.com/eea/volto-metadata-block/commit/72e669a3913a6f07f67ce8704d9dc05b14f2b408)] -- Add Sonarqube tag using bise-frontend addons list [EEA Jenkins - [`7957334`](https://github.com/eea/volto-metadata-block/commit/79573345680fe9c41ce59bededc0c5c9c7ef677d)] -- Add Sonarqube tag using sustainability-frontend addons list [EEA Jenkins - [`544d384`](https://github.com/eea/volto-metadata-block/commit/544d384a1d519ada7ae74d34bb7574bd07fe18a7)] ### [4.0.1](https://github.com/eea/volto-metadata-block/compare/4.0.0...4.0.1) - 27 September 2021 ## [4.0.0](https://github.com/eea/volto-metadata-block/compare/3.3.1...4.0.0) - 24 September 2021 #### :hammer_and_wrench: Others -- Add Sonarqube tag using climate-energy-frontend addons list [EEA Jenkins - [`1f71008`](https://github.com/eea/volto-metadata-block/commit/1f71008a0801bb43fac9d38432738a00e55af2cf)] -- Add Sonarqube tag using ims-frontend addons list [EEA Jenkins - [`8aba39a`](https://github.com/eea/volto-metadata-block/commit/8aba39a318fc6e6f282e059174f549f8cf4ae99b)] ### [3.3.1](https://github.com/eea/volto-metadata-block/compare/3.3.0...3.3.1) - 9 September 2021 #### :hammer_and_wrench: Others @@ -183,7 +165,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - Release 3.1.0 [Alin Voinea - [`a77006c`](https://github.com/eea/volto-metadata-block/commit/a77006c8932c2b41560aceb760e34e29ebdabd90)] - Add ErrorBoundary to Widgets [Alin Voinea - [`3b16de2`](https://github.com/eea/volto-metadata-block/commit/3b16de2a4632228931a7fa7fe5db83fb9e9d51ef)] -- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`948f424`](https://github.com/eea/volto-metadata-block/commit/948f424bea3a39d32a869bd4a84b6aea985ea96d)] ### [3.0.2](https://github.com/eea/volto-metadata-block/compare/3.0.1...3.0.2) - 18 June 2021 ### [3.0.1](https://github.com/eea/volto-metadata-block/compare/3.0.0...3.0.1) - 27 May 2021 diff --git a/Jenkinsfile b/Jenkinsfile index 4cbad1a..062a241 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,11 +9,12 @@ pipeline { environment { GIT_NAME = "volto-metadata-block" NAMESPACE = "@eeacms" - SONARQUBE_TAGS = "forest.eea.europa.eu,www.eea.europa.eu-ims,climate-energy.eea.europa.eu,sustainability.eionet.europa.eu,biodiversity.europa.eu,clms.land.copernicus.eu,industry.eea.europa.eu,water.europa.eu-freshwater,demo-www.eea.europa.eu,clmsdemo.devel6cph.eea.europa.eu,water.europa.eu-marine,climate-adapt.eea.europa.eu,climate-advisory-board.devel4cph.eea.europa.eu,climate-advisory-board.europa.eu,www.eea.europa.eu-en" + SONARQUBE_TAGS = "forest.eea.europa.eu,www.eea.europa.eu-ims,climate-energy.eea.europa.eu,biodiversity.europa.eu,clms.land.copernicus.eu,industry.eea.europa.eu,water.europa.eu-freshwater,demo-www.eea.europa.eu,clmsdemo.devel6cph.eea.europa.eu,water.europa.eu-marine,climate-adapt.eea.europa.eu,climate-advisory-board.devel4cph.eea.europa.eu,climate-advisory-board.europa.eu,www.eea.europa.eu-en,insitu-frontend.eionet.europa.eu,insitu.copernicus.eu" DEPENDENCIES = "" BACKEND_PROFILES = "eea.kitkat:testing" BACKEND_ADDONS = "" - VOLTO = "16" + VOLTO = "17" + VOLTO16_BREAKING_CHANGES = "no" IMAGE_NAME = BUILD_TAG.toLowerCase() } @@ -44,6 +45,7 @@ pipeline { } steps { script { + checkout scm withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN')]) { check_result = sh script: '''docker run --pull always -i --rm --name="$IMAGE_NAME-gitflow-check" -e GIT_TOKEN="$GITHUB_TOKEN" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_ORG="$GIT_ORG" -e GIT_NAME="$GIT_NAME" eeacms/gitflow /check_if_testing_needed.sh''', returnStatus: true @@ -61,7 +63,6 @@ pipeline { allOf { not { environment name: 'CHANGE_ID', value: '' } environment name: 'CHANGE_TARGET', value: 'develop' - environment name: 'SKIP_TESTS', value: '' } allOf { environment name: 'CHANGE_ID', value: '' @@ -69,25 +70,27 @@ pipeline { not { changelog '.*^Automated release [0-9\\.]+$' } branch 'master' } - environment name: 'SKIP_TESTS', value: '' } } } - stages { - stage('Build test image') { - steps { - checkout scm - sh '''docker build --pull --build-arg="VOLTO_VERSION=$VOLTO" --build-arg="ADDON_NAME=$NAMESPACE/$GIT_NAME" --build-arg="ADDON_PATH=$GIT_NAME" . -t $IMAGE_NAME-frontend''' + parallel { + + stage('Volto 17') { + agent { node { label 'docker-1.13'} } + stages { + stage('Build test image') { + steps { + sh '''docker build --pull --build-arg="VOLTO_VERSION=$VOLTO" --build-arg="ADDON_NAME=$NAMESPACE/$GIT_NAME" --build-arg="ADDON_PATH=$GIT_NAME" . -t $IMAGE_NAME-frontend''' + } } - } - - stage('Fix code') { - when { + + stage('Fix code') { + when { environment name: 'CHANGE_ID', value: '' not { branch 'master' } - } - steps { - script { + } + steps { + script { fix_result = sh(script: '''docker run --name="$IMAGE_NAME-fix" --entrypoint=make --workdir=/app/src/addons/$GIT_NAME $IMAGE_NAME-frontend ci-fix''', returnStatus: true) sh '''docker cp $IMAGE_NAME-fix:/app/src/addons/$GIT_NAME/src .''' sh '''docker rm -v $IMAGE_NAME-fix''' @@ -105,31 +108,31 @@ pipeline { sh '''exit 1''' } } + } } - } - stage('ES lint') { - steps { - sh '''docker run --rm --name="$IMAGE_NAME-eslint" --entrypoint=make --workdir=/app/src/addons/$GIT_NAME $IMAGE_NAME-frontend lint''' + stage('ES lint') { + when { environment name: 'SKIP_TESTS', value: '' } + steps { + sh '''docker run --rm --name="$IMAGE_NAME-eslint" --entrypoint=make --workdir=/app/src/addons/$GIT_NAME $IMAGE_NAME-frontend lint''' + } } - } - stage('Style lint') { - steps { - sh '''docker run --rm --name="$IMAGE_NAME-stylelint" --entrypoint=make --workdir=/app/src/addons/$GIT_NAME $IMAGE_NAME-frontend stylelint''' + stage('Style lint') { + when { environment name: 'SKIP_TESTS', value: '' } + steps { + sh '''docker run --rm --name="$IMAGE_NAME-stylelint" --entrypoint=make --workdir=/app/src/addons/$GIT_NAME $IMAGE_NAME-frontend stylelint''' + } } - } - stage('Prettier') { - steps { - sh '''docker run --rm --name="$IMAGE_NAME-prettier" --entrypoint=make --workdir=/app/src/addons/$GIT_NAME $IMAGE_NAME-frontend prettier''' + stage('Prettier') { + when { environment name: 'SKIP_TESTS', value: '' } + steps { + sh '''docker run --rm --name="$IMAGE_NAME-prettier" --entrypoint=make --workdir=/app/src/addons/$GIT_NAME $IMAGE_NAME-frontend prettier''' + } } - } - - stage('Coverage Tests') { - parallel { - - stage('Unit tests') { + stage('Unit tests') { + when { environment name: 'SKIP_TESTS', value: '' } steps { script { try { @@ -155,17 +158,24 @@ pipeline { } } } - } + } - stage('Integration tests') { + stage('Integration tests') { + when { environment name: 'SKIP_TESTS', value: '' } steps { script { try { sh '''docker run --pull always --rm -d --name="$IMAGE_NAME-plone" -e SITE="Plone" -e PROFILES="$BACKEND_PROFILES" -e ADDONS="$BACKEND_ADDONS" eeacms/plone-backend''' - sh '''docker run -d --shm-size=3g --link $IMAGE_NAME-plone:plone --name="$IMAGE_NAME-cypress" -e "RAZZLE_INTERNAL_API_PATH=http://plone:8080/Plone" --entrypoint=make --workdir=/app/src/addons/$GIT_NAME $IMAGE_NAME-frontend start-ci''' + sh '''docker run -d --shm-size=4g --link $IMAGE_NAME-plone:plone --name="$IMAGE_NAME-cypress" -e "RAZZLE_INTERNAL_API_PATH=http://plone:8080/Plone" --entrypoint=make --workdir=/app/src/addons/$GIT_NAME $IMAGE_NAME-frontend start-ci''' + frontend = sh script:'''docker exec --workdir=/app/src/addons/${GIT_NAME} $IMAGE_NAME-cypress make check-ci''', returnStatus: true + if ( frontend != 0 ) { + sh '''docker logs $IMAGE_NAME-cypress; exit 1''' + } + sh '''timeout -s 9 1800 docker exec --workdir=/app/src/addons/${GIT_NAME} $IMAGE_NAME-cypress make cypress-ci''' } finally { try { + if ( frontend == 0 ) { sh '''rm -rf cypress-videos cypress-results cypress-coverage cypress-screenshots''' sh '''mkdir -p cypress-videos cypress-results cypress-coverage cypress-screenshots''' videos = sh script: '''docker cp $IMAGE_NAME-cypress:/app/src/addons/$GIT_NAME/cypress/videos cypress-videos/''', returnStatus: true @@ -189,6 +199,7 @@ pipeline { sh '''for file in $(find cypress-results -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-videos/videos/$testname.mp4; fi; done''' archiveArtifacts artifacts: 'cypress-videos/**/*.mp4', fingerprint: true, allowEmptyArchive: true } + } } finally { catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') { junit testResults: 'cypress-results/**/*.xml', allowEmptyResults: true @@ -204,16 +215,7 @@ pipeline { } } } - } } - } - } - post { - always { - sh script: "docker rmi $IMAGE_NAME-frontend", returnStatus: true - } - } - } stage('Report to SonarQube') { when { @@ -221,9 +223,11 @@ pipeline { allOf { not { environment name: 'CHANGE_ID', value: '' } environment name: 'CHANGE_TARGET', value: 'develop' + environment name: 'SKIP_TESTS', value: '' } allOf { environment name: 'CHANGE_ID', value: '' + environment name: 'SKIP_TESTS', value: '' anyOf { allOf { branch 'develop' @@ -248,14 +252,107 @@ pipeline { } } + + } + } + + stage('Volto 16') { + agent { node { label 'integration'} } + when { + environment name: 'SKIP_TESTS', value: '' + not { environment name: 'VOLTO16_BREAKING_CHANGES', value: 'yes' } + } + stages { + stage('Build test image') { + steps { + sh '''docker build --pull --build-arg="VOLTO_VERSION=16" --build-arg="ADDON_NAME=$NAMESPACE/$GIT_NAME" --build-arg="ADDON_PATH=$GIT_NAME" . -t $IMAGE_NAME-frontend16''' + } + } + + stage('Unit tests Volto 16') { + steps { + script { + try { + sh '''docker run --name="$IMAGE_NAME-volto16" --entrypoint=make --workdir=/app/src/addons/$GIT_NAME $IMAGE_NAME-frontend16 test-ci''' + sh '''rm -rf xunit-reports16''' + sh '''mkdir -p xunit-reports16''' + sh '''docker cp $IMAGE_NAME-volto16:/app/junit.xml xunit-reports16/''' + } finally { + catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') { + junit testResults: 'xunit-reports16/junit.xml', allowEmptyResults: true + } + sh script: '''docker rm -v $IMAGE_NAME-volto16''', returnStatus: true + } + } + } + } + + stage('Integration tests Volto 16') { + steps { + script { + try { + sh '''docker run --pull always --rm -d --name="$IMAGE_NAME-plone16" -e SITE="Plone" -e PROFILES="$BACKEND_PROFILES" -e ADDONS="$BACKEND_ADDONS" eeacms/plone-backend''' + sh '''docker run -d --shm-size=4g --link $IMAGE_NAME-plone16:plone --name="$IMAGE_NAME-cypress16" -e "RAZZLE_INTERNAL_API_PATH=http://plone:8080/Plone" --entrypoint=make --workdir=/app/src/addons/$GIT_NAME $IMAGE_NAME-frontend16 start-ci''' + frontend = sh script:'''docker exec --workdir=/app/src/addons/${GIT_NAME} $IMAGE_NAME-cypress16 make check-ci''', returnStatus: true + if ( frontend != 0 ) { + sh '''docker logs $IMAGE_NAME-cypress16; exit 1''' + } + sh '''timeout -s 9 1800 docker exec --workdir=/app/src/addons/${GIT_NAME} $IMAGE_NAME-cypress16 make cypress-ci''' + } finally { + try { + if ( frontend == 0 ) { + sh '''rm -rf cypress-videos16 cypress-results16 cypress-coverage16 cypress-screenshots16''' + sh '''mkdir -p cypress-videos16 cypress-results16 cypress-coverage16 cypress-screenshots16''' + videos = sh script: '''docker cp $IMAGE_NAME-cypress16:/app/src/addons/$GIT_NAME/cypress/videos cypress-videos16/''', returnStatus: true + sh '''docker cp $IMAGE_NAME-cypress16:/app/src/addons/$GIT_NAME/cypress/reports cypress-results16/''' + screenshots = sh script: '''docker cp $IMAGE_NAME-cypress16:/app/src/addons/$GIT_NAME/cypress/screenshots cypress-screenshots16''', returnStatus: true + + archiveArtifacts artifacts: 'cypress-screenshots16/**', fingerprint: true, allowEmptyArchive: true + + if ( videos == 0 ) { + sh '''for file in $(find cypress-results16 -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-videos16/videos/$testname.mp4; fi; done''' + archiveArtifacts artifacts: 'cypress-videos16/**/*.mp4', fingerprint: true, allowEmptyArchive: true + } + } + } finally { + catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') { + junit testResults: 'cypress-results16/**/*.xml', allowEmptyResults: true + } + catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') { + sh '''docker logs $IMAGE_NAME-cypress16''' + } + sh script: "docker stop $IMAGE_NAME-cypress16", returnStatus: true + sh script: "docker stop $IMAGE_NAME-plone16", returnStatus: true + sh script: "docker rm -v $IMAGE_NAME-plone16", returnStatus: true + sh script: "docker rm -v $IMAGE_NAME-cypress16", returnStatus: true + } + } + } + } + } + + } + } + } + post { + always { + sh script: "docker rmi $IMAGE_NAME-frontend", returnStatus: true + sh script: "docker rmi $IMAGE_NAME-frontend16", returnStatus: true + } + } + } + + stage('SonarQube compare to master') { when { anyOf { allOf { not { environment name: 'CHANGE_ID', value: '' } environment name: 'CHANGE_TARGET', value: 'develop' + environment name: 'SKIP_TESTS', value: '' } allOf { + environment name: 'SKIP_TESTS', value: '' environment name: 'CHANGE_ID', value: '' branch 'develop' not { changelog '.*^Automated release [0-9\\.]+$' } @@ -316,3 +413,4 @@ pipeline { } } } + diff --git a/Makefile b/Makefile index efbf2fb..522b577 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ endif DIR=$(shell basename $$(pwd)) NODE_MODULES?="../../../node_modules" PLONE_VERSION?=6 -VOLTO_VERSION?=16 +VOLTO_VERSION?=17 ADDON_PATH="${DIR}" ADDON_NAME="@eeacms/${ADDON_PATH}" DOCKER_COMPOSE=PLONE_VERSION=${PLONE_VERSION} VOLTO_VERSION=${VOLTO_VERSION} ADDON_NAME=${ADDON_NAME} ADDON_PATH=${ADDON_PATH} docker compose @@ -86,7 +86,7 @@ cypress-open: ## Open cypress integration tests .PHONY: cypress-run cypress-run: ## Run cypress integration tests - CYPRESS_API_PATH="${RAZZLE_DEV_PROXY_API_PATH}" NODE_ENV=development $(NODE_MODULES)/cypress/bin/cypress run --browser chromium + CYPRESS_API_PATH="${RAZZLE_DEV_PROXY_API_PATH}" NODE_ENV=development $(NODE_MODULES)/cypress/bin/cypress run .PHONY: test test: ## Run jest tests @@ -98,7 +98,7 @@ test-update: ## Update jest tests snapshots .PHONY: stylelint stylelint: ## Stylelint - $(NODE_MODULES)/stylelint/bin/stylelint.js --allow-empty-input 'src/**/*.{css,less}' + $(NODE_MODULES)/.bin/stylelint --allow-empty-input 'src/**/*.{css,less}' .PHONY: stylelint-overrides stylelint-overrides: @@ -106,7 +106,7 @@ stylelint-overrides: .PHONY: stylelint-fix stylelint-fix: ## Fix stylelint - $(NODE_MODULES)/stylelint/bin/stylelint.js --allow-empty-input 'src/**/*.{css,less}' --fix + $(NODE_MODULES)/.bin/stylelint --allow-empty-input 'src/**/*.{css,less}' --fix $(NODE_MODULES)/.bin/stylelint --custom-syntax less --allow-empty-input 'theme/**/*.overrides' 'src/**/*.overrides' --fix .PHONY: prettier @@ -119,11 +119,11 @@ prettier-fix: ## Fix prettier .PHONY: lint lint: ## ES Lint - $(NODE_MODULES)/eslint/bin/eslint.js --max-warnings=0 'src/**/*.{js,jsx}' + $(NODE_MODULES)/.bin/eslint --max-warnings=0 'src/**/*.{js,jsx}' .PHONY: lint-fix lint-fix: ## Fix ES Lint - $(NODE_MODULES)/eslint/bin/eslint.js --fix 'src/**/*.{js,jsx}' + $(NODE_MODULES)/.bin/eslint --fix 'src/**/*.{js,jsx}' .PHONY: i18n i18n: ## i18n @@ -155,8 +155,11 @@ start-ci: cd ../.. yarn start +.PHONY: check-ci +check-ci: + $(NODE_MODULES)/.bin/wait-on -t 240000 http://localhost:3000 + .PHONY: cypress-ci cypress-ci: $(NODE_MODULES)/.bin/wait-on -t 240000 http://localhost:3000 - NODE_ENV=development make cypress-run - + CYPRESS_API_PATH="${RAZZLE_DEV_PROXY_API_PATH}" NODE_ENV=development $(NODE_MODULES)/cypress/bin/cypress run --browser chromium diff --git a/cypress/e2e/02-dexterity-controlpanel-layout.cy.js b/cypress/e2e/02-dexterity-controlpanel-layout.cy.js index d86614d..cb9ddfc 100644 --- a/cypress/e2e/02-dexterity-controlpanel-layout.cy.js +++ b/cypress/e2e/02-dexterity-controlpanel-layout.cy.js @@ -6,10 +6,6 @@ describe('ControlPanel: Dexterity Content-Types Layout', () => { it('Edit Blocks Layout for Book', () => { cy.visit('/controlpanel/dexterity-types'); - cy.waitForResourceToLoad('@navigation'); - cy.waitForResourceToLoad('@breadcrumbs'); - cy.waitForResourceToLoad('@actions'); - cy.waitForResourceToLoad('@types'); cy.get('a[href="/controlpanel/dexterity-types/book"]').should( 'have.text', @@ -42,10 +38,6 @@ describe('ControlPanel: Dexterity Content-Types Layout', () => { cy.get('#toolbar-save').click(); cy.visit('/cypress'); - cy.waitForResourceToLoad('@navigation'); - cy.waitForResourceToLoad('@breadcrumbs'); - cy.waitForResourceToLoad('@actions'); - cy.waitForResourceToLoad('@types'); cy.get('button[class="add"]').click(); cy.get('#toolbar-add-book').click(); diff --git a/cypress/support/commands.js b/cypress/support/commands.js index f269a7f..5211ed7 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -447,11 +447,7 @@ Cypress.Commands.add('toolbarSave', () => { // Save cy.get('#toolbar-save').click(); - cy.waitForResourceToLoad('@navigation'); - cy.waitForResourceToLoad('@breadcrumbs'); - cy.waitForResourceToLoad('@actions'); - cy.waitForResourceToLoad('@types'); - cy.waitForResourceToLoad('my-page'); + cy.waitForResourceToLoad(''); cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page'); }); diff --git a/cypress/support/e2e.js b/cypress/support/e2e.js index 90fe032..1702ad2 100644 --- a/cypress/support/e2e.js +++ b/cypress/support/e2e.js @@ -22,6 +22,7 @@ import './commands'; import '@cypress/code-coverage/support'; export const slateBeforeEach = (contentType = 'Document') => { + cy.intercept('GET', `/**/*?expand*`).as('content'); cy.autologin(); cy.createContent({ contentType: 'Document', @@ -35,11 +36,7 @@ export const slateBeforeEach = (contentType = 'Document') => { path: 'cypress', }); cy.visit('/cypress/my-page'); - cy.waitForResourceToLoad('@navigation'); - cy.waitForResourceToLoad('@breadcrumbs'); - cy.waitForResourceToLoad('@actions'); - cy.waitForResourceToLoad('@types'); - cy.waitForResourceToLoad('my-page'); + cy.wait('@content'); cy.navigate('/cypress/my-page/edit'); }; diff --git a/jest-addon.config.js b/jest-addon.config.js index 3c86610..65bf77c 100644 --- a/jest-addon.config.js +++ b/jest-addon.config.js @@ -1,3 +1,5 @@ +require('dotenv').config({ path: __dirname + '/.env' }) + module.exports = { testMatch: ['**/src/addons/**/?(*.)+(spec|test).[jt]s?(x)'], collectCoverageFrom: [ @@ -9,18 +11,26 @@ module.exports = { '@plone/volto/cypress': '/node_modules/@plone/volto/cypress', '@plone/volto/babel': '/node_modules/@plone/volto/babel', '@plone/volto/(.*)$': '/node_modules/@plone/volto/src/$1', - '@package/(.*)$': '/src/$1', - '@root/(.*)$': '/src/$1', + '@package/(.*)$': '/node_modules/@plone/volto/src/$1', + '@root/(.*)$': '/node_modules/@plone/volto/src/$1', '@plone/volto-quanta/(.*)$': '/src/addons/volto-quanta/src/$1', + '@eeacms/search/(.*)$': '/src/addons/volto-searchlib/searchlib/$1', + '@eeacms/search': '/src/addons/volto-searchlib/searchlib', '@eeacms/(.*?)/(.*)$': '/node_modules/@eeacms/$1/src/$2', - '@plone/volto-slate': + '@plone/volto-slate$': '/node_modules/@plone/volto/packages/volto-slate/src', + '@plone/volto-slate/(.*)$': + '/node_modules/@plone/volto/packages/volto-slate/src/$1', '~/(.*)$': '/src/$1', 'load-volto-addons': '/node_modules/@plone/volto/jest-addons-loader.js', }, + transformIgnorePatterns: [ + '/node_modules/(?!(@plone|@root|@package|@eeacms)/).*/', + ], transform: { '^.+\\.js(x)?$': 'babel-jest', + '^.+\\.ts(x)?$': 'babel-jest', '^.+\\.(png)$': 'jest-file', '^.+\\.(jpg)$': 'jest-file', '^.+\\.(svg)$': './node_modules/@plone/volto/jest-svgsystem-transform.js', @@ -33,4 +43,9 @@ module.exports = { statements: 5, }, }, -}; + ...(process.env.JEST_USE_SETUP === 'ON' && { + setupFilesAfterEnv: [ + '/node_modules/@eeacms/volto-metadata-block/jest.setup.js', + ], + }), +} diff --git a/jest.setup.js b/jest.setup.js new file mode 100644 index 0000000..85b16f7 --- /dev/null +++ b/jest.setup.js @@ -0,0 +1,65 @@ +import { jest } from '@jest/globals'; +import configureStore from 'redux-mock-store'; +import thunk from 'redux-thunk'; +import { blocksConfig } from '@plone/volto/config/Blocks'; +import installSlate from '@plone/volto-slate/index'; + +var mockSemanticComponents = jest.requireActual('semantic-ui-react'); +var mockComponents = jest.requireActual('@plone/volto/components'); +var config = jest.requireActual('@plone/volto/registry').default; + +config.blocks.blocksConfig = { + ...blocksConfig, + ...config.blocks.blocksConfig, +}; + +jest.doMock('semantic-ui-react', () => ({ + __esModule: true, + ...mockSemanticComponents, + Popup: ({ content, trigger }) => { + return ( +
+
{trigger}
+
{content}
+
+ ); + }, +})); + +jest.doMock('@plone/volto/components', () => { + return { + __esModule: true, + ...mockComponents, + SidebarPortal: ({ children }) => , + }; +}); + +jest.doMock('@plone/volto/registry', () => + [installSlate].reduce((acc, apply) => apply(acc), config), +); + +const mockStore = configureStore([thunk]); + +global.fetch = jest.fn(() => + Promise.resolve({ + json: () => Promise.resolve({}), + }), +); + +global.store = mockStore({ + intl: { + locale: 'en', + messages: {}, + formatMessage: jest.fn(), + }, + content: { + create: {}, + subrequests: [], + }, + connected_data_parameters: {}, + screen: { + page: { + width: 768, + }, + }, +}); diff --git a/package.json b/package.json index 9903b7a..494d103 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@eeacms/volto-metadata-block", - "version": "6.0.6", + "version": "7.0.0", "description": "Volto Metadata Block", "main": "src/index.js", "author": "European Environment Agency: IDM2 A-Team", @@ -25,6 +25,7 @@ "@cypress/code-coverage": "^3.10.0", "@plone/scripts": "*", "babel-plugin-transform-class-properties": "^6.24.1", + "dotenv": "^16.3.2", "husky": "^8.0.3", "lint-staged": "^14.0.1", "md5": "^2.3.0" diff --git a/src/components/manage/Blocks/Metadata/View.test.jsx b/src/components/manage/Blocks/Metadata/View.test.jsx index caf98d9..8768e35 100644 --- a/src/components/manage/Blocks/Metadata/View.test.jsx +++ b/src/components/manage/Blocks/Metadata/View.test.jsx @@ -1,8 +1,9 @@ import React from 'react'; import { Provider } from 'react-intl-redux'; -import renderer from 'react-test-renderer'; +import { render, screen } from '@testing-library/react'; import configureStore from 'redux-mock-store'; import ViewMetadataBlock from './View'; +import '@testing-library/jest-dom/extend-expect'; const mockStore = configureStore(); @@ -36,12 +37,11 @@ jest.mock('@plone/volto/registry', () => ({ describe('ViewMetadataBlock', () => { it('renders correctly', () => { - const component = renderer.create( + render( , ); - const json = component.toJSON(); - expect(json).toMatchSnapshot(); + expect(screen.getByText('Mock Widget')).toBeInTheDocument(); }); }); diff --git a/src/components/manage/Blocks/Metadata/__snapshots__/View.test.jsx.snap b/src/components/manage/Blocks/Metadata/__snapshots__/View.test.jsx.snap deleted file mode 100644 index f355590..0000000 --- a/src/components/manage/Blocks/Metadata/__snapshots__/View.test.jsx.snap +++ /dev/null @@ -1,7 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`ViewMetadataBlock renders correctly 1`] = ` -
- Mock Widget -
-`; diff --git a/src/components/manage/Blocks/MetadataSection/EditMetadataSection.test.jsx b/src/components/manage/Blocks/MetadataSection/EditMetadataSection.test.jsx index 1254a67..ca14037 100644 --- a/src/components/manage/Blocks/MetadataSection/EditMetadataSection.test.jsx +++ b/src/components/manage/Blocks/MetadataSection/EditMetadataSection.test.jsx @@ -1,15 +1,29 @@ import React from 'react'; import { Provider } from 'react-intl-redux'; -import renderer from 'react-test-renderer'; +import { render, screen } from '@testing-library/react'; import configureStore from 'redux-mock-store'; import EditMetadataSectionBlock from './EditMetadataSection'; +import MetadataSectionSchema from './schema'; +import '@testing-library/jest-dom/extend-expect'; const mockStore = configureStore(); jest.mock('@plone/volto/components', () => ({ - BlockDataForm: () =>
BlockDataForm
, - SidebarPortal: () =>
SidebarPortal
, - Field: () =>
Field
, + BlockDataForm: ({ title, children }) => ( +
+

{title}

+ {children} +
+ ), + SidebarPortal: ({ children }) => ( +
{children}
+ ), + Field: ({ id, title }) => ( +
+ + +
+ ), })); const store = mockStore({ @@ -20,23 +34,24 @@ const store = mockStore({ }); describe('EditMetadataSection', () => { + const props = { + selected: true, + block: 'some-block', + data: {}, + onChangeBlock: jest.fn(), + properties: {}, + onChangeField: jest.fn(), + }; it('renders the block correctly', () => { - const props = { - selected: true, - block: 'some-block', - data: {}, - onChangeBlock: jest.fn(), - properties: {}, - onChangeField: jest.fn(), - }; - - const component = renderer.create( + render( , ); - const json = component.toJSON(); - expect(json).toMatchSnapshot(); + const blockDataForm = screen + .getByRole('heading', { name: MetadataSectionSchema.title }) + .closest('div'); + expect(blockDataForm).toBeInTheDocument(); }); }); diff --git a/src/components/manage/Blocks/MetadataSection/ViewMetadataSection.test.jsx b/src/components/manage/Blocks/MetadataSection/ViewMetadataSection.test.jsx index affafe4..1a89668 100644 --- a/src/components/manage/Blocks/MetadataSection/ViewMetadataSection.test.jsx +++ b/src/components/manage/Blocks/MetadataSection/ViewMetadataSection.test.jsx @@ -1,11 +1,12 @@ import React from 'react'; import { Provider } from 'react-redux'; -import renderer from 'react-test-renderer'; +import { render, screen } from '@testing-library/react'; import { MetadataSectionListingView, MetadataSectionTableView, } from './ViewMetadataSection'; import config from '@plone/volto/registry'; +import '@testing-library/jest-dom/extend-expect'; const mockStore = { getState: () => ({ @@ -56,14 +57,21 @@ describe('MetadataSectionListingView', () => { ], }; - const component = renderer.create( + const { container } = render( , ); - const json = component.toJSON(); - expect(json).toMatchSnapshot(); + const field1Label = container.querySelector('label.block.metadata.field1'); + expect(field1Label).toHaveTextContent('Title field1'); + const field2Label = container.querySelector('label.block.metadata.field2'); + expect(field2Label).toHaveTextContent('Title field2'); + + const field1Widget = container.querySelector('div'); + expect(field1Widget).toHaveTextContent('Widget Component'); + const field2Widget = container.querySelector('div'); + expect(field2Widget).toHaveTextContent('Widget Component'); }); }); @@ -97,13 +105,13 @@ describe('MetadataSectionTableView', () => { ], }; - const component = renderer.create( + render( , ); - const json = component.toJSON(); - expect(json).toMatchSnapshot(); + const table = screen.getByRole('table'); + expect(table).toHaveClass('ui celled striped compact table'); }); }); diff --git a/src/components/manage/Blocks/MetadataSection/__snapshots__/EditMetadataSection.test.jsx.snap b/src/components/manage/Blocks/MetadataSection/__snapshots__/EditMetadataSection.test.jsx.snap deleted file mode 100644 index 1b40a9c..0000000 --- a/src/components/manage/Blocks/MetadataSection/__snapshots__/EditMetadataSection.test.jsx.snap +++ /dev/null @@ -1,19 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`EditMetadataSection renders the block correctly 1`] = ` -
-
- SidebarPortal -
-
- - No fields selected -
-
-`; diff --git a/src/components/manage/Blocks/MetadataSection/__snapshots__/ViewMetadataSection.test.jsx.snap b/src/components/manage/Blocks/MetadataSection/__snapshots__/ViewMetadataSection.test.jsx.snap deleted file mode 100644 index d09c10b..0000000 --- a/src/components/manage/Blocks/MetadataSection/__snapshots__/ViewMetadataSection.test.jsx.snap +++ /dev/null @@ -1,37 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`MetadataSectionListingView renders fields correctly 1`] = ` -Array [ - , -
- Widget Component -
, - , -
- Widget Component -
, -] -`; - -exports[`MetadataSectionTableView renders table with fields correctly 1`] = ` - - - - - -
-`;