/** * Assert existing product on admin product grid * * @return void */ protected function assertOnBackend() { $productGridPage = Factory::getPageFactory()->getCatalogProductIndex(); $productGridPage->open(); $gridBlock = $productGridPage->getProductGrid(); $this->assertTrue($gridBlock->isRowVisible(['sku' => $this->product->getSku()])); }
/** * Test update downloadable product * * @param DownloadableProduct $product * @param Category $category * @return void */ public function test(DownloadableProduct $product, Category $category) { // Steps $filter = ['sku' => $this->product->getSku()]; $this->catalogProductIndex->open()->getProductGrid()->searchAndOpen($filter); $productBlockForm = $this->catalogProductEdit->getProductForm(); $productBlockForm->fill($product, null, $category); $this->catalogProductEdit->getFormPageActions()->save(); }