microsoft / fast

The adaptive interface system for modern web experiences.
https://www.fast.design
Other
9.28k stars 595 forks source link

fix: RtlScrollConverter test on high dpi systems in fast-web-utilities #6857

Closed radium-v closed 1 year ago

radium-v commented 1 year ago

Pull Request

📖 Description

Fixes an intermittently failing test that seems to be affected by the device pixel ratio.

👩‍💻 Reviewer Notes

This test returns 0.5 on my Macbook Pro, since the test environment gets the same device pixel ratio as my screen (2).

📑 Test Plan

The RtlScrollConverter test should pass in all environments.

✅ Checklist

General

⏭ Next Steps

I encountered this bug while testing #6847, but it's present on the main branch as well. Perhaps there's a way to override the behavior that's causing the test runner to use the host's display properties?