You are here

public function ElementContext::assertOption in Lightning Core 8

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

Asserts that a select list has a particular option.

@Then the :select field should have a(n) :option option

Parameters

string $select: The select list to check.

string $option: The option to look for.

1 call to ElementContext::assertOption()
ElementContext::assertOptions in tests/contexts/ElementContext.behat.inc
Asserts that a select list has a set of options.

File

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

Class

ElementContext
Contains miscellaneous step definitions for working with HTML elements.

Namespace

Acquia\LightningExtension\Context

Code

public function assertOption($select, $option) {
  $this
    ->assertSession()
    ->elementExists('named', [
    'option',
    $option,
  ], $this
    ->assertField($select));
}