Skip to content

Commit

Permalink
Fix flaky Cypress test in #4521 (#4522)
Browse files Browse the repository at this point in the history
  • Loading branch information
sneridagh authored Mar 15, 2023
1 parent 34328a8 commit 7197e44
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
11 changes: 7 additions & 4 deletions cypress/tests/core/volto-slate/28-table-block-slate-paste.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ describe('Block Tests: pasting content in table block', () => {
beforeEach(slateBeforeEach);

it('should paste text', function () {
cy.intercept('PATCH', '/**/my-page').as('save');

// Paste
cy.getTableSlate(true)
.focus()
Expand All @@ -17,13 +19,14 @@ describe('Block Tests: pasting content in table block', () => {

// Save
cy.toolbarSave();
cy.wait('@save');

// View
cy.get('.celled.fixed.table thead tr th:first').contains(
'Some Text from Clipboard',
);
cy.get(
'.celled.fixed.table thead tr th:first-child() [contenteditable="true"]',
).contains('Some Text from Clipboard');
cy.get(
'.celled.fixed.table tbody tr:nth-child(1) td:first-child() [contenteditable="true"]',
'.celled.fixed.table tbody tr:nth-child(1) td:first-child()',
).contains('Some Text from Clipboard');
});

Expand Down
1 change: 1 addition & 0 deletions news/4522.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix flaky Cypress test introduced in #4521 @sneridagh

0 comments on commit 7197e44

Please sign in to comment.