Tests fail when run on high resolution monitors
See original GitHub issueWhat MDC-Web Version are you using?
0.6.0
What browser(s) is this bug affecting?
NA, however it is happening on a 4k monitor
What OS are you using?
16.04.2 LTS
What are the steps to reproduce the bug?
- Procure a high resolution monitor
- Pull on master and make no changes
- Run
npm run test
- Observe the failed test
What is the expected behavior?
Expect the tests to pass
What is the actual behavior?
The console complains with the following:
Chrome 56.0.2924 (Linux 0.0.0) MDCSimpleMenu adapter#getAnchorDimensions returns the dimensions of the anchor container FAILED
AssertionError: expected 20.99609375 to equal 21
at Context.<anonymous> (webpack:///test/unit/mdc-menu/mdc-simple-menu.test.js:311:9 <- test/unit/index.js:16729:16)
Any other information you believe would be useful?
I have not been able to reproduce the issue on any computer that has monitor specs similar to a Macbook Pro’s retina display or lower.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Solved: screen resolution seems to change between runs on
In an attempt to figure out the issue, we wrote a script to create a warning when the resolution is not a multiple...
Read more >3DMark - [Problem] Desktop 1080p / Test 2K
Hi, I'm unable to do tests at higher resolutions because the switching from 1080p to 2K, 3DMark shows an error that tests are...
Read more >Test failed on different monitor selenium webdriver java
when i execute code in office mean when i am connected with 2 screens every test case work fine both on laptop and...
Read more >Windows 10 Screen Resolution error test box
I'm running windows 10 on a Lenovo computer. Every time I start my computer there is a screen resolution error box in the...
Read more >Change desktop screen resolution in Selenium tests
By default, on BrowserStack, all Selenium tests that run on desktop run on a screen resolution of 1920x1080 . In this guide, you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Was able to reproduce the bug by running Chrome with
--force-device-scale-factor
flag with a fractional value:Getting exactly the same error:
@amsheehan, you probably will be able to choose some
--force-device-scale-factor
value which will prevent the test from failing. Most likely--force-device-scale-factor=1
will solve the problem.@abhiomkar, you tried to reproduce and weren’t able to. I’m going to close this issue.