10 use Magento\Catalog\Test\Fixture\CatalogProductAttribute;
11 use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetEdit;
12 use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetIndex;
13 use Magento\Mtf\Constraint\AbstractConstraint;
33 CatalogProductSetIndex $productSet,
34 CatalogProductSetEdit $productSetEdit,
36 CatalogProductAttribute $productAttribute =
null 42 $productSet->getGrid()->searchAndOpen($filterAttribute);
43 \PHPUnit\Framework\Assert::assertEquals(
44 $filterAttribute[
'set_name'],
45 $productSetEdit->getAttributeSetEditBlock()->getAttributeSetName(),
46 'The attribute set wasn\'t found.' 47 .
"\nExpected: " . $filterAttribute[
'set_name']
48 .
"\nActual: " . $productSetEdit->getAttributeSetEditBlock()->getAttributeSetName()
50 if ($productAttribute !==
null) {
51 $attributeLabel = $productAttribute->getFrontendLabel();
52 \PHPUnit\Framework\Assert::assertTrue(
53 $productSetEdit->getAttributeSetEditBlock()->checkProductAttribute($attributeLabel),
54 "Product Attribute is absent on Attribute Set Groups" 66 return 'Data from the Attribute Set form matched with fixture';