Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Nov 8, 2023

Conversation

radium-v
Copy link
Collaborator

@radium-v radium-v commented Nov 8, 2023

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

  • I have included a change request file using $ yarn change
  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

⏭ 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?

- Adjusts the scrollLeft check to consider the devicePixelRatio
@chrisdholt chrisdholt merged commit a7a3c89 into master Nov 8, 2023
5 checks passed
@chrisdholt chrisdholt deleted the users/jokreitl/fix-dpr-scroll-converter-test branch November 8, 2023 19:30
radium-v added a commit that referenced this pull request Nov 8, 2023
chrisdholt pushed a commit that referenced this pull request Nov 10, 2023
* Revert "fix: RtlScrollConverter test on high dpi systems in fast-web-utilities (#6857)"

This reverts commit a7a3c89.

* force 1x display scale factor in karma

* fix RtlScrollConverter test

- Chromium reports 0.5
- Webkit and Firefox both report 0

* Change files
janechu pushed a commit that referenced this pull request Jun 10, 2024
#6857)

* fix RtlScrollConverter test for high dpi systems

- Adjusts the scrollLeft check to consider the devicePixelRatio

* Change files
janechu pushed a commit that referenced this pull request Jun 10, 2024
* Revert "fix: RtlScrollConverter test on high dpi systems in fast-web-utilities (#6857)"

This reverts commit a7a3c89.

* force 1x display scale factor in karma

* fix RtlScrollConverter test

- Chromium reports 0.5
- Webkit and Firefox both report 0

* Change files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants