9 use Magento\Catalog\Test\Page\Product\CatalogProductView;
10 use Magento\Mtf\Client\BrowserInterface;
13 use Magento\Cms\Test\Page\CmsIndex;
14 use Magento\Mtf\Fixture\FixtureInterface;
26 private $productViewPage;
40 private $cmsIndexPage;
54 BrowserInterface $browser,
55 CatalogProductView $catalogProductView,
57 FixtureInterface $initialProduct,
59 CmsIndex $cmsIndexPage
61 $this->browser = $browser;
62 $this->cmsIndexPage = $cmsIndexPage;
63 $this->productViewPage = $catalogProductView;
77 $this->browser->open($_ENV[
'app_frontend_url'] . $initialProduct->getUrlKey() .
'.html');
79 \PHPUnit\Framework\Assert::assertEquals(
80 $initialProduct->getName(),
81 $this->productViewPage->getViewBlock()->getProductName(),
82 'Product ' . $initialProduct->getName() .
' is incorrect.' 95 $this->cmsIndexPage->getStoreSwitcherBlock()->selectStoreView(
$store->getName());
96 $this->cmsIndexPage->getLinksBlock()->waitWelcomeMessage();
98 $this->browser->open($_ENV[
'app_frontend_url'] . $updatedProduct->getUrlKey() .
'.html');
100 \PHPUnit\Framework\Assert::assertEquals(
101 $updatedProduct->getName(),
102 $this->productViewPage->getViewBlock()->getProductName(),
103 'Product ' . $updatedProduct->getName() .
' is not available on ' .
$store->getName() .
' store.' 114 return 'Product is displayed correctly in default and custom store views.';
processAssert(BrowserInterface $browser, CatalogProductView $catalogProductView, FixtureInterface $product, FixtureInterface $initialProduct, Store $store, CmsIndex $cmsIndexPage)
verifyProductOnCustomStore(FixtureInterface $updatedProduct, Store $store)
verifyProductOnMainStore(FixtureInterface $initialProduct)