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

touchstart event does not contain proper values in changedTouches property on android devices #2856

Closed
Bamyan opened this issue Sep 13, 2018 · 11 comments
Assignees
Labels
AREA: client 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).
Milestone

Comments

@Bamyan
Copy link

Bamyan commented Sep 13, 2018

Are you requesting a feature or reporting a bug?

bug

What is the current behavior?

It is not adding touches into event.changedTouches array. it is always empty

What is the expected behavior?

Should contain touches in event.changedTouches array as i does in non-testcafe environment

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

call t.click method on element with onTouchStart handler and check the changedTouches property

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

Tested page URL:

it is an Angular code to simplify the example:

Test code


onTouchStart(e:TouchEvent) {
    this.xyz = e.changedTouches.length; //In real application it is 1, in testcafe it is 0
}

<button id="test" (touchstart)="onTouchStart($event)">test</button>
{{xyz}}

Specify your

  • operating system: Android (Chrome)
  • testcafe version: 0.22.0
  • node.js version: 8.9.4
@AndreyBelym AndreyBelym added the STATE: Need clarification An issue lacks information for further research. label Oct 10, 2018
@AndreyBelym
Copy link
Contributor

Hi @Bamyan, sorry for the delayed response! The changedTouches property must be emulated on Android devices, we have a unit test for it: testcafe-hammerhead/test/client/fixtures/sandbox/event/event-simulator-test.js. Could you please provide an example page where the problem can be reproduced?

@miherlosev
Copy link
Collaborator

I will close the issue because no activity has been encountered for a long time.
Feel free to reopen the issue if the problem persists and you can provide an example to reproduce it.

@Bamyan
Copy link
Author

Bamyan commented Oct 22, 2018

Hi. @miherlosev @AndreyBelym , Sorry for the Late Reply, you can see the problem with the following test on example page.

fixture `click on checkbox`
    .page(`https://v6.material.angular.io/components/checkbox/overview`);

test('Should click on checkbox', async () => {
    await t.click(Selector('mat-checkbox'));
});

ERROR:
Uncaught TypeError: Cannot read property 'clientX' of undefined

@miherlosev
Copy link
Collaborator

I've tried to reproduce the problem with [email protected] and TestCafe works fine.
Try to run tests with the latest TestCafe version ([email protected]).
If the problem persists, please specify the Google Chrome version in which you run your tests.

image

@Bamyan
Copy link
Author

Bamyan commented Oct 23, 2018

Hi, @miherlosev As it is mentioned on issue, the problem is just for Android devices and works well on Windows. and also i have tried to run the test with the latest TestCafe version [email protected] on Android, but it is display the same error as before.
bug

@miherlosev miherlosev added TYPE: bug The described behavior is considered as wrong (bug). AREA: client SYSTEM: automations and removed STATE: Need clarification An issue lacks information for further research. labels Oct 23, 2018
@miherlosev miherlosev added this to the Planned milestone Oct 23, 2018
@miherlosev
Copy link
Collaborator

miherlosev commented Oct 23, 2018

Thank for your detailed report. I've reproduced the problem using TestCafe's device emulation.

testcafe "chrome:emulation:device=iphone x" test.js

@AndreyBelym
Copy link
Contributor

It can be reproduced with our Drag functional tests & Chrome 70. The latest Chrome version on BrowserStack is 68, that's why we haven't discovered this before.

@jorgeibarra13
Copy link

Hi, any updates on this? @AndreyBelym

@AlexKamaev
Copy link
Contributor

The issue occurs in a core testcafe-hammerhead module. It is fixed, but it will be available after a new version of testcafe-hammerhead is published and used in testcafe. If you want to test the fix, you can pull the latest testcafe-hammerhead branch and add it to your project manually.

@AndreyBelym
Copy link
Contributor

Fixed in the [email protected].

@lock
Copy link

lock bot commented Mar 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or feature requests. For TestCafe API, usage and configuration inquiries, we recommend asking them 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AREA: client 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

5 participants