Describe your bug or feature request.

We have ProductLayoutBuilderIntegrationTest that fails randomly when checking whether the element doesn't exist after the AJAX submission.

I guess what is happening here is that the AJAX commands returned by the request don't have time to be executed before $assert_session->assertNoElementAfterWait('css', '#drupal-off-canvas');.

What I recommend is replacing

    $assert_session->assertWaitOnAjaxRequest();
    $assert_session->assertNoElementAfterWait('css', '#drupal-off-canvas');

with

    $assert_session->waitForElementRemoved('css', '#drupal-off-canvas');

Issue fork commerce-3608038

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

tbkot created an issue. See original summary.

  • tbkot committed d857247c on 3.x
    Issue #3608038: Wait for the element to be removed instead of checking...
jsacksick’s picture

Status: Active » Fixed

Really great job if this is fixed for good!!!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • tbkot committed dda4fcff on 3.x
    Issue #3608038: Wait for ajax when formatter is changed