/**
  * Prepare fixture's qty data.
  *
  * @param GroupedProduct $product
  * @return array
  */
 protected function prepareFixtureQtyData(GroupedProduct $product)
 {
     $qtyData = [];
     $associatedProducts = $product->getDataFieldConfig('associated')['source']->getProducts();
     foreach ($product->getAssociated() as $key => $option) {
         $qtyData[] = ['name' => $associatedProducts[$key]->getName(), 'qty' => $option['qty']];
     }
     return $this->sortDataByPath($qtyData, '::name');
 }
 /**
  * Verify product price on grouped product view page.
  *
  * @param GroupedProduct $product
  * @param CatalogProductView $catalogProductView
  * @param AssertPriceOnProductPageInterface $object
  * @param Browser $browser
  * @param string $typePrice [optional]
  * @return void
  */
 protected function processAssertPrice(GroupedProduct $product, CatalogProductView $catalogProductView, AssertPriceOnProductPageInterface $object, Browser $browser, $typePrice = '')
 {
     $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
     $groupedData = $product->getDataFieldConfig('associated')['source']->getProducts();
     foreach ($groupedData as $key => $subProduct) {
         $catalogProductView->getGroupedProductViewBlock()->{'item' . $typePrice . 'PriceProductBlock'}(++$key);
         $object->setErrorMessage(sprintf($this->errorMessage, $subProduct->getName()));
         $object->assertPrice($subProduct, $catalogProductView->getGroupedProductViewBlock(), 'Grouped');
     }
 }