Skip to content

Commit

Permalink
Merge pull request #15 from eea/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
avoinea committed Jan 3, 2022
2 parents edb7832 + 1ae0844 commit a5d2472
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 4 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +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).

#### [1.2.10](https://github.com/eea/volto-tabs-block/compare/1.2.9...1.2.10)

- more tests [`0e30f6e`](https://github.com/eea/volto-tabs-block/commit/0e30f6eb615fb4fcb941c7480dc340abf0e1167f)
- more cy tests [`3aff15c`](https://github.com/eea/volto-tabs-block/commit/3aff15c3cb8247beee2bf80598e2f03400b3a479)

#### [1.2.9](https://github.com/eea/volto-tabs-block/compare/1.2.8...1.2.9)

- Add SonarQube badges [`f2865ff`](https://github.com/eea/volto-tabs-block/commit/f2865ff2b36f04d8cb132e851a76af6c04846165)
> 18 December 2021
- Add SonarQube badges [`#14`](https://github.com/eea/volto-tabs-block/pull/14)

#### [1.2.8](https://github.com/eea/volto-tabs-block/compare/1.2.7...1.2.8)

Expand Down
5 changes: 3 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ pipeline {
node(label: 'docker') {
script {
try {
sh '''docker pull plone; docker run -d --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="profile-plone.restapi:blocks" plone fg'''
sh '''docker pull plone; docker run -d --rm --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="profile-plone.restapi:blocks" plone fg'''
sh '''docker pull plone/volto-addon-ci; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" plone/volto-addon-ci cypress'''
} finally {
try {
Expand All @@ -142,7 +142,8 @@ pipeline {
reportName: 'CypressCoverage',
reportTitles: 'Integration Tests Code Coverage'])
}
archiveArtifacts artifacts: 'cypress-reports/videos/*.mp4', fingerprint: true
sh '''touch empty_file; for ok_test in $(grep -E 'file=.*failures="0"' $(grep 'testsuites .*failures="0"' $(find cypress-results -name *.xml) empty_file | awk -F: '{print $1}') empty_file | sed 's/.* file="\\(.*\\)" time.*/\\1/' | sed 's#^cypress/integration/##g' | sed 's#^../../../node_modules/@eeacms/##g'); do rm -f cypress-reports/videos/$ok_test.mp4; rm -f cypress-reports/$ok_test.mp4; done'''
archiveArtifacts artifacts: 'cypress-reports/**/*.mp4', fingerprint: true, allowEmptyArchive: true
stash name: "cypress-coverage", includes: "cypress-coverage/**", allowEmpty: true
}
finally {
Expand Down
44 changes: 44 additions & 0 deletions cypress/integration/block-basics.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,56 @@ describe('Blocks Tests', () => {
cy.get('.blocks-chooser .title').contains('Media').click();
cy.get('.content.active.media .button.image').contains('Image').click();

cy.get('[contenteditable=true]').first().type('{enter}');
cy.get('.ui.basic.icon.button.block-add-button').first().click();
cy.get('.blocks-chooser .title').contains('Common').click();
cy.get('.tabs_block').click();

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

cy.get('.field-wrapper-menuAlign #field-menuAlign').click();
cy.get('.react-select__menu').contains('Left').click();
cy.get('.field-wrapper-menuPosition #field-menuPosition').first().click();
cy.get('.react-select__menu').contains('Inline').click();

cy.get('.tabs-block.edit .block.text').first().type("Hydrogen");
cy.get('.tabs-block .ui.left.menu .item').last().click();
cy.get('.tabs-block').contains('Tab 2').click();
cy.get('.tabs-block.edit .block.text').first().type("Oxygen");



cy.get('[contenteditable=true]').first().type('{enter}');
cy.get('.ui.basic.icon.button.block-add-button').first().click();
cy.get('.blocks-chooser .title').contains('Common').click();
cy.get('.tabs_block').first().click();


cy.get('.field-wrapper-template #field-template').click();
cy.get('.react-select__menu').contains('Carousel horizontal').click();
cy.get('.field-wrapper-verticalAlign #field-verticalAlign').click();
cy.get('.react-select__menu').contains('Bottom').click();
cy.get('.field-wrapper-theme #field-theme').click();
cy.get('.react-select__menu').contains('Dark').click();
cy.get('.tabs-block .ui.left.menu .item').eq(1).click();


// 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.contains('Hydrogen');

cy.get('.tabs-block p').contains('Tab 2').click();
cy.contains('Oxygen');

cy.get('.slick-arrow').click();
cy.get('.block.image');
});
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eeacms/volto-tabs-block",
"version": "1.2.9",
"version": "1.2.10",
"description": "volto-tabs-block: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down

0 comments on commit a5d2472

Please sign in to comment.