Skip to content

Commit

Permalink
Merge pull request #71 from eea/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
avoinea authored Jul 22, 2024
2 parents 6f1ffef + 917475a commit eaabc4e
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 28 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ 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).

### [8.0.4](https://github.com/eea/volto-tableau/compare/8.0.3...8.0.4) - 22 July 2024

#### :hammer_and_wrench: Others

- Add Sonarqube tag using insitu-frontend addons list [EEA Jenkins - [`22eeee9`](https://github.com/eea/volto-tableau/commit/22eeee93cfa8516261bb037a4bffef654af7a179)]
- Revert "Add fullwidth property" [Miu Razvan - [`ea36e3c`](https://github.com/eea/volto-tableau/commit/ea36e3c4be0ff20999a5ea7ced69cc77f287ced5)]
- Add fullwidth property [Miu Razvan - [`8d21ed0`](https://github.com/eea/volto-tableau/commit/8d21ed0b219f94d18998155a77acf2a0c50c9338)]
### [8.0.3](https://github.com/eea/volto-tableau/compare/8.0.2...8.0.3) - 14 June 2024

#### :hammer_and_wrench: Others
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pipeline {
environment {
GIT_NAME = "volto-tableau"
NAMESPACE = "@eeacms"
SONARQUBE_TAGS = "volto.eea.europa.eu,climate-energy.eea.europa.eu,forest.eea.europa.eu,biodiversity.europa.eu,water.europa.eu-freshwater,water.europa.eu-marine,industry.eea.europa.eu,demo-www.eea.europa.eu,www.eea.europa.eu-en"
SONARQUBE_TAGS = "volto.eea.europa.eu,climate-energy.eea.europa.eu,forest.eea.europa.eu,biodiversity.europa.eu,water.europa.eu-freshwater,water.europa.eu-marine,industry.eea.europa.eu,demo-www.eea.europa.eu,www.eea.europa.eu-en,insitu.copernicus.eu"
DEPENDENCIES = ""
BACKEND_PROFILES = "eea.kitkat:testing"
BACKEND_ADDONS = ""
Expand Down
14 changes: 9 additions & 5 deletions cypress/e2e/block-basics.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,19 @@ describe('Blocks Tests', () => {

cy.get('.documentFirstHeading').contains('My Add-on Page');

cy.getSlate().click();
cy.getSlate().click({ force: true });

// Add block
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();
cy.get('.ui.basic.icon.button.block-add-button')
.first()
.click({ force: true });
cy.get('.blocks-chooser .title').contains('Media').click({ force: true });
cy.get('.content.active.media .button.image')
.contains('Image')
.click({ force: true });

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

// then the page view should contain our changes
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/block-tableau.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ describe('Blocks Tests', () => {

cy.get(
`.sidebar-container .field-wrapper-tableau_vis_url #field-tableau_vis_url`,
).type('/path/to/dashboard');
cy.get('#toolbar-save').click();
).type('/path/to/dashboard', { force: true });
cy.get('#toolbar-save').click({ force: true });
cy.wait('@content');
cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page');
});
Expand Down
24 changes: 14 additions & 10 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,9 @@ Cypress.Commands.add('getSlate', ({ createNewSlate = true } = {}) => {
},
() => {
if (createNewSlate) {
cy.get('.block.inner').last().type('{moveToEnd}{enter}');
cy.get('.block.inner')
.last()
.type('{moveToEnd}{enter}', { force: true });
}
slate = cy.get(SLATE_SELECTOR, { timeout: 10000 }).last();
},
Expand All @@ -399,11 +401,11 @@ Cypress.Commands.add('clearSlate', (selector) => {
return cy
.get(selector)
.focus()
.click()
.click({ force: true })
.wait(1000)
.type('{selectAll}')
.type('{selectAll}', { force: true })
.wait(1000)
.type('{backspace}');
.type('{backspace}', { force: true });
});

Cypress.Commands.add('getSlateTitle', () => {
Expand All @@ -419,19 +421,19 @@ Cypress.Commands.add('clearSlateTitle', () => {
Cypress.Commands.add('setSlateSelection', (subject, query, endQuery) => {
cy.get('.slate-editor.selected [contenteditable=true]')
.focus()
.click()
.click({ force: true })
.setSelection(subject, query, endQuery)
.wait(1000); // this wait is needed for the selection change to be detected after
});

Cypress.Commands.add('getSlateEditorAndType', (type) => {
cy.getSlate().focus().click().type(type);
cy.getSlate().focus().click({ force: true }).type(type, { force: true });
});

Cypress.Commands.add('setSlateCursor', (subject, query, endQuery) => {
cy.get('.slate-editor.selected [contenteditable=true]')
.focus()
.click()
.click({ force: true })
.setCursor(subject, query, endQuery)
.wait(1000);
});
Expand All @@ -446,7 +448,7 @@ Cypress.Commands.add('toolbarSave', () => {
cy.wait(1000);

// Save
cy.get('#toolbar-save').click();
cy.get('#toolbar-save').click({ force: true });
cy.waitForResourceToLoad('@navigation');
cy.waitForResourceToLoad('@breadcrumbs');
cy.waitForResourceToLoad('@actions');
Expand Down Expand Up @@ -537,14 +539,16 @@ Cypress.Commands.add(

Cypress.Commands.add('addNewBlock', (blockName, createNewSlate = false) => {
let block;
block = cy.getSlate(createNewSlate).type(`/${blockName}{enter}`);
block = cy
.getSlate(createNewSlate)
.type(`/${blockName}{enter}`, { force: true });
return block;
});

Cypress.Commands.add('getSlate', (createNewSlate = false) => {
let slate;
if (createNewSlate) {
cy.get('.block.inner').last().type('{moveToEnd}{enter}');
cy.get('.block.inner').last().type('{moveToEnd}{enter}', { force: true });
}
cy.getIfExists(
SLATE_SELECTOR,
Expand Down
20 changes: 12 additions & 8 deletions cypress/support/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,17 @@ export const slateJsonAfterEach = (contentType = 'slate') => {
};

export const getSelectedSlateEditor = () => {
return cy.get('.slate-editor.selected [contenteditable=true]').click();
return cy
.get('.slate-editor.selected [contenteditable=true]')
.click({ force: true });
};

export const createSlateBlock = () => {
cy.get('.ui.basic.icon.button.block-add-button').first().click();
cy.get('.blocks-chooser .title').contains('Text').click();
cy.get('.ui.basic.icon.button.slate').contains('Text').click();
cy.get('.ui.basic.icon.button.block-add-button')
.first()
.click({ force: true });
cy.get('.blocks-chooser .title').contains('Text').click({ force: true });
cy.get('.ui.basic.icon.button.slate').contains('Text').click({ force: true });
return getSelectedSlateEditor();
};

Expand Down Expand Up @@ -92,17 +96,17 @@ export const createSlateBlockWithList = ({
// TODO: do not hardcode these selectors:
if (numbered) {
// this is the numbered list option in the hovering toolbar
cy.get('.slate-inline-toolbar > :nth-child(9)').click();
cy.get('.slate-inline-toolbar > :nth-child(9)').click({ force: true });
} else {
// this is the bulleted list option in the hovering toolbar
cy.get('.slate-inline-toolbar > :nth-child(10)').click();
cy.get('.slate-inline-toolbar > :nth-child(10)').click({ force: true });
}

// move the text cursor
const sse = getSelectedSlateEditor();
sse.type('{leftarrow}');
sse.type('{leftarrow}', { force: true });
for (let i = 0; i < firstItemText.length; ++i) {
sse.type('{rightarrow}');
sse.type('{rightarrow}', { force: true });
}

// simulate pressing Enter
Expand Down
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-tableau",
"version": "8.0.3",
"version": "8.0.4",
"description": "@eeacms/volto-tableau: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
2 changes: 1 addition & 1 deletion src/less/tableau.variables
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
@tableauWrapperMargin : 0 0 1rem 0;

@tableauIframePadding : 0;
@tableauIframeMargin : 0 auto 1rem auto;
@tableauIframeMargin : 0 auto 0rem auto;
@tableauIframeBorder : none;
@tableauIframeBorderRadius : 0;

0 comments on commit eaabc4e

Please sign in to comment.