Skip to content

Commit f31a2f4

Browse files
committed
Update AnalyticalTable.cy.tsx
1 parent 468f044 commit f31a2f4

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

packages/main/src/components/AnalyticalTable/AnalyticalTable.cy.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,11 @@ describe('AnalyticalTable', () => {
385385
.dblclick()
386386
// fallback
387387
.realClick({ clickCount: 2 });
388-
cy.get(`[data-column-id="${columnName}"]`).invoke('outerWidth').should('equal', outerWidth);
388+
cy.get(`[data-column-id="${columnName}"]`)
389+
.invoke('outerWidth')
390+
.should(($width) => {
391+
expect(Math.floor($width)).to.equal(outerWidth);
392+
});
389393
}
390394

391395
let resizeColumns = columns.map((el) => {
@@ -446,6 +450,7 @@ describe('AnalyticalTable', () => {
446450
);
447451

448452
cy.get('[data-component-name="AnalyticalTableBody"]').scrollTo('bottom');
453+
cy.wait(50);
449454
doubleClickResizer('@resizer1', 'name', 93);
450455
cy.get('@resize').should('have.callCount', 10);
451456

@@ -455,8 +460,8 @@ describe('AnalyticalTable', () => {
455460

456461
cy.mount(<AnalyticalTable data={dataFixed} columns={resizeColumns} />);
457462
cy.wait(100);
458-
doubleClickResizer('@resizer2', 'age', 472.75);
459-
doubleClickResizer('@resizer1', 'name', 472.75);
463+
doubleClickResizer('@resizer2', 'age', 472);
464+
doubleClickResizer('@resizer1', 'name', 472);
460465

461466
cy.get('@resize').should('have.callCount', 10);
462467

@@ -3947,7 +3952,7 @@ describe('AnalyticalTable', () => {
39473952
withVertScrollbar ? '1290px' : '1306px',
39483953
);
39493954
cy.get('[data-component-name="AnalyticalTableBody"]').should(($el) => {
3950-
const width = Math.round(parseFloat($el.css('width'), 10));
3955+
const width = Math.round(parseFloat($el.css('width')));
39513956
expect(width).to.equal(withVertScrollbar ? 1290 : 1306);
39523957
});
39533958

0 commit comments

Comments
 (0)