Skip to content

Commit

Permalink
Merge branch 'main' into no-querry-error-in-backend
Browse files Browse the repository at this point in the history
  • Loading branch information
tedw87 committed Oct 25, 2024
2 parents f78ce94 + 4b690be commit e52713f
Show file tree
Hide file tree
Showing 36 changed files with 1,815 additions and 867 deletions.
8 changes: 8 additions & 0 deletions packages/coresandbox/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import TestForm from './components/TestForm';
import FormBlockView from './components/Blocks/FormBlock/View';
import FormBlockEdit from './components/Blocks/FormBlock/Edit';
import { formBlockSchema } from './components/Blocks/FormBlock/schema';
import { Login } from '@plone/volto/components';

const testBlock: BlockConfigBase = {
id: 'testBlock',
title: 'testBlock',
Expand Down Expand Up @@ -207,6 +209,12 @@ const applyConfig = (config: ConfigType) => {
exact: false,
},
];

config.addonRoutes.push({
path: '/fallback_login',
component: Login,
exact: false,
});
config.blocks.blocksConfig.testBlock = testBlock;
config.blocks.blocksConfig.inputBlock = inputBlock;
config.blocks.blocksConfig.testBlockConditional = testBlockConditional;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
describe('Add a new alias from control panel interface', () => {
describe('URL Management control panel', () => {
beforeEach(() => {
cy.intercept('GET', `/**/*?expand*`).as('content');
cy.autologin();
Expand All @@ -9,11 +9,28 @@ describe('Add a new alias from control panel interface', () => {
});
cy.visit('/my-page');
cy.wait('@content');

cy.visit('/controlpanel/aliases');
cy.get('#add-alt-url').click();
cy.get('#field-altUrlPath').type('/alturl');
cy.get('#field-targetUrlPath').type('/my-page');
cy.get('button[aria-label="Save"]').click();
});
it('adds a new alias', () => {
cy.get('.toast-inner-content').contains('Alias has been added');
});
it('edits an existing new alias', () => {
cy.visit('/controlpanel/aliases');
cy.get('button[aria-label="Edit Alternative URL"]').click();
cy.get('#field-altUrlPath').clear().type('/alturl2');
cy.get('#field-targetUrlPath').clear().type('/my-page');
cy.get('button[aria-label="Save"]').click();
cy.get('.toast-inner-content').contains('Alias has been added');
});
it('removes an alias', () => {
cy.visit('/controlpanel/aliases');
cy.get('#alternative-url-input').type('/alturl');
cy.get('#target-url-input').type('/my-page');
cy.get('#submit-alias').click();
cy.get('input[type="checkbox"][value="/alturl"]').click({ force: true });
cy.get('#remove-alt-urls').click();
cy.get('.toast-inner-content').contains('Aliases have been removed');
});
});
17 changes: 17 additions & 0 deletions packages/volto/cypress/tests/coresandbox/login.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { ploneAuth } from '../../support/constants';

describe('Login Tests', () => {
beforeEach(() => {
cy.visit('/fallback_login');
});
it('Check login redirect when the login is at another root', function () {
const user = ploneAuth[0];
const password = ploneAuth[1];

cy.get('#login').type(user).should('have.value', user);
cy.get('#password').type(password).should('have.value', password);
cy.get('#login-form-submit').click();
cy.wait(3000);
cy.location('pathname').should('eq', '/');
});
});
68 changes: 55 additions & 13 deletions packages/volto/locales/ca/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ msgstr ""

#. Default: "Add"
#: components/manage/Aliases/Aliases
#: components/manage/Controlpanels/Aliases
#: components/manage/Controlpanels/ContentTypes
#: components/manage/Controlpanels/Rules/ConfigureRule
#: components/manage/Rules/Rules
Expand All @@ -94,6 +93,11 @@ msgstr ""
msgid "Add Addons"
msgstr "Afegeix complements"

#. Default: "Add Alternative URL"
#: components/manage/Controlpanels/Aliases
msgid "Add Alternative URL"
msgstr ""

#. Default: "Add Content…"
#: components/manage/Toolbar/Types
msgid "Add Content"
Expand Down Expand Up @@ -310,6 +314,16 @@ msgstr ""
msgid "Alias has been added"
msgstr ""

#. Default: "Aliases have been removed."
#: components/manage/Controlpanels/Aliases
msgid "Aliases have been removed."
msgstr ""

#. Default: "Aliases have been uploaded."
#: components/manage/Controlpanels/Aliases
msgid "Aliases have been uploaded."
msgstr ""

#. Default: "Alignment"
#: components/manage/Blocks/Image/schema
#: components/manage/Blocks/LeadImage/LeadImageSidebar
Expand All @@ -329,7 +343,7 @@ msgstr "Tots"
msgid "All content"
msgstr "Tot el contingut"

#. Default: "All existing alternative urls for this site"
#. Default: "Existing alternative URLs for this site"
#: components/manage/Controlpanels/Aliases
msgid "All existing alternative urls for this site"
msgstr ""
Expand All @@ -356,7 +370,7 @@ msgstr "Deixeu el camp buit si la imatge és purament decorativa"
msgid "Alt text hint link text"
msgstr "Descriu el propòsit de la imatge"

#. Default: "Alternative url path (Required)"
#. Default: "Alternative URL path (Required)"
#: components/manage/Controlpanels/Aliases
msgid "Alternative url path (Required)"
msgstr ""
Expand All @@ -367,7 +381,7 @@ msgstr ""
msgid "Alternative url path must start with a slash."
msgstr ""

#. Default: "Alternative url path → target url path (date and time of creation, manually created yes/no)"
#. Default: "Alternative URL path → target URL path (date and time of creation, manually created yes/no)"
#: components/manage/Controlpanels/Aliases
msgid "Alternative url path → target url path (date and time of creation, manually created yes/no)"
msgstr ""
Expand Down Expand Up @@ -503,11 +517,21 @@ msgstr "Navegui"
msgid "Browse the site, drop an image, or type a URL"
msgstr "Navegueu pel lloc, deixeu anar una imatge o escriviu un URL"

#. Default: "Bulk upload CSV"
#: components/manage/Controlpanels/Aliases
msgid "BulkUploadAltUrls"
msgstr ""

#. Default: "By default, permissions from the container of this item are inherited. If you disable this, only the explicitly defined sharing permissions will be valid. In the overview, the symbol {inherited} indicates an inherited value. Similarly, the symbol {global} indicates a global role, which is managed by the site administrator."
#: components/manage/Sharing/Sharing
msgid "By default, permissions from the container of this item are inherited. If you disable this, only the explicitly defined sharing permissions will be valid. In the overview, the symbol {inherited} indicates an inherited value. Similarly, the symbol {global} indicates a global role, which is managed by the site administrator."
msgstr "Per defecte, els permisos del contenidor d'aquest element són heretats. Si es desactiva, només seran vàlids els permisos de compartició definits explícitament. A la vista general, el símbol ${inherited} indica un valor heretat. De la mateixa manera, el símbol ${global} indica un rol global, que és gestionat per l'administrador del lloc."

#. Default: "CSV file"
#: components/manage/Controlpanels/Aliases
msgid "CSVFile"
msgstr ""

#. Default: "Cache Name"
#: components/manage/Controlpanels/DatabaseInformation
msgid "Cache Name"
Expand Down Expand Up @@ -836,6 +860,16 @@ msgstr ""
msgid "Create working copy"
msgstr "Crea una còpia de treball"

#. Default: "Created after"
#: components/manage/Controlpanels/Aliases
msgid "Created after"
msgstr ""

#. Default: "Created before"
#: components/manage/Controlpanels/Aliases
msgid "Created before"
msgstr ""

#. Default: "Created by {creator} on {date}"
#: components/manage/WorkingCopyToastsFactory/WorkingCopyToastsFactory
msgid "Created by {creator} on {date}"
Expand Down Expand Up @@ -1182,6 +1216,11 @@ msgstr "Les adreces de correu electrònic no coincideixen."
msgid "Edit"
msgstr "Edita"

#. Default: "Edit Alternative URL"
#: components/manage/Controlpanels/Aliases
msgid "Edit Alternative URL"
msgstr ""

#. Default: "Edit Rule"
#: components/manage/Controlpanels/Rules/EditRule
msgid "Edit Rule"
Expand Down Expand Up @@ -1293,14 +1332,18 @@ msgstr "Introduïu el nom complet, per exemple John Smith."
msgid "Enter map Embed Code"
msgstr "Introduïu el codi d'inserció del mapa"

#. Default: "Enter the absolute path of the target. Target must exist or be an existing alternative url path to the target."
#. Default: "Enter the absolute path of the target. Target must exist or be an existing alternative URL path to the target."
#: components/manage/Controlpanels/Aliases
msgid "Enter the absolute path of the target. Target must exist or be an existing alternative url path to the target."
msgstr ""

#. Default: "Enter the absolute path where the alternative URL should exist. The path must start with '/'. Only URLs that result in a 404 not found page will result in a redirect occurring."
#: components/manage/Controlpanels/Aliases
msgid "Enter the absolute path where the alternative url should exist. The path must start with '/'. Only URLs that result in a 404 not found page will result in a redirect occurring."
msgstr ""

#. Default: "Enter the absolute path where the alternative url should exist. The path must start with '/'. Only urls that result in a 404 not found page will result in a redirect occurring."
#: components/manage/Aliases/Aliases
#: components/manage/Controlpanels/Aliases
msgid "Enter the absolute path where the alternative url should exist. The path must start with '/'. Only urls that result in a 404 not found page will result in a redirect occurring."
msgstr ""

Expand Down Expand Up @@ -1346,11 +1389,6 @@ msgstr ""
msgid "Error"
msgstr "Error"

#. Default: "Error"
#: components/manage/Controlpanels/Aliases
msgid "ErrorHeader"
msgstr ""

#. Default: "Event"
#: components/manage/Controlpanels/Rules/Rules
msgid "Event"
Expand Down Expand Up @@ -1496,7 +1534,7 @@ msgstr ""
msgid "Filter Rules:"
msgstr ""

#. Default: "Filter by prefix"
#. Default: "Filter by path"
#: components/manage/Controlpanels/Aliases
msgid "Filter by prefix"
msgstr ""
Expand Down Expand Up @@ -3591,7 +3629,6 @@ msgstr "Etiquetes per eliminar"

#. Default: "Target"
#: components/manage/Blocks/Teaser/schema
#: components/manage/Controlpanels/Aliases
#: components/manage/Controlpanels/Relations/BrokenRelations
#: components/manage/Controlpanels/Relations/RelationsMatrix
msgid "Target"
Expand Down Expand Up @@ -4432,6 +4469,11 @@ msgstr ""
msgid "box_forgot_password_option"
msgstr "Has oblidat la teva contrasenya?"

#. Default: "Add many alternative URLs at once by uploading a CSV file. The first column should be the path to redirect from; the second, the path to redirect to. Both paths must be Plone-site-relative, starting with a slash (/). An optional third column can contain a date and time. An optional fourth column can contain a boolean to mark as a manual redirect (default true)."
#: components/manage/Controlpanels/Aliases
msgid "bulkUploadUrlsHelp"
msgstr ""

#. Default: "Checkbox"
#: config/Blocks
msgid "checkboxFacet"
Expand Down
Loading

0 comments on commit e52713f

Please sign in to comment.