public function AttributeTest::testAttributeUiDeleteAttribute in Ubercart 8.4
Tests the "delete attribute" user interface.
File
- uc_attribute/
tests/ src/ Functional/ AttributeTest.php, line 460
Class
- AttributeTest
- Tests the product attribute API.
Namespace
Drupal\Tests\uc_attribute\FunctionalCode
public function testAttributeUiDeleteAttribute() {
/** @var \Drupal\Tests\WebAssert $assert */
$assert = $this
->assertSession();
$attribute = $this
->createAttribute();
$this
->drupalGet('admin/store/products/attributes/' . $attribute->aid . '/delete');
$assert
->pageTextContains('Are you sure you want to delete the attribute ' . $attribute->name . '?');
$this
->submitForm([], 'Delete');
$assert
->pageTextContains('Product attribute deleted.');
}