You are here

public function AttributeTest::testAttributeUiAttributeOptions in Ubercart 8.4

Tests the attribute options user interface.

File

uc_attribute/tests/src/Functional/AttributeTest.php, line 475

Class

AttributeTest
Tests the product attribute API.

Namespace

Drupal\Tests\uc_attribute\Functional

Code

public function testAttributeUiAttributeOptions() {

  /** @var \Drupal\Tests\WebAssert $assert */
  $assert = $this
    ->assertSession();
  $attribute = $this
    ->createAttribute();
  $option = $this
    ->createAttributeOption([
    'aid' => $attribute->aid,
  ]);
  uc_attribute_option_save($option);
  $this
    ->drupalGet('admin/store/products/attributes/' . $attribute->aid . '/options');
  $assert
    ->pageTextContains('Options for ' . $attribute->name);
}