public function AttributeTest::testAttributeUiClassAttributeAdd in Ubercart 8.4
Tests the "add product class attribute option" user interface.
File
- uc_attribute/
tests/ src/ Functional/ AttributeTest.php, line 628
Class
- AttributeTest
- Tests the product attribute API.
Namespace
Drupal\Tests\uc_attribute\FunctionalCode
public function testAttributeUiClassAttributeAdd() {
/** @var \Drupal\Tests\WebAssert $assert */
$assert = $this
->assertSession();
$class = $this
->createProductClass();
$attribute = $this
->createAttribute();
$this
->drupalGet('admin/structure/types/manage/' . $class
->id() . '/attributes/add');
// Verify class attribute add form is working.
$assert
->responseContains($attribute->name . '</label>');
$edit['add_attributes[' . $attribute->aid . ']'] = 1;
$this
->drupalGet('admin/structure/types/manage/' . $class
->id() . '/attributes/add');
$this
->submitForm($edit, 'Add attributes');
$assert
->pageTextNotContains('No attributes available.');
}