sortableTo example

$this->assertNotEmpty($assert_session->waitForElementVisible('named', ['link', 'Two column']));

    $this->clickLink('Two column');
    $assert_session->waitForElementVisible('named', ['button', 'Add section']);
    $page->pressButton('Add section');
    $assert_session->assertWaitOnAjaxRequest();

    $assert_session->assertNoElementAfterWait('css', '.layout__region--second .block-system-powered-by-block');
    $assert_session->elementTextNotContains('css', '.layout__region--second', 'Powered by Drupal');

    // Drag the block to a region in different section.     $this->sortableTo('.block-system-powered-by-block', '.layout__region--content', '.layout__region--second');
    $assert_session->assertWaitOnAjaxRequest();

    // Ensure the drag succeeded.     $assert_session->elementExists('css', '.layout__region--second .block-system-powered-by-block');
    $assert_session->elementTextContains('css', '.layout__region--second', 'Powered by Drupal');

    $this->assertPageNotReloaded();

    // Ensure the dragged block is still in the correct position after reload.     $this->drupalGet($layout_url);
    $assert_session->elementExists('css', '.layout__region--second .block-system-powered-by-block');
    
Home | Imprint | This part of the site doesn't use cookies.