Touch devices: incorrectly reporting failed test
keoshi opened this issue · comments
The changes in Automattic/wp-calypso#23979 introduced a .touch
selector which only targets devices that support touch.
Tests are failing because they are executed on a device that doesn't support touch (judging by the scroll bars on the right side), so the testing conditions are not properly emulated.
Thanks for raising this @keoshi, I'll have to put a workaround in place as our tests fail with this change.
Can you explain a bit more about how the .touch is detected? Is it using modernizer?
It seems like this change means that using any desktop browser in responsive mode means it doesn't resize down, is that intentional?
Is there anything you can set in Chrome to fake tell this that there's touch (when there's not)? We'll need to do something like this in our mobile sized e2e tests.
@alisterscott I see you've got more details on Automattic/wp-calypso#23979 (comment)
.touch
should be detected with Modernizr, yeah: https://github.com/Automattic/wp-calypso/blob/c47764a96b9ec4d867fe0ba042e931f9b5d0fa19/client/lib/touch-detect/index.js
With the change in Automattic/wp-calypso#24197 the plans scroll on non-touch devices again, so we can probably close this issue.