Skip to content

Commit

Permalink
Merge branch 'main' into rac1.2.0
Browse files Browse the repository at this point in the history
* main:
  Revert "Fix 301 and 302 redirects. (#5999)" (#6008)
  Pin eslint-plugin-jsx-a11y to ^6.7.1 everywhere it's referenced (#5794)
  Allow Makefile to be modified by Makefile.local if present (#5997)
  Cypress replaced wait with assertions (#5998)
  Replace spinner with Progress bar and fix it's position . (#5620) (#5929)
  • Loading branch information
sneridagh committed May 13, 2024
2 parents f6d1ae0 + 09239bf commit 04da8fa
Show file tree
Hide file tree
Showing 43 changed files with 508 additions and 4,328 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -398,3 +398,7 @@ start-test-acceptance-server-detached: ## Start Test Acceptance Server Main Fixt
.PHONY: stop-test-acceptance-server-detached
stop-test-acceptance-server-detached: ## Stop Test Acceptance Server Main Fixture (docker container) in a detached (daemon) mode
docker kill plone-client-acceptance-server

# include local overrides if present
-include Makefile.local
-include ../../../Makefile.local
48 changes: 27 additions & 21 deletions apps/plone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -249,30 +249,34 @@
"@loadable/babel-plugin": "5.13.2",
"@loadable/webpack-plugin": "5.15.2",
"@plone/scripts": "workspace:*",
"@plone/types": "workspace:*",
"@plone/types": "1.0.0-alpha.11",
"@plone/volto-coresandbox": "workspace:*",
"@sinonjs/fake-timers": "^6.0.1",
"@storybook/addon-actions": "^6.5.15",
"@storybook/addon-controls": "6.5.15",
"@storybook/addon-docs": "^6.5.15",
"@storybook/addon-essentials": "^6.5.15",
"@storybook/addon-links": "^6.5.15",
"@storybook/addon-actions": "^8.0.4",
"@storybook/addon-controls": "^8.0.4",
"@storybook/addon-docs": "^8.0.4",
"@storybook/addon-essentials": "^8.0.4",
"@storybook/addon-links": "^8.0.4",
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
"@storybook/builder-webpack5": "^6.5.15",
"@storybook/manager-webpack5": "^6.5.15",
"@storybook/react": "^6.5.15",
"@storybook/react": "^8.0.4",
"@storybook/react-webpack5": "^8.0.4",
"@storybook/theming": "^8.0.4",
"@testing-library/cypress": "10.0.1",
"@testing-library/jest-dom": "6.4.2",
"@testing-library/react": "14.2.0",
"@testing-library/react-hooks": "8.0.1",
"@types/jest": "^29.5.8",
"@types/loadable__component": "^5.13.9",
"@types/lodash": "^4.14.201",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/react-router-dom": "^5.3.3",
"@types/react-test-renderer": "18.0.7",
"@types/uuid": "^9.0.2",
"@typescript-eslint/eslint-plugin": "7.1.1",
"@typescript-eslint/parser": "7.1.1",
"@typescript-eslint/eslint-plugin": "^7.7.0",
"@typescript-eslint/parser": "^7.7.0",
"autoprefixer": "10.4.8",
"axe-core": "4.4.2",
"babel-loader": "9.1.0",
Expand All @@ -288,16 +292,17 @@
"cypress-axe": "1.5.0",
"cypress-file-upload": "5.0.8",
"deep-freeze": "0.0.1",
"eslint": "8.49.0",
"eslint-config-prettier": "9.1.0",
"eslint-config-react-app": "7.0.1",
"eslint-import-resolver-alias": "1.1.2",
"eslint-import-resolver-babel-plugin-root-import": "1.1.1",
"eslint-plugin-import": "2.29.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-react-app": "^7.0.1",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-import-resolver-babel-plugin-root-import": "^1.1.1",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0",
"full-icu": "1.4.0",
"glob": "7.1.6",
"html-webpack-plugin": "5.5.0",
Expand Down Expand Up @@ -331,8 +336,9 @@
"release-it": "^17.1.1",
"semver": "^7.5.4",
"start-server-and-test": "1.14.0",
"storybook": "^8.0.4",
"style-loader": "3.3.1",
"stylelint": "16.2.1",
"stylelint": "^16.3.1",
"stylelint-config-idiomatic-order": "10.0.0",
"stylelint-prettier": "5.0.0",
"svg-loader": "0.0.2",
Expand All @@ -342,10 +348,10 @@
"ts-jest": "^26.4.2",
"ts-loader": "9.4.4",
"tsconfig": "*",
"typescript": "5.2.2",
"typescript": "^5.4.2",
"use-trace-update": "1.3.2",
"wait-on": "6.0.0",
"webpack": "5.76.1",
"webpack": "5.90.1",
"webpack-bundle-analyzer": "4.10.1",
"webpack-dev-server": "4.11.1",
"webpack-node-externals": "3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/plone/src/addons/volto-volto-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"eslint-config-react-app": "7.0.1",
"eslint-plugin-flowtype": "8.0.3",
"eslint-plugin-import": "2.28.1",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-prettier": "5.0.0",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/react-in-jsx-scope": "off"
"react/react-in-jsx-scope": "off",
"jsx-a11y/label-has-associated-control": "off"
},
"globals": {
"root": true,
Expand Down
1 change: 1 addition & 0 deletions packages/generator-volto/news/5785.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Disable `jsx-a11y/label-has-associated-control` so that we can use `eslint-plugin-jsx-a11y` version 6.8.0 if it's pulled by other dependencies. @ichim-david
3 changes: 2 additions & 1 deletion packages/volto/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/react-in-jsx-scope": "off"
"react/react-in-jsx-scope": "off",
"jsx-a11y/label-has-associated-control": "off"
},
"settings": {
"import/resolver": {
Expand Down
22 changes: 16 additions & 6 deletions packages/volto/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -716,11 +716,10 @@ Cypress.Commands.add('clearSlate', (selector) => {
return cy
.get(selector)
.focus()
.click({ force: true }) // fix sporadic failure this element is currently animating
.wait(1000)
.type('{selectAll}')
.wait(1000)
.type('{backspace}');
.click({ force: true })
.type('{selectAll}', { delay: 20 })
.type('{backspace}', { delay: 20 })
.wait(200);
});

Cypress.Commands.add('getSlate', (createNewSlate = false) => {
Expand Down Expand Up @@ -784,6 +783,15 @@ Cypress.Commands.add('typeInSlate', { prevSubject: true }, (subject, text) => {
);
});

Cypress.Commands.add(
'typeWithDelay',
{ prevSubject: 'element' },
(subject, text, options) => {
const delay = options && options.delay ? options.delay : 20;
cy.wrap(subject).type(text, { delay });
},
);

Cypress.Commands.add('lineBreakInSlate', { prevSubject: true }, (subject) => {
return (
cy
Expand Down Expand Up @@ -873,7 +881,9 @@ Cypress.Commands.add('addNewBlock', (blockName, createNewSlate = false) => {
});

Cypress.Commands.add('navigate', (route = '') => {
return cy.window().its('appHistory').invoke('push', route);
cy.intercept('GET', '**/*').as('navGetCall');
cy.window().its('appHistory').invoke('push', route);
cy.wait('@navGetCall');
});

Cypress.Commands.add('store', () => {
Expand Down
14 changes: 6 additions & 8 deletions packages/volto/cypress/tests/core/basic/locking.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,16 @@ describe('Document locking', () => {

cy.visit('/logout');
cy.wait('@logout');
cy.findByRole('alert')
.get('.toast-inner-content')
.should('contain', 'You have been logged out');
cy.get('.toast-dismiss-action').click();

// As another editor I can see the locked document
cy.autologin('editor2', 'password');
cy.visit('/document');
cy.wait('@content');

cy.findByRole('alert')
.get('.toast-inner-content')
.contains('This item was locked by Editor 1 on');
cy.get('.toolbar-body').should('be.visible');

// As another editor I can unlock the document
cy.findByLabelText('Unlock').click();
Expand All @@ -114,14 +115,11 @@ describe('Document locking', () => {
cy.findByLabelText('Edit').click();

// As another editor I can edit the document
cy.clearSlateTitle().type('New title by Editor 2');
cy.clearSlateTitle().typeWithDelay('New title by Editor 2');
cy.get('#toolbar-save').click();
// cy.waitForResourceToLoad('document');
cy.wait('@saveDoc');
cy.wait('@getDoc');

// cy.pause();

cy.url().should('eq', Cypress.config().baseUrl + '/document');
cy.contains('New title by Editor 2');
cy.get('h1.documentFirstHeading').should('not.be.empty');
Expand Down
32 changes: 18 additions & 14 deletions packages/volto/cypress/tests/core/blocks/listing/blocks-listing.js
Original file line number Diff line number Diff line change
Expand Up @@ -1077,38 +1077,42 @@ describe('Listing Block Tests', () => {
cy.wait('@save');
cy.wait('@content');

// The wait is needed to solve the flakyness introduced because that component
// is removed momentarilly from the DOM when saving
cy.wait(1000);
//test second pagination click
cy.get('.ui.pagination.menu a[value="2"]').first().click();
cy.get('.ui.pagination.menu a[value="2"]')
.first()
.should('be.visible')
.click();
//test f5
cy.reload();
cy.isInHTML({ parent: '.listing-item', content: 'My Folder 3' });
cy.url().should('include', '=2');
// const listing2 = cy.get('.ui.pagination.menu').last();
//test third pagination click on second listing
cy.get('.ui.pagination.menu a[value="3"]').first().click();
cy.get('.ui.pagination.menu a[value="3"]')
.first()
.should('be.visible')
.click();
//test f5
cy.reload();
cy.isInHTML({ parent: '.listing-item', content: 'My Folder 3' });
cy.url().should('include', '=2');
cy.url().should('include', '=3');
//on logo click go to home page and remove ?page=2 from path
cy.get('.logo').first().click();
cy.get('.logo').first().should('be.visible').click();
cy.url().should('not.include', '=2');
cy.url().should('not.include', '=3');

// we need to wait for the page to load otherwise we navigate /my-page
// followed by / from the logo click
cy.wait(1000);

cy.navigate('/my-page');
cy.wait(1000);
cy.get('.ui.pagination.menu a[value="2"]').first().click({ force: true });
cy.get('.ui.pagination.menu a[value="3"]').first().click({ force: true });
cy.get('.ui.pagination.menu a[value="2"]')
.first()
.should('be.visible')
.click({ force: true });
cy.get('.ui.pagination.menu a[value="3"]')
.first()
.should('be.visible')
.click({ force: true });
cy.go(-1);
cy.wait(1000);
cy.wait('@content');
cy.isInHTML({ parent: '.listing-item', content: 'My Folder 3' });
cy.url().should('not.include', '=3');
cy.go(-1);
Expand Down
15 changes: 10 additions & 5 deletions packages/volto/locales/ca/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1459,6 +1459,11 @@ msgstr "Arxiu"
msgid "Filename"
msgstr "Nom de l'arxiu"

#. Default: "Files uploaded: {uploadedFiles}"
#: components/manage/Contents/ContentsUploadModal
msgid "Files uploaded: {uploadedFiles}"
msgstr "Fitxers pujats: {uploadedFiles}"

#. Default: "Filter"
#: helpers/MessageLabels/MessageLabels
msgid "Filter"
Expand Down Expand Up @@ -3751,6 +3756,11 @@ msgstr "Total d'objectes actius i no actius"
msgid "Total comments"
msgstr "Total de comentaris"

#. Default: "Total files to upload: {totalFiles}"
#: components/manage/Contents/ContentsUploadModal
msgid "Total files to upload: {totalFiles}"
msgstr "Total fitxers per carregar: {totalFiles}"

#. Default: "Total number of objects in each cache"
#: components/manage/Controlpanels/DatabaseInformation
msgid "Total number of objects in each cache"
Expand Down Expand Up @@ -3979,11 +3989,6 @@ msgstr "Pengeu una imatge principal al camp de contingut 'Imatge principal'."
msgid "Upload files"
msgstr "Carregueu fitxers"

#. Default: "Uploading files"
#: components/manage/Contents/ContentsUploadModal
msgid "Uploading files"
msgstr "Carregant fitxers"

#. Default: "Uploading image"
#: components/manage/Blocks/Image/Edit
msgid "Uploading image"
Expand Down
15 changes: 10 additions & 5 deletions packages/volto/locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1458,6 +1458,11 @@ msgstr "Datei"
msgid "Filename"
msgstr "Dateiname"

#. Default: "Files uploaded: {uploadedFiles}"
#: components/manage/Contents/ContentsUploadModal
msgid "Files uploaded: {uploadedFiles}"
msgstr "Hochgeladene Dateien: {uploadedFiles}"

#. Default: "Filter"
#: helpers/MessageLabels/MessageLabels
msgid "Filter"
Expand Down Expand Up @@ -3750,6 +3755,11 @@ msgstr "Anzahl aktive und nicht-aktive Objekte"
msgid "Total comments"
msgstr "Anzahl Komentare"

#. Default: "Total files to upload: {totalFiles}"
#: components/manage/Contents/ContentsUploadModal
msgid "Total files to upload: {totalFiles}"
msgstr "Gesamtzahl der hochzuladenden Dateien: {totalFiles}"

#. Default: "Total number of objects in each cache"
#: components/manage/Controlpanels/DatabaseInformation
msgid "Total number of objects in each cache"
Expand Down Expand Up @@ -3976,11 +3986,6 @@ msgstr "Laden Sie ein Lead-Bild im Feld 'Lead-Bild' hoch."
#. Default: "Upload files"
#: components/manage/Contents/ContentsUploadModal
msgid "Upload files"
msgstr "Datei hochladen"

#. Default: "Uploading files"
#: components/manage/Contents/ContentsUploadModal
msgid "Uploading files"
msgstr "Dateien hochladen"

#. Default: "Uploading image"
Expand Down
15 changes: 10 additions & 5 deletions packages/volto/locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1453,6 +1453,11 @@ msgstr ""
msgid "Filename"
msgstr ""

#. Default: "Files uploaded: {uploadedFiles}"
#: components/manage/Contents/ContentsUploadModal
msgid "Files uploaded: {uploadedFiles}"
msgstr ""

#. Default: "Filter"
#: helpers/MessageLabels/MessageLabels
msgid "Filter"
Expand Down Expand Up @@ -3745,6 +3750,11 @@ msgstr ""
msgid "Total comments"
msgstr ""

#. Default: "Total files to upload: {totalFiles}"
#: components/manage/Contents/ContentsUploadModal
msgid "Total files to upload: {totalFiles}"
msgstr ""

#. Default: "Total number of objects in each cache"
#: components/manage/Controlpanels/DatabaseInformation
msgid "Total number of objects in each cache"
Expand Down Expand Up @@ -3973,11 +3983,6 @@ msgstr ""
msgid "Upload files"
msgstr ""

#. Default: "Uploading files"
#: components/manage/Contents/ContentsUploadModal
msgid "Uploading files"
msgstr ""

#. Default: "Uploading image"
#: components/manage/Blocks/Image/Edit
msgid "Uploading image"
Expand Down
Loading

0 comments on commit 04da8fa

Please sign in to comment.