Skip to content

Commit

Permalink
Merge branch 'master' into typescript-support-in-core
Browse files Browse the repository at this point in the history
* master: (42 commits)
  make selectedView and className props available for Search block (#4997)
  Release @plone/volto-testing 4.0.0-alpha.0
  Release 17.0.0-alpha.21
  Upgrade to Cypress 12.17.1 (latest) (#4981)
  Image rendering (#3337)
  feat(Url.js): add getFieldURL helper function to get the url value of a field based on its structure (#4731)
  Handle @linkintegrity response with items but no breaches (#4832)
  Release 17.0.0-alpha.20
  Use all the apiExpanders in use, so we perform a single request for getting all the required data. (#4946)
  Fix the condition deciding on listing pagination format so it takes into account container blocks as well (#4978)
  Release 17.0.0-alpha.19
  Fix search block input clear button doesn't reset the search (#4837)
  Add /ok route as an express middleware (#4432)
  handles condition for yearly frequency in recurrence (#4604)
  Remove dangling out of place Guillotina Cypress tests (#4980)
  Update to latest plone.restapi and Plone 6.0.6 (#4979)
  Update browserlist (#4977)
  `Links and references` view via content menu [Add `Links to item` view] (#4787)
  Release 17.0.0-alpha.18
  Toc responsive (#4912)
  ...
  • Loading branch information
sneridagh committed Jul 24, 2023
2 parents df15ce4 + 03cd36d commit 009e4c4
Show file tree
Hide file tree
Showing 215 changed files with 4,955 additions and 2,708 deletions.
109 changes: 109 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,115 @@

<!-- towncrier release notes start -->

## 17.0.0-alpha.21 (2023-07-23)

### Breaking

- Added new Image component to render optimized images @pnicolli @davisagli [#3337](https://github.com/plone/volto/issues/3337)

### Feature

- Add getFieldURL helper function used to get the url value of a field based on its structure. @razvanMiu [#2252](https://github.com/plone/volto/issues/2252)

### Bugfix

- Fix delete confirmation to handle empty `breaches`. @davisagli [#4832](https://github.com/plone/volto/issues/4832)

### Internal

- Upgrade to Cypress 12.17.1 (latest) @sneridagh [#4981](https://github.com/plone/volto/issues/4981)


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

### Feature

- Use all the apiExpanders in use, so we perform a single request for getting all the required data. @sneridagh [#4946](https://github.com/plone/volto/issues/4946)

### Bugfix

- Fix the condition deciding on listing pagination format so it takes into account container blocks as well @sneridagh [#4978](https://github.com/plone/volto/issues/4978)


## 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=
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
25 changes: 20 additions & 5 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import '@testing-library/cypress/add-commands';
import { getIfExists } from '../helpers';
import { ploneAuth } from './constants';

Expand All @@ -21,6 +20,25 @@ const ploneAuthObj = {
pass: ploneAuth[1],
};

export * from './volto-slate';

// --- 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 +689,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
3 changes: 1 addition & 2 deletions cypress/support/e2e.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@testing-library/cypress/add-commands';
import 'cypress-axe';
import 'cypress-file-upload';
import './commands';
Expand Down Expand Up @@ -28,5 +29,3 @@ afterEach(function () {
teardown();
}
});

export * from './volto-slate';
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();
});
});
Loading

0 comments on commit 009e4c4

Please sign in to comment.