test: Fix column resize test

This commit is contained in:
Faris Ansari 2019-03-30 18:25:58 +05:30
parent 3b088a9d78
commit 9a5a0b66e8

View File

@ -52,13 +52,19 @@ describe('Column', function () {
.trigger('mousemove', { pageX: 510, pageY: 20, which: 1 })
.trigger('mouseup');
cy.getColumnCell(3).should('have.css', 'width', '123px');
cy.getCell(3, 1).should('have.css', 'width', '123px');
cy.getColumnCell(3)
.should('have.css', 'width')
.and('match', /12\dpx/);
cy.getCell(3, 1)
.should('have.css', 'width')
.and('match', /12\dpx/);
});
it('resize column using double click', function () {
cy.get('.dt-cell--header-4 .dt-cell__resize-handle').trigger('dblclick');
cy.getColumnCell(4).should('have.css', 'width', '94px');
cy.getCell(4, 1).should('have.css', 'width', '94px');
cy.getColumnCell(4).should('have.css', 'width')
.and('match', /9\dpx/);
cy.getCell(4, 1).should('have.css', 'width')
.and('match', /9\dpx/);
});
});