Skip to content
Snippets Groups Projects
Commit 5be6aa52 authored by Stanislav Idolov's avatar Stanislav Idolov
Browse files

MAGETWO-59626: Error saving configurable product after disabling child products

parent 8fe40308
Branches
No related merge requests found
<?php
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Catalog\Test\Constraint;
use Magento\Mtf\Fixture\InjectableFixture;
use Magento\Mtf\Constraint\AbstractConstraint;
use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex;
class AssertProductHasImageInGrid extends AbstractConstraint
{
/**
* Assert that product image is present in grid.
*
* @param CatalogProductIndex $productGrid
* @param InjectableFixture $product
* @return void
*/
public function processAssert(
CatalogProductIndex $productGrid,
InjectableFixture $product
) {
$filter = ['sku' => $product->getSku()];
$productGrid->open();
$productGrid->getProductGrid()->search($filter);
$src = $productGrid->getProductGrid()->getBaseImageSource();
\PHPUnit_Framework_Assert::assertTrue(
strpos($src, '/placeholder/') === false,
'Product image is not present in product grid when it should be'
);
}
/**
* Returns a string representation of the object.
*
* @return string
*/
public function toString()
{
return 'Product image is displayed in product grid.';
}
}
\ No newline at end of file
......@@ -520,6 +520,7 @@
<data name="tag" xsi:type="string">severity:S1</data>
<data name="product/data/quantity_and_stock_status/qty" xsi:type="string">100</data>
<constraint name="Magento\Catalog\Test\Constraint\AssertProductSaveMessage" />
<constraint name="Magento\Catalog\Test\Constraint\AssertProductHasImageInGrid" />
<constraint name="Magento\Catalog\Test\Constraint\AssertCanSaveProduct" />
</variation>
</testCase>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment