Skip to content

Commit

Permalink
add a11y test for text block
Browse files Browse the repository at this point in the history
  • Loading branch information
tedw87 committed Sep 25, 2024
1 parent 5ff4b15 commit 66a5f8b
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/volto/cypress/tests/core/basic/a11y.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,25 @@ describe('Accessibility Tests', () => {
cy.checkA11y();
});

it('Text block has no a11y violations', () => {
cy.createContent({
contentType: 'Document',
contentId: 'a11y-text-block',
contentTitle: 'a11y text block',
});
cy.visit('/a11y-text-block/edit');
// Add a text block
cy.get('.block .slate-editor [contenteditable=true]').click();
cy.get('.button .block-add-button').click({ force: true });
cy.get('[aria-label="Unfold Text blocks"]').click();
cy.get('.blocks-chooser .slate').findByText('Text').click({ force: true });
cy.getSlateEditorAndType('My text').contains('My text');
cy.get('#toolbar-save').click();
cy.wait(1000);
cy.injectAxe();
cy.checkA11y();
});

// TODO: Adapt this to volto-slate table
// it('Table has no a11y violations', () => {
// cy.createContent({
Expand Down

0 comments on commit 66a5f8b

Please sign in to comment.