Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertImportedGroupedProducts.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Mtf\Fixture\FixtureInterface;
11 
16 {
22  protected $productType = 'grouped';
23 
29  protected $neededKeys = [
30  'sku',
31  'name',
32  'associated_skus',
33  'url_key',
34  ];
35 
42  protected function getDisplayedProductData(FixtureInterface $product)
43  {
45  $assignedProduct = $productData['associated']['assigned_products'][0];
46  $form = $this->catalogProductEdit->getProductForm();
47  $form->openSection('grouped');
48  $attributeSku = $form->getSection('grouped')->getListAssociatedProductsBlock()->getAssociatedProductSku()[0];
49  $productData['associated_skus'] = $attributeSku . '=' . $assignedProduct['qty'];
50  unset($productData['associated']);
51 
52  return $this->getResultProductsData($productData);
53  }
54 
60  public function toString()
61  {
62  return 'Assert that product data from CSV import file and data from product edit page are correct and match.';
63  }
64 }
$productData