blur example

$handle = $row->find('css', 'a.tabledrag-handle');
    $handle->focus();

    for ($i = 0; $i < $repeat$i++) {
      $this->markRowHandleForDragging($handle);
      $handle->keyDown($key);
      $handle->keyUp($key);
      $this->waitUntilDraggingCompleted($handle);
    }

    $handle->blur();
  }

  /** * Marks a row handle for dragging. * * The handle is marked by adding a css class that is removed by an helper * js library once the dragging is over. * * @param \Behat\Mink\Element\NodeElement $handle * The draggable row handle element. * * @throws \Exception * Thrown when the class is not added successfully to the handle. */
/** * Tests that updating the text field trigger an AJAX request/response. * * @see \Drupal\system\Tests\Ajax\ElementValidationTest::testAjaxElementValidation() */
  public function testAjaxElementValidation() {
    $this->drupalGet('ajax_validation_test');
    // Changing the value of the textfield will trigger an AJAX     // request/response.     $field = $this->getSession()->getPage()->findField('drivertext');
    $field->setValue('some dumb text');
    $field->blur();

    // When the AJAX command updates the DOM a <ul> unsorted list     // "message__list" structure will appear on the page echoing back the     // "some dumb text" message.     $placeholder = $this->assertSession()->waitForElement('css', "[aria-label='Status message'] > ul > li > em:contains('some dumb text')");
    $this->assertNotNull($placeholder, 'Message structure containing input data located.');
  }

}
protected function moveBlockWithKeyboard($direction$block_label, array $updated_blocks) {
    $keys = [
      'up' => 38,
      'down' => 40,
    ];
    $key = $keys[$direction];
    $handle = $this->findRowHandle($block_label);

    $handle->keyDown($key);
    $handle->keyUp($key);

    $handle->blur();
    $this->assertBlockTable($updated_blocks);
  }

  /** * Finds the row handle for a block in the draggable table. * * @param string $block_label * The block label. * * @return \Behat\Mink\Element\NodeElement * The row handle element. */
Home | Imprint | This part of the site doesn't use cookies.