mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 04:09:12 +00:00
compare rounded values
This commit is contained in:
@@ -130,13 +130,13 @@ describe('<wa-split-panel>', () => {
|
||||
</wa-split-panel>`
|
||||
);
|
||||
|
||||
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('<wa-split-panel>', () => {
|
||||
</wa-split-panel>`
|
||||
);
|
||||
|
||||
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('<wa-split-panel>', () => {
|
||||
</wa-split-panel>`
|
||||
);
|
||||
|
||||
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('<wa-split-panel>', () => {
|
||||
</wa-split-panel>`
|
||||
);
|
||||
|
||||
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('<wa-split-panel>', () => {
|
||||
</wa-split-panel>`
|
||||
);
|
||||
|
||||
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('<wa-split-panel>', () => {
|
||||
</wa-split-panel>`
|
||||
);
|
||||
|
||||
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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user