Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 24 additions & 31 deletions packages/volto/cypress/tests/core/blocks/blocks-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,22 +81,18 @@ describe('Table Block Tests', () => {
cy.get('.celled.fixed.table').should('be.visible');

// View
cy.get('.celled.fixed.table thead tr th:first-child()').should(
'contain',
'column 1 / row 1',
);
cy.get('.celled.fixed.table thead tr th:nth-child(3)').should(
'contain',
'column 2 / row 1',
);
cy.get('.celled.fixed.table tbody tr:nth-child(2) td:first-child()').should(
'contain',
'column 1 / row 2',
);
cy.get('.celled.fixed.table tbody tr:nth-child(2) td:nth-child(3)').should(
'contain',
'column 2 / row 2',
);
cy.get('.celled.fixed.table thead tr th:first-child()', {
timeout: 15000,
}).should('contain', 'column 1 / row 1');
cy.get('.celled.fixed.table thead tr th:nth-child(3)', {
timeout: 15000,
}).should('contain', 'column 2 / row 1');
cy.get('.celled.fixed.table tbody tr:nth-child(2) td:first-child()', {
timeout: 15000,
}).should('contain', 'column 1 / row 2');
cy.get('.celled.fixed.table tbody tr:nth-child(2) td:nth-child(3)', {
timeout: 15000,
}).should('contain', 'column 2 / row 2');

// Redefine all intercepts before the second visit to avoid alias conflicts
cy.intercept('GET', `/**/*?expand*`).as('content2');
Expand Down Expand Up @@ -152,20 +148,17 @@ describe('Table Block Tests', () => {
cy.get('.celled.fixed.table').should('be.visible');

// View
cy.get('.celled.fixed.table thead tr th:first-child()').should(
'contain',
'column 1 / row 1',
);
cy.get('.celled.fixed.table thead tr th:nth-child(2)> p ').should(
'have.text',
'column 2 / row 1',
);
cy.get(
'.celled.fixed.table tbody tr:first-child() td:first-child()',
).should('contain', 'column 1 / row 2');
cy.get('.celled.fixed.table tbody tr:first-child() td:nth-child(2)').should(
'contain',
'column 2 / row 2',
);
cy.get('.celled.fixed.table thead tr th:first-child()', {
timeout: 15000,
}).should('contain', 'column 1 / row 1');
cy.get('.celled.fixed.table thead tr th:nth-child(2)> p ', {
timeout: 15000,
}).should('have.text', 'column 2 / row 1');
cy.get('.celled.fixed.table tbody tr:first-child() td:first-child()', {
timeout: 15000,
}).should('contain', 'column 1 / row 2');
cy.get('.celled.fixed.table tbody tr:first-child() td:nth-child(2)', {
timeout: 15000,
}).should('contain', 'column 2 / row 2');
});
});
1 change: 1 addition & 0 deletions packages/volto/news/8326.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix random failure in test cypress `blocks-table.js`. @wesleybl
Loading