Skip to content

Commit

Permalink
Fixes intermittent error in cypress "Index Text Block" test
Browse files Browse the repository at this point in the history
Waits for the slate editor to be visible before attempting to insert
text.
  • Loading branch information
wesleybl committed Feb 14, 2025
1 parent 6155ad7 commit d0de27e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/volto/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -819,8 +819,8 @@ Cypress.Commands.add(
},
);

Cypress.Commands.add('getSlateEditorAndType', (type) => {
cy.getSlate().focus().click().type(type);
Cypress.Commands.add('getSlateEditorAndType', (text) => {
cy.getSlate().should('be.visible').focus().click().type(text);
});

Cypress.Commands.add('getSlateEditorSelectorAndType', (selector, type) => {
Expand Down

0 comments on commit d0de27e

Please sign in to comment.