mirror of
https://github.com/discourse/discourse.git
synced 2025-06-10 07:38:03 +08:00

These changes have been made for playwright as it was hard to test a long press even on playwright given `click` won't trigger `touchstart` even with `isMobile:true` and `hasTouch:true`. You have to use `tap`, but you don't have the `delay` option on tap, so you can't make it a long tap. Sadly this code is apparently not working correctly on Android 15. This commit will revert the modifier to what it was before and is relying on native JS to trigger the fake long press in specs, which seems to work nicely. This commit also attempts to centralize the actions on messages in page objects to avoid code duplication.