diff --git a/src/components/split-panel/split-panel.test.ts b/src/components/split-panel/split-panel.test.ts index ea6a2eaf3..66e975631 100644 --- a/src/components/split-panel/split-panel.test.ts +++ b/src/components/split-panel/split-panel.test.ts @@ -130,13 +130,13 @@ describe('', () => { ` ); - const positionInPixels = splitPanel.positionInPixels; + const positionInPixels = Math.round(splitPanel.positionInPixels); const divider = getDivider(splitPanel); await dragElement(divider, -30); - const positionInPixelsAfterDrag = splitPanel.positionInPixels; + const positionInPixelsAfterDrag = Math.round(splitPanel.positionInPixels); expect(positionInPixelsAfterDrag).to.be.equal(positionInPixels - 30); }); @@ -148,13 +148,13 @@ describe('', () => { ` ); - const positionInPixels = splitPanel.positionInPixels; + const positionInPixels = Math.round(splitPanel.positionInPixels); const divider = getDivider(splitPanel); await dragElement(divider, -30); - const positionInPixelsAfterDrag = splitPanel.positionInPixels; + const positionInPixelsAfterDrag = Math.round(splitPanel.positionInPixels); expect(positionInPixelsAfterDrag).to.be.equal(positionInPixels); }); @@ -166,14 +166,14 @@ describe('', () => { ` ); - const positionInPixels = splitPanel.positionInPixels; + const positionInPixels = Math.round(splitPanel.positionInPixels); splitPanel.snap = `${positionInPixels - 40}px`; const divider = getDivider(splitPanel); await dragElement(divider, -30); - const positionInPixelsAfterDrag = splitPanel.positionInPixels; + const positionInPixelsAfterDrag = Math.round(splitPanel.positionInPixels); expect(positionInPixelsAfterDrag).to.be.equal(positionInPixels - 40); }); }); @@ -243,13 +243,13 @@ describe('', () => { ` ); - const positionInPixels = splitPanel.positionInPixels; + const positionInPixels = Math.round(splitPanel.positionInPixels); const divider = getDivider(splitPanel); await dragElement(divider, 0, -30); - const positionInPixelsAfterDrag = splitPanel.positionInPixels; + const positionInPixelsAfterDrag = Math.round(splitPanel.positionInPixels); expect(positionInPixelsAfterDrag).to.be.equal(positionInPixels - 30); }); @@ -261,13 +261,13 @@ describe('', () => { ` ); - const positionInPixels = splitPanel.positionInPixels; + const positionInPixels = Math.round(splitPanel.positionInPixels); const divider = getDivider(splitPanel); await dragElement(divider, 0, -30); - const positionInPixelsAfterDrag = splitPanel.positionInPixels; + const positionInPixelsAfterDrag = Math.round(splitPanel.positionInPixels); expect(positionInPixelsAfterDrag).to.be.equal(positionInPixels); }); @@ -279,14 +279,14 @@ describe('', () => { ` ); - const positionInPixels = splitPanel.positionInPixels; + const positionInPixels = Math.round(splitPanel.positionInPixels); splitPanel.snap = `${positionInPixels - 40}px`; const divider = getDivider(splitPanel); await dragElement(divider, 0, -30); - const positionInPixelsAfterDrag = splitPanel.positionInPixels; + const positionInPixelsAfterDrag = Math.round(splitPanel.positionInPixels); expect(positionInPixelsAfterDrag).to.be.equal(positionInPixels - 40); }); });