Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertProductAttributeAbsenceForExport.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Catalog\Test\Fixture\CatalogProductAttribute;
11 use Magento\ImportExport\Test\Page\Adminhtml\AdminExportIndex;
12 use Magento\Mtf\Constraint\AbstractConstraint;
13 
18 class AssertProductAttributeAbsenceForExport extends AbstractConstraint
19 {
28  public function processAssert(
29  AdminExportIndex $exportIndex,
30  CatalogProductAttribute $attribute,
31  ExportData $export
32  ) {
33  $exportIndex->open();
34  $exportIndex->getExportForm()->fill($export);
35 
36  $filter = [
37  'attribute_code' => $attribute->getAttributeCode(),
38  ];
39 
40  \PHPUnit\Framework\Assert::assertFalse(
41  $exportIndex->getFilterExport()->isRowVisible($filter),
42  'Attribute \'' . $attribute->getFrontendLabel() . '\' is present in Filter export grid'
43  );
44  }
45 
51  public function toString()
52  {
53  return 'Product Attribute is absent in Filter export grid.';
54  }
55 }
processAssert(AdminExportIndex $exportIndex, CatalogProductAttribute $attribute, ExportData $export)