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

Touch events are not working while page is blocked? #2325

Closed
pateketrueke opened this issue Apr 18, 2018 · 4 comments
Closed

Touch events are not working while page is blocked? #2325

pateketrueke opened this issue Apr 18, 2018 · 4 comments
Assignees
Labels
STATE: Auto-locked An issue has been automatically locked by the Lock bot. SYSTEM: automations TYPE: bug The described behavior is considered as wrong (bug).

Comments

@pateketrueke
Copy link

Are you requesting a feature or reporting a bug?

I'm not sure if this is a missing feature, or actually a bug...

What is the current behavior?

I've been able to simulate touch gestures using hammer-touchemulator here: https://www.boxfactura.com/pulltorefresh.js/demos/trigger.html

With that enabled the demo page is also working on desktop browsers.

What is the expected behavior?

I expect my tests run with this page the same way.

How would you reproduce the current behavior (if this is a bug)?

First try to move the trigger to enable the PTR, it'll work.

Now, run the test below to drag the same trigger.

Also I noticed that running the same test with -d enabled, and then unlocking the page, allowed me to pull the trigger as usual...

Provide the test code and the tested page URL (if applicable)

Tested page URL: https://www.boxfactura.com/pulltorefresh.js/demos/trigger.html

Test code

fixture('Trigger test')
  .page('https://www.boxfactura.com/pulltorefresh.js/demos/trigger.html');

test('try to drag', async t => {
  await t
    .drag('.trigger', 0, 100, { speed: 0.1 })
    .drag('.trigger', 0, 200, { speed: 0.1 });
});

I'm doing wrong or there's a preferred way to perform this kind of test?

Specify your

  • operating system: OSX 10.13.3
  • testcafe version: 0.19.2
  • node.js version: v9.9.0
@AlexKamaev
Copy link
Contributor

Hi, I've tried to reproduce your scenario on the provided page (https://www.boxfactura.com/pulltorefresh.js/demos/trigger.html).
But after I pulled the trigger nothing happened. I've tried in Chrome on Windows and in Safari on Mac. However, when I entered Device Mode in chrome developer tools I was able to reproduce the required behavior and saw the 'Refresh' alert dialog. So, could you please clarify if this script is supposed to work on desktop browsers or only on mobile devices or emulators?

@pateketrueke
Copy link
Author

The library pulltorefresh is intended to be working only on mobile devices, we're using only touch* events for handling this which is working great.

We've updated the page, it was missing the hammer-touchemulator plugin, but the behavior remains the same: just pull the trigger to refresh, etc.

Adding this plugin is not part of PTR itself, but it allows us to demonstrate the behavior to users using desktop browsers.

My task is adding some e2e tests to that library, so we can ensure their behavior but I was not able to use chrome:emulator:device:iphone 6 to make my tests, it just behave the same.

@AlexKamaev
Copy link
Contributor

I've reproduced the described behavior. It looks incorrect, so I need additional time to analyze it.

@lock
Copy link

lock bot commented Mar 28, 2019

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.

@lock lock bot added the STATE: Auto-locked An issue has been automatically locked by the Lock bot. label Mar 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 28, 2019
kirovboris pushed a commit to kirovboris/testcafe-phoenix that referenced this issue Dec 18, 2019
…Express#2325) (DevExpress#2353)

* [WIP]add support of event.screenX and event.screenY properties

* fix ugly code

* rewrite tests

* skip in mobile browsers

* fix obj is null problem

* remove functional test
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
STATE: Auto-locked An issue has been automatically locked by the Lock bot. SYSTEM: automations TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

2 participants