Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertAttributeSetInGrid.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 AssertAttributeSetInGrid extends AbstractConstraint
18 {
26  public function processAssert(CatalogProductSetIndex $productSetPage, CatalogAttributeSet $attributeSet)
27  {
28  $filterAttributeSet = [
29  'set_name' => $attributeSet->getAttributeSetName(),
30  ];
31 
32  $productSetPage->open();
33  \PHPUnit\Framework\Assert::assertTrue(
34  $productSetPage->getGrid()->isRowVisible($filterAttributeSet),
35  'Attribute Set \'' . $filterAttributeSet['set_name'] . '\' is absent in Attribute Set grid.'
36  );
37  }
38 
44  public function toString()
45  {
46  return 'Attribute set is present in Attribute Sets grid';
47  }
48 }
processAssert(CatalogProductSetIndex $productSetPage, CatalogAttributeSet $attributeSet)