Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertAttributeSetNotInGrid.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetIndex;
11 use Magento\Mtf\Constraint\AbstractConstraint;
12 
17 class AssertAttributeSetNotInGrid extends AbstractConstraint
18 {
19  /* tags */
20  const SEVERITY = 'low';
21  /* end tags */
22 
30  public function processAssert(CatalogProductSetIndex $productSetPage, CatalogAttributeSet $attributeSet)
31  {
32  $filterAttributeSet = [
33  'set_name' => $attributeSet->getAttributeSetName(),
34  ];
35 
36  $productSetPage->open();
37  \PHPUnit\Framework\Assert::assertFalse(
38  $productSetPage->getGrid()->isRowVisible($filterAttributeSet),
39  'A "' . $filterAttributeSet['set_name'] .
40  '" attribute set name already exists. Create a new name and try again.'
41  );
42  }
43 
49  public function toString()
50  {
51  return 'Attribute set is absent in Attribute Sets grid';
52  }
53 }
processAssert(CatalogProductSetIndex $productSetPage, CatalogAttributeSet $attributeSet)