Skip to content

Commit

Permalink
Merge pull request #68 from eea/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
avoinea authored Sep 26, 2023
2 parents bf4b694 + 5295ccf commit 90d8017
Show file tree
Hide file tree
Showing 14 changed files with 1,877 additions and 109 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
20 changes: 19 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,25 @@ 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).

### [5.1.0](https://github.com/eea/volto-tabs-block/compare/5.0.8...5.1.0) - 25 August 2023
### [6.0.0](https://github.com/eea/volto-tabs-block/compare/5.1.0...6.0.0) - 26 September 2023

#### :rocket: New Features

- feat: add contition to use linking feature if the field 'Allow linking' is selected [Cretu Mihaela - [`219aea5`](https://github.com/eea/volto-tabs-block/commit/219aea57a3789b56278d6c7acedf30df52e3465f)]
- feat: add selected tab id in query params [Cretu Mihaela - [`11aa9ab`](https://github.com/eea/volto-tabs-block/commit/11aa9abfcb65d60ff4614fb6cf903a324a570879)]

#### :house: Internal changes

- style: lint-staged reorder in package.json [Alin Voinea - [`2b42a62`](https://github.com/eea/volto-tabs-block/commit/2b42a623c51edad9fd80266ab1caed310467882f)]

#### :hammer_and_wrench: Others

- Release 6.0.0 [Alin Voinea - [`3d88327`](https://github.com/eea/volto-tabs-block/commit/3d883276924f50011b09d36646a1914b3164ccb1)]
- test: Add cypress tests to increase coverage [Crețu Mihaela - [`ae3ae66`](https://github.com/eea/volto-tabs-block/commit/ae3ae663b83fcdf9fe453f4fae169548475d13b5)]
- test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`df9b88d`](https://github.com/eea/volto-tabs-block/commit/df9b88d8cf31d6090ab20cc536558d7d734cc0ef)]
- i18n: Add en [Alin Voinea - [`352b810`](https://github.com/eea/volto-tabs-block/commit/352b810625978afb3a550caca58faeaea6832de4)]
- remove 'allow linking' checkbox [Cretu Mihaela - [`f414fdf`](https://github.com/eea/volto-tabs-block/commit/f414fdf754d1c63bf097b3eb018eb1d6504810cf)]
### [5.1.0](https://github.com/eea/volto-tabs-block/compare/5.0.8...5.1.0) - 28 August 2023

#### :rocket: New Features

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
72 changes: 72 additions & 0 deletions cypress/e2e/01-block-tabs.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,76 @@ describe('Blocks Tests', () => {
cy.get('.slick-arrow').click();
cy.get('.block.image');
});

it('Add Tabs Block Horizontal', () => {
// Change page title
cy.clearSlateTitle();
cy.getSlateTitle().type('My Add-on Page');

cy.get('.documentFirstHeading').contains('My Add-on Page');
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.tabs_block')
.contains('Tabs')
.click({ force: true });

cy.get('.field-wrapper-title input').last().type('Tab 1');
cy.get('.field-wrapper-template #field-template').click();
cy.get('.react-select__menu').contains('Horizontal responsive').click();

cy.get('.tabs-block [contenteditable=true]').first().type('Horizontal First Item');
cy.get('.tabs-block .horizontal-responsive .ui.text.menu .item').last().click({force: true});
cy.get('.tabs-block').contains('Tab 2').click();
cy.get('.tabs-block.edit [contenteditable=true]').first().type('Horizontal Second Item');

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

// then the page view should contain our changes
cy.contains('My Add-on Page');
cy.get('.tabs-block .horizontal-responsive.tabs').should('exist');
cy.contains('Horizontal First Item');

cy.get('.tabs-block p').contains('Tab 2').click();
cy.contains('Horizontal Second Item');
});

it('Add Tabs Block Accordion', () => {
// Change page title
cy.clearSlateTitle();
cy.getSlateTitle().type('My Add-on Page');

cy.get('.documentFirstHeading').contains('My Add-on Page');
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.tabs_block')
.contains('Tabs')
.click({ force: true });

cy.get('.field-wrapper-title input').last().type('Tab 1');
cy.get('.field-wrapper-template #field-template').click();
cy.get('.react-select__menu').contains('Accordion responsive').click();

cy.get('.tabs-block [contenteditable=true]').first().type('Accordion First Item');
cy.get('.tabs-block .menu-item-text').last().click({force: true});
cy.get('.tabs-block').contains('Tab 2').click();
cy.get('.tabs-block.edit [contenteditable=true]').first().type('Accordion Second Item');

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

// then the page view should contain our changes
cy.contains('My Add-on Page');
cy.get('.tabs-block.accordion').should('exist');
cy.contains('Accordion First Item');

cy.get('.tabs-block').contains('Tab 2').click();
cy.contains('Accordion Second Item');
});
});
Loading

0 comments on commit 90d8017

Please sign in to comment.