Skip to content

Commit

Permalink
Merge pull request #169 from eea/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
avoinea authored Sep 27, 2023
2 parents e3de36b + 9ec2d53 commit 9e0ba7a
Show file tree
Hide file tree
Showing 14 changed files with 464 additions and 57 deletions.
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[ -n "$CI" ] && exit 0
yarn lint-staged
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@ 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).

### [1.22.0](https://github.com/eea/volto-eea-website-theme/compare/1.21.0...1.22.0) - 26 September 2023

#### :rocket: New Features

- feat: Sync Sharing component customzation to Volto 16.24.0 - refs #256039 [Alin Voinea - [`5dd215e`](https://github.com/eea/volto-eea-website-theme/commit/5dd215e4782e3ef47d558a8d57f979979496e5d9)]

#### :bug: Bug Fixes

- fix(tests): fix failing cypress tests [kreafox - [`6f729e4`](https://github.com/eea/volto-eea-website-theme/commit/6f729e40780cd02999685382f51903e0b988d647)]
- fix(tests): fix failing cypress tests [kreafox - [`cccf2c5`](https://github.com/eea/volto-eea-website-theme/commit/cccf2c561621e60ae76b1eab6a34a078f72b6bce)]
- fix(tests): fix failing cypress tests [kreafox - [`89f7572`](https://github.com/eea/volto-eea-website-theme/commit/89f7572850928501812b7cbaeea2db7346aeda82)]
- fix(tests): fix failing cypress tests [kreafox - [`fc4d65d`](https://github.com/eea/volto-eea-website-theme/commit/fc4d65de6b437cf699f70babb76de80be9b80681)]

#### :house: Internal changes

- style: lint-staged reorder in package.json [Alin Voinea - [`e9db5f2`](https://github.com/eea/volto-eea-website-theme/commit/e9db5f22d8d6b43383d40d3cb6415ee7ab4c9e70)]

#### :hammer_and_wrench: Others

- Release 1.22.0 [Alin Voinea - [`50f6493`](https://github.com/eea/volto-eea-website-theme/commit/50f649344153f7501f6e9f917fc0a44923271bd2)]
- test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`56b7442`](https://github.com/eea/volto-eea-website-theme/commit/56b744237da1f9ba688b7b2e06a20e1758364c31)]
### [1.21.0](https://github.com/eea/volto-eea-website-theme/compare/1.20.0...1.21.0) - 5 September 2023

#### :house: Internal changes
Expand Down
66 changes: 45 additions & 21 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,17 @@ pipeline {

stage('Tests') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
anyOf {
not { changelog '.*^Automated release [0-9\\.]+$' }
branch 'master'
anyOf {
allOf {
not { environment name: 'CHANGE_ID', value: '' }
environment name: 'CHANGE_TARGET', value: 'develop'
}
allOf {
environment name: 'CHANGE_ID', value: ''
anyOf {
not { changelog '.*^Automated release [0-9\\.]+$' }
branch 'master'
}
}
}
}
Expand Down Expand Up @@ -110,11 +116,17 @@ pipeline {

stage('Integration tests') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
anyOf {
not { changelog '.*^Automated release [0-9\\.]+$' }
branch 'master'
anyOf {
allOf {
not { environment name: 'CHANGE_ID', value: '' }
environment name: 'CHANGE_TARGET', value: 'develop'
}
allOf {
environment name: 'CHANGE_ID', value: ''
anyOf {
not { changelog '.*^Automated release [0-9\\.]+$' }
branch 'master'
}
}
}
}
Expand Down Expand Up @@ -167,13 +179,19 @@ pipeline {

stage('Report to SonarQube') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
anyOf {
branch 'master'
allOf {
branch 'develop'
not { changelog '.*^Automated release [0-9\\.]+$' }
anyOf {
allOf {
not { environment name: 'CHANGE_ID', value: '' }
environment name: 'CHANGE_TARGET', value: 'develop'
}
allOf {
environment name: 'CHANGE_ID', value: ''
anyOf {
allOf {
branch 'develop'
not { changelog '.*^Automated release [0-9\\.]+$' }
}
branch 'master'
}
}
}
Expand All @@ -199,10 +217,16 @@ pipeline {

stage('SonarQube compare to master') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
branch 'develop'
not { changelog '.*^Automated release [0-9\\.]+$' }
anyOf {
allOf {
not { environment name: 'CHANGE_ID', value: '' }
environment name: 'CHANGE_TARGET', value: 'develop'
}
allOf {
environment name: 'CHANGE_ID', value: ''
branch 'develop'
not { changelog '.*^Automated release [0-9\\.]+$' }
}
}
}
steps {
Expand Down
4 changes: 2 additions & 2 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ const { defineConfig } = require('cypress');

module.exports = defineConfig({
viewportWidth: 1280,
defaultCommandTimeout: 8888,
defaultCommandTimeout: 5000,
chromeWebSecurity: false,
reporter: 'junit',
video: true,
retries: {
runMode: 8,
runMode: 1,
openMode: 0,
},
reporterOptions: {
Expand Down
11 changes: 6 additions & 5 deletions cypress/e2e/01-block-basics.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,23 @@ describe('Blocks Tests', () => {
cy.get('.documentFirstHeading').click();
cy.get('a').contains('Block').click();
cy.get(`[aria-label="Add RSS Link"]`).click();
cy.get('#field-title-0-rssLinks-0').type('Test EEA Theme');
cy.get('#field-href-2-rssLinks-0').type('test.com');
cy.get('#field-title-0-rssLinks-0').type('RSS');
cy.get('#field-href-2-rssLinks-0').type('/cypress/my-page/rss');

//add a block
cy.getSlate().click();
cy.get('.ui.basic.icon.button.block-add-button').first().click();
cy.get('.blocks-chooser .title').contains('Media').click();
cy.get('.content.active.media .button.image').contains('Image').click();

// check banner rss link
cy.get('.button.rssfeed').click();

// Save
cy.get('#toolbar-save').click();
cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page');

// check banner rss link
cy.get('.button.rssfeed').should('have.attr', 'href', '/cypress/my-page/rss');
cy.get('.button.rssfeed').contains('RSS');

// then the page view should contain our changes
cy.contains('My Add-on Page');
cy.get('.block.image');
Expand Down
8 changes: 6 additions & 2 deletions cypress/e2e/02-flexGroup.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ describe('Flex Group Variation Tests', () => {
cy.getSlate().click();
cy.get('.ui.basic.icon.button.block-add-button').first().click();
cy.get('.blocks-chooser .title').contains('Common').click();
cy.get('.content.active.common .button.group').contains('Section').click();
cy.get('.content.active.common .button.group')
.contains('Section')
.should('be.visible')
.click({ force: true });

// Save
cy.get('#toolbar-save').click();
Expand All @@ -42,7 +45,8 @@ describe('Flex Group Variation Tests', () => {
cy.get('.blocks-chooser .title').contains('Common').click();
cy.get('.content.active.common .button.group')
.contains('Section (Group)')
.click();
.should('be.visible')
.click({ force: true });

cy.contains('Section').click();

Expand Down
8 changes: 5 additions & 3 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,9 +408,11 @@ Cypress.Commands.add('clearSlate', (selector) => {
});

Cypress.Commands.add('getSlateTitle', () => {
return cy.get(SLATE_TITLE_SELECTOR, {
timeout: 10000,
});
return cy
.get(SLATE_TITLE_SELECTOR, {
timeout: 10000,
})
.should('be.visible');
});

Cypress.Commands.add('clearSlateTitle', () => {
Expand Down
28 changes: 26 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eeacms/volto-eea-website-theme",
"version": "1.21.0",
"version": "1.22.0",
"description": "@eeacms/volto-eea-website-theme: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down Expand Up @@ -31,9 +31,32 @@
"@cypress/code-coverage": "^3.10.0",
"@plone/scripts": "*",
"babel-plugin-transform-class-properties": "^6.24.1",
"husky": "*",
"lint-staged": "*",
"md5": "^2.3.0",
"postcss-less": "6.0.0"
},
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx,json}": [
"make lint-fix",
"make prettier-fix"
],
"src/**/*.{jsx}": [
"make i18n"
],
"theme/**/*.{css,less}": [
"make stylelint-fix"
],
"src/**/*.{css,less}": [
"make stylelint-fix"
],
"theme/**/*.overrides": [
"make stylelint-fix"
],
"src/**/*.overrides": [
"make stylelint-fix"
]
},
"scripts": {
"release": "release-it",
"release-major-beta": "release-it major --preRelease=beta",
Expand All @@ -51,6 +74,7 @@
"lint:fix": "make lint-fix",
"i18n": "make i18n",
"cypress:run": "make cypress-run",
"cypress:open": "make cypress-open"
"cypress:open": "make cypress-open",
"prepare": "husky install"
}
}
4 changes: 4 additions & 0 deletions src/components/manage/Blocks/Title/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export default {
'hideCreationDate',
'hidePublishingDate',
'hideModificationDate',
'subtitle',
'info',
],
},
Expand Down Expand Up @@ -94,6 +95,9 @@ export default {
title: 'Hide download button',
type: 'boolean',
},
subtitle: {
title: 'Subtitle',
},
rssLinks: {
title: 'RSS Links',
widget: 'object_list',
Expand Down
2 changes: 2 additions & 0 deletions src/components/theme/Banner/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ const View = (props) => {
copyrightIcon,
copyrightPosition,
rssLinks,
subtitle,
// contentType,
} = props.data;
const copyrightPrefix =
Expand Down Expand Up @@ -199,6 +200,7 @@ const View = (props) => {
</>
}
>
{subtitle && <Banner.Subtitle>{subtitle}</Banner.Subtitle>}
<Title config={banner.title} properties={metadata} />
<Banner.Metadata>
<Banner.MetadataField
Expand Down
2 changes: 2 additions & 0 deletions src/customizations/@root/theme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import '@eeacms/volto-eea-design-system/semantic.less';
import '@plone/volto/../theme/themes/pastanaga/extras/extras.less';
Loading

0 comments on commit 9e0ba7a

Please sign in to comment.