9 use Magento\Catalog\Test\Page\Product\CatalogProductView;
10 use Magento\Mtf\Client\BrowserInterface;
12 use Magento\Mtf\Fixture\FixtureInterface;
47 BrowserInterface $browser,
48 CatalogProductView $catalogProductView,
51 $browser->open($_ENV[
'app_frontend_url'] .
$product->getUrlKey() .
'.html');
54 $this->productView = $catalogProductView->getViewBlock();
57 \PHPUnit\Framework\Assert::assertEmpty(
59 "\nFound the following errors:\n" . implode(
" \n",
$errors)
86 if ($this->productView->isGalleryVisible()) {
90 return 'Gallery for product ' . $this->product->getName() .
' is not visible.';
100 if (!$this->productView->isBaseImageVisible()) {
101 return 'Base image for product ' . $this->product->getName() .
' is not visible.';
104 if (!$this->
isImageLoaded($this->productView->getBaseImageSource())) {
105 return 'Base image file is corrupted or does not exist for product ' . $this->product->getName();
119 $this->productView->clickBaseImage();
120 if (!$this->productView->isFullImageVisible()) {
121 return 'Full image for product ' . $this->product->getName() .
' should be visible after click on base one';
124 if (!$this->
isImageLoaded($this->productView->getFullImageSource())) {
125 return 'Full image file is corrupted or does not exist for product ' . $this->product->getName();
128 $this->productView->closeFullImage();
151 return 'Product images on product view page are correct.';
processAssert(BrowserInterface $browser, CatalogProductView $catalogProductView, FixtureInterface $product)