Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit abb9954

Browse files
committed
chore: fix failing Cypress test
1 parent 5809965 commit abb9954

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/cypress/e2e/example11.cy.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
describe('Example 11 - Add / Update / Highlight a Datagrid Item', () => {
2+
const GRID_ROW_HEIGHT = 35;
23
const fullTitles = ['', 'Title', 'Duration (days)', '% Complete', 'Start', 'Finish', 'Effort Driven'];
34

45
it('should display Example title', () => {
@@ -93,8 +94,8 @@ describe('Example 11 - Add / Update / Highlight a Datagrid Item', () => {
9394
it('should scroll to top and expect certain rows on top', () => {
9495
cy.get('[data-test="scroll-top-btn"]').click();
9596

96-
cy.get('#grid11').find('.slick-row:nth(0) .slick-cell:nth(1)').should('contain.text', 'Task 1001');
97-
cy.get('#grid11').find('.slick-row:nth(1) .slick-cell:nth(1)').should('contain.text', 'Task 1000');
98-
cy.get('#grid11').find('.slick-row:nth(2) .slick-cell:nth(1)').should('contain.text', 'Task 1');
97+
cy.get(`[style="top: ${GRID_ROW_HEIGHT * 0}px;"] > .slick-cell:nth(1)`).should('contain', 'Task 1001');
98+
cy.get(`[style="top: ${GRID_ROW_HEIGHT * 1}px;"] > .slick-cell:nth(1)`).should('contain', 'Task 100');
99+
cy.get(`[style="top: ${GRID_ROW_HEIGHT * 2}px;"] > .slick-cell:nth(1)`).should('contain', 'Task 1');
99100
});
100101
});

0 commit comments

Comments
 (0)