Skip to content

Commit 69cda2a

Browse files
committed
chore: faulty merge
1 parent 58b2cfa commit 69cda2a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/lib/select/select.spec.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1597,10 +1597,12 @@ describe('MatSelect', () => {
15971597
const overlayPane = overlayContainerElement.querySelector('.cdk-overlay-pane')!;
15981598
const triggerBottom = trigger.getBoundingClientRect().bottom;
15991599
const overlayBottom = overlayPane.getBoundingClientRect().bottom;
1600+
const difference = Math.floor(overlayBottom) - Math.floor(triggerBottom);
16001601

1601-
expect(Math.floor(overlayBottom))
1602-
.toEqual(Math.floor(triggerBottom),
1603-
`Expected trigger bottom to align with overlay bottom.`);
1602+
// Check that the values are within a pixel of each other. This avoids sub-pixel
1603+
// deviations between OS and browser versions.
1604+
expect(Math.abs(difference) < 2)
1605+
.toEqual(true, `Expected trigger bottom to align with overlay bottom.`);
16041606
});
16051607
}));
16061608

0 commit comments

Comments
 (0)