Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
erral committed Jul 18, 2023
2 parents 6454d2f + 8c53970 commit 23544ad
Show file tree
Hide file tree
Showing 156 changed files with 3,514 additions and 2,118 deletions.
79 changes: 79 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,85 @@

<!-- towncrier release notes start -->

## 17.0.0-alpha.19 (2023-07-18)

### Feature

- Add /ok route as an express middleware @ionlizarazu [#4375](https://github.com/plone/volto/issues/4375)
- Add `Links to item` view (available via object's more menu) @pgrunewald [#4787](https://github.com/plone/volto/issues/4787)
- Tune 'Links to item' view to 'Links and references' view. Show all relation types. @ksuess @stevepiercy [#4842](https://github.com/plone/volto/issues/4842)
- Update browserlist to latest @sneridagh [#4977](https://github.com/plone/volto/issues/4977)

### Bugfix

- Handle condition for yearly frequency in recurrence @BhuvaneshPatil [#4498](https://github.com/plone/volto/issues/4498)
- Fix search block input clear button doesn't reset the search @iFlameing [#4828](https://github.com/plone/volto/issues/4828)

### Internal

- Update to latest plone.restapi and Plone 6.0.6 @sneridagh [#4979](https://github.com/plone/volto/issues/4979)
- Remove dangling out of place Guillotina Cypress tests @sneridagh [#4980](https://github.com/plone/volto/issues/4980)


## 17.0.0-alpha.18 (2023-07-16)

### Feature

- Refactor CommentEdit -@Tishasoumya-02 [#4075](https://github.com/plone/volto/issues/4075)
- Facets should be able to decide themselves if they should show or not. Made defaultShowFacet to be a fallback in case there is no custom function for each facet type. @tedw87 [#4579](https://github.com/plone/volto/issues/4579)
- Add backward compatibility to `slate_richtext` with fields that are plain text @razvanMiu [#4796](https://github.com/plone/volto/issues/4796)
- Refactor-Contact Form @Tishasoumya-02 [#4850](https://github.com/plone/volto/issues/4850)
- Refactor BreadcrumbsComponent @Tishasoumya-02 [#4858](https://github.com/plone/volto/issues/4858)
- Refactor SearchWidget @Tishasoumya-02 [#4864](https://github.com/plone/volto/issues/4864)
- Refactor LinkView -@Tishasoumya-02 [#4866](https://github.com/plone/volto/issues/4866)
- Use container from component registry in content type views, if defined. @sneridagh [#4962](https://github.com/plone/volto/issues/4962)

### Bugfix

- Fix temporary rendering of folder contents while query results are loading. @davisagli [#4351](https://github.com/plone/volto/issues/4351)
- Fix isBlacklisted method check for volto externalRoutes [#4725](https://github.com/plone/volto/issues/4725)
- fix(styleMenu): Highlight selected block styles @nileshgulia1 [#4851](https://github.com/plone/volto/issues/4851)
- Fix tablet main menu. [#4859](https://github.com/plone/volto/issues/4859)
- Fix the table of contents block so that if one or more items get out of the viewport, a dropdown menu appears with all the items that do not fit the viewport and also added an option to make the TOC sticky. @MihaelaCretu11 [#4907](https://github.com/plone/volto/issues/4907)
- Add a marker in the props passed to `RenderBlocks` in the Grid block view @sneridagh [#4932](https://github.com/plone/volto/issues/4932)
- Typo in Italian locales @mamico [#4944](https://github.com/plone/volto/issues/4944)
- Fix handling of overriden image in Teaser, improve in case that a custom image component is present. @sneridagh [#4964](https://github.com/plone/volto/issues/4964)
- Fix slateTable still uses old style of sidebar generation @iFlameing [#4972](https://github.com/plone/volto/issues/4972)
- Fix password autocomplete hint for login form. @davisagli [#4976](https://github.com/plone/volto/issues/4976)

### Internal

- Upgrade bundlewatch to 0.3.3. @wesleybl [#4967](https://github.com/plone/volto/issues/4967)

### Documentation

- Added note that Pluggables are not compatible with server-side rendering (SSR). @Akshat2Jain [#4735](https://github.com/plone/volto/issues/4735)
- Replace broken link for @albertcasado to use GitHub instead of Twitter. @stevepiercy [#4941](https://github.com/plone/volto/issues/4941)
- Exclude video markup from `make text` builder. @stevepiercy [#4966](https://github.com/plone/volto/issues/4966)


## 17.0.0-alpha.17 (2023-07-11)

### Breaking

- Remove useToken & useContent hooks-@Tishasoumya-02 [#4951](https://github.com/plone/volto/issues/4951)

### Feature

- Use container from component registry in content type views, if defined. @sneridagh [#4962](https://github.com/plone/volto/issues/4962)

### Bugfix

- Fix temporary rendering of folder contents while query results are loading. @davisagli [#4351](https://github.com/plone/volto/issues/4351)
- Fix isBlacklisted method check for volto externalRoutes [#4725](https://github.com/plone/volto/issues/4725)
- Add a marker in the props passed to `RenderBlocks` in the Grid block view @sneridagh [#4932](https://github.com/plone/volto/issues/4932)
- Fix handling of overriden image in Teaser, improve in case that a custom image component is present. @sneridagh [#4964](https://github.com/plone/volto/issues/4964)

### Documentation

- Replace broken link for @albertcasado to use GitHub instead of Twitter. @stevepiercy [#4941](https://github.com/plone/volto/issues/4941)


## 17.0.0-alpha.16 (2023-06-28)

### Feature
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ MAKEFLAGS+=--no-builtin-rules
# Project settings

INSTANCE_PORT=8080
DOCKER_IMAGE=plone/server-dev:6.0.5
DOCKER_IMAGE_ACCEPTANCE=plone/server-acceptance:6.0.5
KGS=plone.restapi==8.40.0
DOCKER_IMAGE=plone/server-dev:6.0.6
DOCKER_IMAGE_ACCEPTANCE=plone/server-acceptance:6.0.6
KGS=plone.restapi==8.42.0
NODEBIN = ./node_modules/.bin
SCRIPTSPACKAGE = ./packages/scripts

# Plone 5 legacy
DOCKER_IMAGE5=plone/plone-backend:5.2.10
KGS5=plone.restapi==8.37.0 plone.volto==4.0.8 plone.rest==3.0.0
DOCKER_IMAGE5=plone/plone-backend:5.2.12
KGS5=plone.restapi==8.42.0 plone.volto==4.0.8 plone.rest==3.0.0
TESTING_ADDONS=plone.app.robotframework==2.0.0 plone.app.testing==7.0.0

# Sphinx variables
Expand Down Expand Up @@ -240,7 +240,7 @@ test-acceptance: ## Start Core Cypress Acceptance Tests

.PHONY: test-acceptance-headless
test-acceptance-headless: ## Start Core Cypress Acceptance Tests in headless mode
NODE_ENV=production CYPRESS_API=plone $(NODEBIN)/cypress run
NODE_ENV=production CYPRESS_API=plone $(NODEBIN)/cypress run --config specPattern='cypress/tests/core/**/*.{js,jsx,ts,tsx}'

.PHONY: full-test-acceptance
full-test-acceptance: ## Runs Core Full Acceptance Testing in headless mode
Expand Down
2 changes: 1 addition & 1 deletion api/buildout.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[buildout]
index = https://pypi.org/simple/
extends =
http://dist.plone.org/release/6.0.5/versions.cfg
http://dist.plone.org/release/6.0.6/versions.cfg
version-constraints.cfg
versions.cfg
parts = instance plonesite site-packages test robot-server
Expand Down
22 changes: 18 additions & 4 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,23 @@ const ploneAuthObj = {
pass: ploneAuth[1],
};

// --- isInViewport ----------------------------------------------------------
Cypress.Commands.add('isInViewport', (element) => {
cy.get(element).then(($el) => {
const windowInnerWidth = Cypress.config(`viewportWidth`);
const windowInnerHeight = Cypress.config(`viewportHeight`);
const rect = $el[0].getBoundingClientRect();

const rightBoundOfWindow = windowInnerWidth;
const bottomBoundOfWindow = windowInnerHeight;

expect(rect.top).to.be.at.least(0);
expect(rect.left).to.be.at.least(0);
expect(rect.right).to.be.lessThan(rightBoundOfWindow);
expect(rect.bottom).to.be.lessThan(bottomBoundOfWindow);
});
});

// --- AUTOLOGIN -------------------------------------------------------------
Cypress.Commands.add('autologin', (usr, pass) => {
let api_url, user, password;
Expand Down Expand Up @@ -671,10 +688,7 @@ Cypress.Commands.add(
Cypress.Commands.add('toolbarSave', () => {
// Save
cy.get('#toolbar-save', { timeout: 10000 }).click();
cy.waitForResourceToLoad('@navigation');
cy.waitForResourceToLoad('@breadcrumbs');
cy.waitForResourceToLoad('@actions');
cy.waitForResourceToLoad('@types');
cy.waitForResourceToLoad('');
});

Cypress.Commands.add('clearSlate', (selector) => {
Expand Down
9 changes: 4 additions & 5 deletions cypress/support/volto-slate.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
export const slateBeforeEach = (contentType = 'Document') => {
cy.intercept('GET', `/**/*?expand*`).as('content');
cy.autologin();
cy.createContent({
contentType: contentType,
contentId: 'my-page',
contentTitle: 'My Page',
});
cy.visit('/my-page');
cy.waitForResourceToLoad('@navigation');
cy.waitForResourceToLoad('@breadcrumbs');
cy.waitForResourceToLoad('@actions');
cy.waitForResourceToLoad('@types');
cy.waitForResourceToLoad('my-page');
cy.wait('@content');

cy.navigate('/my-page/edit');
cy.wait('@content');
};

export const getSelectedSlateEditor = () => {
Expand Down
6 changes: 2 additions & 4 deletions cypress/tests/core/basic/addons-controlpanel.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
describe('Addons Control Panel Test', () => {
beforeEach(() => {
cy.intercept('GET', `/**/*?expand*`).as('content');
// given a logged in editor
// and a folder that contains a document
// and the folder contents view
cy.visit('/');
cy.autologin();
cy.visit('/controlpanel/addons');
cy.waitForResourceToLoad('@navigation');
cy.waitForResourceToLoad('@breadcrumbs');
cy.waitForResourceToLoad('@actions');
cy.waitForResourceToLoad('@types');
cy.wait('@content');
});

it('Should intall a third party addons and uninstall it', () => {
Expand Down
7 changes: 2 additions & 5 deletions cypress/tests/core/basic/aliasesContext.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
describe('Add new alias for object test', () => {
beforeEach(() => {
cy.intercept('GET', `/**/*?expand*`).as('content');
cy.autologin();
cy.createContent({
contentType: 'Document',
contentId: 'my-page',
contentTitle: 'My Page',
});
cy.visit('/my-page');
cy.waitForResourceToLoad('@navigation');
cy.waitForResourceToLoad('@breadcrumbs');
cy.waitForResourceToLoad('@actions');
cy.waitForResourceToLoad('@types');
cy.waitForResourceToLoad('my-page');
cy.wait('@content');
});
it('adds a new alias', () => {
cy.visit('/my-page/aliases');
Expand Down
7 changes: 2 additions & 5 deletions cypress/tests/core/basic/aliasesControlPanel.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
describe('Add a new alias from control panel interface', () => {
beforeEach(() => {
cy.intercept('GET', `/**/*?expand*`).as('content');
cy.autologin();
cy.createContent({
contentType: 'Document',
contentId: 'my-page',
contentTitle: 'My Page',
});
cy.visit('/my-page');
cy.waitForResourceToLoad('@navigation');
cy.waitForResourceToLoad('@breadcrumbs');
cy.waitForResourceToLoad('@actions');
cy.waitForResourceToLoad('@types');
cy.waitForResourceToLoad('my-page');
cy.wait('@content');
});
it('adds a new alias', () => {
cy.visit('/controlpanel/aliases');
Expand Down
15 changes: 15 additions & 0 deletions cypress/tests/core/basic/contactForm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
describe('Contact Form Tests', () => {
beforeEach(() => {
cy.visit('/');
});
it('renders contact Form', function () {
cy.get('a:contains("Contact")').click();
cy.get('input[name="name"]').type('Myname');
cy.get('input[name="from"]').type('admin@admin.com');
cy.get('input[name="subject"]').type('Loreum Ipsium');
cy.get('textarea[name="message"]').type('Lorem Ipsum is simply dummy text of the printing and typesetting industry.');


cy.get('button[class="ui basic primary right floated button"]').click();
});
});
27 changes: 12 additions & 15 deletions cypress/tests/core/basic/content.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
describe('Add Content Tests', () => {
beforeEach(() => {
cy.intercept('GET', `/**/*?expand*`).as('content');
// give a logged in editor and the site root
cy.autologin();
cy.visit('/');
cy.waitForResourceToLoad('@navigation');
cy.waitForResourceToLoad('@breadcrumbs');
cy.waitForResourceToLoad('@actions');
cy.waitForResourceToLoad('@types');
cy.waitForResourceToLoad('');
cy.wait('@content');
});

it('As editor I can add a file', function () {
Expand All @@ -25,11 +22,7 @@ describe('Add Content Tests', () => {
cy.wait(2000);

cy.get('#toolbar-save').focus().click();
cy.waitForResourceToLoad('@navigation');
cy.waitForResourceToLoad('@breadcrumbs');
cy.waitForResourceToLoad('@actions');
cy.waitForResourceToLoad('@types');
cy.waitForResourceToLoad('file.pdf');
cy.wait('@content');

// then a new file should have been created
cy.url().should('eq', Cypress.config().baseUrl + '/file.pdf');
Expand All @@ -45,6 +38,8 @@ describe('Add Content Tests', () => {

// then I a new page has been created
cy.get('#toolbar-save').click();
cy.wait('@content');

cy.url().should('eq', Cypress.config().baseUrl + '/my-page');

cy.get('.navigation .item.active').should('have.text', 'My Page');
Expand All @@ -57,6 +52,8 @@ describe('Add Content Tests', () => {
cy.getSlateTitle().focus().click().type('My Page').contains('My Page');
cy.getSlateEditorAndType('This is the text.').contains('This is the text');
cy.get('#toolbar-save').click();
cy.wait('@content');

cy.url().should('eq', Cypress.config().baseUrl + '/my-page');

// then a new page with a text block has been added
Expand All @@ -82,6 +79,8 @@ describe('Add Content Tests', () => {
cy.get('.field-wrapper-relatedItems button').click();
cy.get('.sidebar-container .object-listing').contains('My Page').click();
cy.get('#toolbar-save').click();
cy.wait('@content');

cy.get('#navigation').contains('Home').click();
cy.get('.toolbar-actions').contains('Contents').click();
cy.findByLabelText('/my-page').children('td').eq(1).click();
Expand All @@ -93,7 +92,6 @@ describe('Add Content Tests', () => {

it('As editor I can add an image', function () {
cy.intercept('POST', '*').as('saveImage');
cy.intercept('GET', '/**/image.png').as('getImage');
// when I add an image
cy.get('#toolbar-add').click();
cy.get('#toolbar-add-image').click();
Expand All @@ -116,7 +114,7 @@ describe('Add Content Tests', () => {

cy.get('#toolbar-save').click();
cy.wait('@saveImage');
cy.wait('@getImage');
cy.wait('@content');

cy.url().should('eq', Cypress.config().baseUrl + '/image.png');

Expand Down Expand Up @@ -167,7 +165,6 @@ describe('Add Content Tests', () => {

it('As editor I can add a Link (with an external link)', function () {
cy.intercept('POST', '*').as('saveLink');
cy.intercept('GET', '/**/my-link').as('getLink');
// When I add a link
cy.get('#toolbar-add').click();
cy.get('#toolbar-add-link').click();
Expand All @@ -182,7 +179,7 @@ describe('Add Content Tests', () => {

cy.get('#toolbar-save').click();
cy.wait('@saveLink');
cy.wait('@getLink');
cy.wait('@content');

cy.url().should('eq', Cypress.config().baseUrl + '/my-link');

Expand Down Expand Up @@ -216,7 +213,7 @@ describe('Add Content Tests', () => {

cy.get('#toolbar-save').click();
cy.wait('@saveLink');
cy.wait('@getLink');
cy.wait('@content');

cy.url().should('eq', Cypress.config().baseUrl + '/my-link');

Expand Down
11 changes: 3 additions & 8 deletions cypress/tests/core/basic/dexterity-controlpanel-layout.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
describe('ControlPanel: Dexterity Content-Types Layout', () => {
beforeEach(() => {
cy.intercept('GET', `/**/*?expand*`).as('content');
// given a logged in editor
// add a new dexterity content-type for Book
// and edit it's initial layout
cy.visit('/');
cy.autologin();
cy.visit('/controlpanel/dexterity-types');
cy.waitForResourceToLoad('@navigation');
cy.waitForResourceToLoad('@breadcrumbs');
cy.waitForResourceToLoad('@actions');
cy.waitForResourceToLoad('@types');
cy.wait('@content');
});

it('Edit Blocks Layout for Book', () => {
Expand Down Expand Up @@ -48,10 +46,7 @@ describe('ControlPanel: Dexterity Content-Types Layout', () => {
cy.get('#toolbar-save').click();

cy.visit('/');
cy.waitForResourceToLoad('@navigation');
cy.waitForResourceToLoad('@breadcrumbs');
cy.waitForResourceToLoad('@actions');
cy.waitForResourceToLoad('@types');
cy.wait('@content');

cy.get('button[class="add"]').click();
cy.get('#toolbar-add-book').click();
Expand Down
Loading

0 comments on commit 23544ad

Please sign in to comment.