diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d0e743..edf1825 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,16 @@ 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). +#### [3.0.2](https://github.com/eea/volto-widgets-view/compare/3.0.1...3.0.2) + +- Correct Cypress tests [`#8`](https://github.com/eea/volto-widgets-view/pull/8) +- Refs #142010 - Optimize Volto-addons gitflow pipelines [`1820d1b`](https://github.com/eea/volto-widgets-view/commit/1820d1b968813be6510243468dd6df430a8655d1) + #### [3.0.1](https://github.com/eea/volto-widgets-view/compare/3.0.0...3.0.1) +> 19 October 2021 + +- Consider dateLocale config. [`#7`](https://github.com/eea/volto-widgets-view/pull/7) - Add date locale config settings [`f425e19`](https://github.com/eea/volto-widgets-view/commit/f425e1980697f519cd8b0a26ae6945fbcbfc821d) ### [3.0.0](https://github.com/eea/volto-widgets-view/compare/2.1.2...3.0.0) diff --git a/Jenkinsfile b/Jenkinsfile index 6e644b9..fd89ed2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,13 +4,37 @@ pipeline { environment { GIT_NAME = "volto-widgets-view" NAMESPACE = "@eeacms" - SONARQUBE_TAGS = "volto.eea.europa.eu,forest.eea.europa.eu,biodiversity.europa.eu,www.eea.europa.eu-ims,climate-energy.eea.europa.eu,sustainability.eionet.europa.eu,clms.land.copernicus.eu" + SONARQUBE_TAGS = "volto.eea.europa.eu,forest.eea.europa.eu,biodiversity.europa.eu,www.eea.europa.eu-ims,climate-energy.eea.europa.eu,sustainability.eionet.europa.eu,clms.land.copernicus.eu,industry.eea.europa.eu" DEPENDENCIES = "" } stages { + stage('Release') { + when { + allOf { + environment name: 'CHANGE_ID', value: '' + branch 'master' + } + } + steps { + node(label: 'docker') { + withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN'),string(credentialsId: 'eea-jenkins-npm-token', variable: 'NPM_TOKEN')]) { + sh '''docker pull eeacms/gitflow''' + sh '''docker run -i --rm --name="$BUILD_TAG-gitflow-master" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" -e GIT_TOKEN="$GITHUB_TOKEN" -e NPM_TOKEN="$NPM_TOKEN" -e LANGUAGE=javascript eeacms/gitflow''' + } + } + } + } + stage('Code') { + when { + allOf { + environment name: 'CHANGE_ID', value: '' + not { branch 'master' } + not { changelog '.*^Automated release [0-9\\.]+$' } + } + } steps { parallel( @@ -36,6 +60,12 @@ pipeline { } stage('Tests') { + when { + allOf { + environment name: 'CHANGE_ID', value: '' + not { changelog '.*^Automated release [0-9\\.]+$' } + } + } steps { parallel( @@ -75,6 +105,12 @@ pipeline { } stage('Integration tests') { + when { + allOf { + environment name: 'CHANGE_ID', value: '' + not { changelog '.*^Automated release [0-9\\.]+$' } + } + } steps { parallel( @@ -122,11 +158,13 @@ pipeline { } stage('Report to SonarQube') { - // Exclude Pull-Requests when { - allOf { environment name: 'CHANGE_ID', value: '' - } + anyOf { + branch 'master' + branch 'develop' + } + not { changelog '.*^Automated release [0-9\\.]+$' } } steps { node(label: 'swarm') { @@ -156,8 +194,8 @@ pipeline { steps { node(label: 'docker') { script { - if ( env.CHANGE_BRANCH != "develop" && !( env.CHANGE_BRANCH.startsWith("hotfix")) ) { - error "Pipeline aborted due to PR not made from develop or hotfix branch" + if ( env.CHANGE_BRANCH != "develop" ) { + error "Pipeline aborted due to PR not made from develop branch" } withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN')]) { sh '''docker pull eeacms/gitflow''' @@ -168,23 +206,6 @@ pipeline { } } - stage('Release') { - when { - allOf { - environment name: 'CHANGE_ID', value: '' - branch 'master' - } - } - steps { - node(label: 'docker') { - withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN'),string(credentialsId: 'eea-jenkins-npm-token', variable: 'NPM_TOKEN')]) { - sh '''docker pull eeacms/gitflow''' - sh '''docker run -i --rm --name="$BUILD_TAG-gitflow-master" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" -e GIT_TOKEN="$GITHUB_TOKEN" -e NPM_TOKEN="$NPM_TOKEN" -e LANGUAGE=javascript eeacms/gitflow''' - } - } - } - } - } post { diff --git a/cypress/integration/block-basics.js b/cypress/integration/block-basics.js index 454084c..4daed6d 100644 --- a/cypress/integration/block-basics.js +++ b/cypress/integration/block-basics.js @@ -5,16 +5,17 @@ describe('Blocks Tests', () => { afterEach(tearDownAfterEach); it('Add Block: Empty', () => { + // without this the clear command below does nothing sometimes + cy.wait(500); + // Change page title - cy.get('.documentFirstHeading > .public-DraftStyleDefault-block') - .clear() - .type('My Add-on Page') - .get('.documentFirstHeading span[data-text]') - .contains('My Add-on Page'); - - cy.get('.documentFirstHeading > .public-DraftStyleDefault-block').type( - '{enter}', - ); + cy.get('[contenteditable=true]').first().clear(); + + cy.get('[contenteditable=true]').first().type('My Add-on Page'); + + cy.get('.documentFirstHeading').contains('My Add-on Page'); + + cy.get('[contenteditable=true]').first().type('{enter}'); // Add block cy.get('.ui.basic.icon.button.block-add-button').first().click(); diff --git a/cypress/support/index.js b/cypress/support/index.js index a3fd935..89aab00 100644 --- a/cypress/support/index.js +++ b/cypress/support/index.js @@ -44,7 +44,7 @@ export const setupBeforeEach = () => { cy.waitForResourceToLoad('@types'); cy.waitForResourceToLoad('my-page'); cy.navigate('/cypress/my-page/edit'); - cy.get(`.block.title [data-contents]`); + cy.get(`.block.title h1`); }; export const tearDownAfterEach = () => { diff --git a/package.json b/package.json index 4ebbf94..e49ac8d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@eeacms/volto-widgets-view", - "version": "3.0.1", + "version": "3.0.2", "description": "Volto Widgets in View mode", "main": "src/index.js", "author": "European Environment Agency: IDM2 A-Team",