/** * Test update downloadable product * * @param CatalogProductDownloadable $product * @param CatalogCategory $category * @return void */ public function testUpdateDownloadableProduct(CatalogProductDownloadable $product, CatalogCategory $category) { $filter = ['sku' => $this->product->getSku()]; $this->catalogProductIndex->open()->getProductGrid()->searchAndOpen($filter); $productBlockForm = $this->catalogProductEdit->getForm(); $productBlockForm->fillProduct($product, $category); $this->catalogProductEdit->getFormAction()->save(); }
/** * Run update product simple entity test * * @param CatalogProductSimple $product * @return void */ public function testUpdate(CatalogProductSimple $product) { $filter = ['sku' => $this->product->getSku()]; $this->productGrid->open()->getProductGrid()->searchAndOpen($filter); $productBlockForm = $this->editProductPage->getForm(); $productBlockForm->fillProduct($product); $this->editProductPage->getFormAction()->save(); }
/** * Run update product virtual entity test * * @param CatalogProductVirtual $product * @return void */ public function test(CatalogProductVirtual $product) { // Steps $this->productGrid->open(); $this->productGrid->getProductGrid()->searchAndOpen(['sku' => $this->product->getSku()]); $this->editProductPage->getForm()->fill($product); $this->editProductPage->getFormAction()->save(); }
/** * Test update bundle product * * @param CatalogProductBundle $product * @param CatalogProductBundle $originalProduct * @return void */ public function test(CatalogProductBundle $product, CatalogProductBundle $originalProduct) { $originalProduct->persist(); $this->catalogProductIndex->open(); $filter = ['sku' => $originalProduct->getSku()]; $this->catalogProductIndex->getProductGrid()->searchAndOpen($filter); $this->catalogProductEdit->getForm()->fill($product); $this->catalogProductEdit->getFormAction()->save(); }
/** * Test update grouped product * * @param CatalogProductGrouped $product * @param CatalogProductGrouped $originalProduct * @return void */ public function test(CatalogProductGrouped $product, CatalogProductGrouped $originalProduct) { // Precondition $originalProduct->persist(); // Steps $this->catalogProductIndex->open(); $this->catalogProductIndex->getProductGrid()->searchAndOpen(['sku' => $originalProduct->getSku()]); $this->catalogProductEdit->getForm()->fill($product); $this->catalogProductEdit->getFormAction()->save(); }