From 9a5a0b66e82c08a6e54270b58bb1cb002e429aaf Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Sat, 30 Mar 2019 18:25:58 +0530 Subject: [PATCH] test: Fix column resize test --- cypress/integration/column.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/cypress/integration/column.js b/cypress/integration/column.js index f8a3c76..3ddf755 100644 --- a/cypress/integration/column.js +++ b/cypress/integration/column.js @@ -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/); }); });