9 use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit;
10 use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex;
11 use Magento\Mtf\Fixture\FixtureInterface;
28 CatalogProductIndex $productGrid,
29 CatalogProductEdit $productPage
32 $duplicateProductSku =
$product->getSku() .
'-1';
33 $filter = [
'sku' => $duplicateProductSku];
35 $productGrid->getProductGrid()->searchAndOpen($filter);
40 if (isset($compareData[
'quantity_and_stock_status'][
'qty'])) {
41 $compareData[
'quantity_and_stock_status'][
'qty'] =
'';
42 $compareData[
'quantity_and_stock_status'][
'is_in_stock'] =
'Out of Stock';
46 $error = $this->
verifyData($fixtureData, $formData);
47 \PHPUnit\Framework\Assert::assertTrue(empty($error), $error);
60 $data[
'quantity_and_stock_status'][
'is_in_stock'] =
'Out of Stock';
72 preg_match(
"~\d+$~", $urlKey, $matches);
73 $key = intval($matches[0]) + 1;
74 return str_replace($matches[0], $key, $urlKey);
84 return 'Form data equals to fixture data of duplicated product.';