Skip to content

Commit 58ce003

Browse files
committed
Include new enhancer in the separator block
1 parent f8f06ec commit 58ce003

6 files changed

Lines changed: 26 additions & 110 deletions

File tree

frontend/cypress/support/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,6 @@ namespace Cypress {
3838
skipFailures?: boolean,
3939
): Chainable<JQuery<HTMLElement>>;
4040
checkAccessibility(): Chainable<JQuery<HTMLElement>>;
41+
getSlate(): Chainable<JQuery<HTMLElement>>;
4142
}
4243
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
context('Block Acceptance Tests', () => {
2+
beforeEach(() => {
3+
cy.visit('/');
4+
cy.viewport('macbook-16');
5+
cy.createContent({
6+
contentType: 'Document',
7+
contentId: 'document',
8+
contentTitle: 'Document',
9+
path: '/',
10+
});
11+
cy.autologin();
12+
});
13+
14+
it('As editor I can add a Button block', () => {
15+
cy.visit('/document/edit');
16+
cy.getSlate().click();
17+
cy.get('.button .block-add-button').click({ force: true });
18+
cy.get('.blocks-chooser .mostUsed').findByText('Button').click();
19+
cy.get('#toolbar-save').click();
20+
});
21+
});

frontend/cypress/tests/addons/slider/separator-block.cy.ts renamed to frontend/cypress/tests/addons/separator-block.cy.ts

File renamed without changes.
File renamed without changes.

frontend/cypress/tests/core/blocks/block-anchors.js

Lines changed: 0 additions & 108 deletions
This file was deleted.

frontend/packages/volto-light-theme/src/config/blocks.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,10 @@ export default function install(config: ConfigType) {
401401

402402
// Check if the separator is present before enhancing it
403403
if (config.blocks.blocksConfig?.separator?.id) {
404-
config.blocks.blocksConfig.separator.schemaEnhancer =
405-
SeparatorStylingSchema;
404+
config.blocks.blocksConfig.separator.schemaEnhancer = composeSchema(
405+
config.blocks.blocksConfig.separator.schemaEnhancer,
406+
SeparatorStylingSchema,
407+
);
406408
}
407409

408410
// TOC Block

0 commit comments

Comments
 (0)