You are here

public function ElementContext::assertDisabledField in Lightning Core 8

Same name and namespace in other branches
  1. 8.5 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::assertDisabledField()
  2. 8.2 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::assertDisabledField()
  3. 8.3 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::assertDisabledField()
  4. 8.4 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::assertDisabledField()

Asserts that a field element exists and is disabled.

@Then I should see a disabled :field field @Then the :field field should be disabled

Parameters

string $field: The field locator.

Return value

\Behat\Mink\Element\NodeElement The disabled form field element.

File

tests/contexts/ElementContext.behat.inc, line 82

Class

ElementContext
Contains miscellaneous step definitions for working with HTML elements.

Namespace

Acquia\LightningExtension\Context

Code

public function assertDisabledField($field) {
  return $this
    ->assertSession()
    ->elementAttributeExists('named', [
    'field',
    $field,
  ], 'disabled');
}