DevExpress / testcafe

A Node.js tool to automate end-to-end web testing.
https://testcafe.io
MIT License
9.82k stars 671 forks source link

Unnecessary 'click' event is raised if a draggable element was dropped #8250

Open marquisandres opened 2 months ago

marquisandres commented 2 months ago

What is your Scenario?

I'd like to use the dragToElement method to select multiple cells in a table

What is the Current behavior?

I'm seeing this issue again on v. 3.6.0 and 3.6.2 https://github.com/DevExpress/testcafe/issues/1516 When the cursor reaches the destinationSelector where it performs the drop, it also performs an extra click, which in my case unselects the cells

What is the Expected behavior?

There should not be any extra clicks performed after the drop.

What is the public URL of the test page? (attach your complete example)

Example page https://demo.automationtesting.in/Register.html

What is your TestCafe test code?

I can't post my code or my page, but this example illustrates the issue.

import { Selector } from 'testcafe';

fixture`Example page`
    .page`https://demo.automationtesting.in/Register.html`;

test('Check login', async t => {
    const h2Label = Selector('h2');
    const maleRadio = Selector('input[value="Male"]');

    await t
        .setTestSpeed(0.5)
        .dragToElement(h2Label, maleRadio)
        .wait(1000)
});

Your complete configuration file

No response

Your complete test report

No response

Screenshots

No response

Steps to Reproduce

  1. Execute the example code
  2. Observe the behaviour
  3. destinationSelector (male radio button) receives a click

https://github.com/user-attachments/assets/c1c275a2-e6b0-48d9-b63d-3fb9bb3493ef

TestCafe version

3.6.0 and 3.6.2

Node.js version

No response

Command-line arguments

testcafe chrome --test 'Check login'

Browser name(s) and version(s)

Chrome 127

Platform(s) and version(s)

Windows 11 and Linux

Other

No response

github-actions[bot] commented 1 month ago

We appreciate you taking the time to share information about this issue. We reproduced the bug and added this ticket to our internal task queue. We'll update this thread once we have news.