Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
DeleteProductAttributeEntityTest.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Catalog\Test\Fixture\CatalogProductAttribute;
10 use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeIndex;
11 use Magento\Catalog\Test\Page\Adminhtml\CatalogProductAttributeNew;
12 use Magento\Mtf\TestCase\Injectable;
13 
29 class DeleteProductAttributeEntityTest extends Injectable
30 {
31  /* tags */
32  const MVP = 'yes';
33  /* end tags */
34 
43  public function testDeleteProductAttribute(
44  CatalogProductAttribute $attribute,
45  CatalogProductAttributeIndex $attributeIndex,
46  CatalogProductAttributeNew $attributeNew
47  ) {
48  //Precondition
49  $attribute->persist();
50 
51  //Steps
52  $attributeIndex->open();
53  $attributeIndex->getGrid()->searchAndOpen(['frontend_label' => $attribute->getFrontendLabel()]);
54  $attributeNew->getPageActions()->delete();
55  $attributeNew->getModalBlock()->acceptAlert();
56  }
57 }
testDeleteProductAttribute(CatalogProductAttribute $attribute, CatalogProductAttributeIndex $attributeIndex, CatalogProductAttributeNew $attributeNew)