Skip to content

Function dragTo() won't work in v1.7.0. #376

Description

@nagyad

After the v1.7.0 release our automated tests started to fail where we use the dragTo() because on first try it doesn't seem to do anything, but on second execution (executing the same step right after) it successfully moves the element.
Right after downgrading to v1.6.0 the problem disappeared.
Selenium version: selenium/standalone-chrome:4.1.3-20220405

Activity

  1. stof commented on Dec 12, 2023

    @stof
    Member

    Do you have a reproducer for that ? It would make it easier to debug the problem.

  2. nagyad commented on Dec 12, 2023

    @nagyad
    Author

    Our test case is a Drupal functional test which drags multi-value field values in a widget, not sure how relevant is that in this case.
    The part in question:
    // Edit the node to reorder field items.
    $this->drupalGet($node->toUrl('edit-form'));
    $handle = $this->assertSession()->elementExists('css', 'table#featured-media-field-values > tbody > tr:nth-child(1) a.tabledrag-handle');
    $target = $this->assertSession()->elementExists('css', 'table#featured-media-field-values > tbody > tr:nth-child(2) a.tabledrag-handle');
    $handle->dragTo($target);
    $this->assertSession()->assertWaitOnAjaxRequest();

    Which runs just fine, but the assertions after fail, since the $handle->dragTo($target); didn't work correctly.

  3. stof commented on Dec 12, 2023

    @stof
    Member

    Could you try bisecting which commit between 1.6.0 and 1.7.0 introduces the failure ? Without a reproducer, I cannot do it myself.

  4. nagyad commented on Dec 12, 2023

    @nagyad
    Author

    It fails with this commit: affb7ea and after. With the previous commits, it works just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions