Skip to content

Commit

Permalink
test: fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iamejaaz committed Feb 19, 2025
1 parent f1c2cd9 commit 6d381d8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cypress/integration/cell.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('Cell', function () {
cy.clickCell(2, 0)
.type('{ctrl}{rightarrow}');
cy.get('.dt-cell--focus')
.should('have.class', 'dt-cell--7-0');
.should('have.class', 'dt-cell--11-0');
});

it('cell selection using shift + arrow keys', function () {
Expand Down
18 changes: 9 additions & 9 deletions cypress/integration/column.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,35 @@ describe('Column', function () {
.its('currentSort.colIndex')
.should('eq', 2);

cy.get('.dt-scrollable .dt-row:first')
cy.get('.dt-scrollable .dt-row:first div:nth-of-type(3)')
.contains('Airi Satou');

cy.clickDropdownItem(2, 'Reset sorting');
});

it('removes column using dropdown action', function () {
cy.get('.dt-cell--header').should('have.length', 8);
cy.get('.dt-cell--header').should('have.length', 12);

cy.clickDropdown(5);
cy.clickDropdownItem(5, 'Remove column');

cy.get('.dt-cell--header').should('have.length', 7);
cy.get('.dt-cell--header').should('have.length', 11);
});

it('resize column with mouse drag', function () {
cy.get('.dt-cell--header-3 .dt-cell__resize-handle').as('resize-handle');
cy.get('.dt-cell--header-4 .dt-cell__resize-handle').as('resize-handle');
cy
.get('@resize-handle')
.trigger('mousedown')
.trigger('mousemove', { pageX: 510, pageY: 20, which: 1 })
.trigger('mousemove', { pageX: 710, pageY: 20, which: 1 })
.trigger('mouseup');

cy.getColumnCell(3)
cy.getColumnCell(4)
.should('have.css', 'width')
.and('match', /13\dpx/);
cy.getCell(3, 1)
.and('match', /^82\d*(\.\d+)?px$/);
cy.getCell(4, 1)
.should('have.css', 'width')
.and('match', /13\dpx/);
.and('match', /^82\d*(\.\d+)?px$/);
});

it('resize column using double click', function () {
Expand Down

0 comments on commit 6d381d8

Please sign in to comment.