You are here

public function ElementContext::assertField in Lightning Core 8.5

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

Asserts that a form field is present.

Oddly, MinkContext does not appear to provide a step definition for this.

@Then I should see a(n) :field field

Parameters

string $field: The field locator.

Return value

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

2 calls to ElementContext::assertField()
ElementContext::assertNoOption in tests/contexts/ElementContext.behat.inc
Asserts that a select list does not have a particular option.
ElementContext::assertOption in tests/contexts/ElementContext.behat.inc
Asserts that a select list has a particular option.

File

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

Class

ElementContext
Contains miscellaneous step definitions for working with HTML elements.

Namespace

Acquia\LightningExtension\Context

Code

public function assertField($field) {
  return $this
    ->assertSession()
    ->fieldExists($field);
}