Automattic / wp-e2e-tests

Automated end-to-end tests for WordPress.com

Home Page:https://github.com/Automattic/wp-calypso

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

failed-en-mobile-can-then-see-the-plans-page-and-select-the-premium-plan--1523354369235

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.

With the change in Automattic/wp-calypso#24197 the plans scroll on non-touch devices again, so we can probably close this issue.