12 use Magento\Catalog\Test\Page\Category\CatalogCategoryView;
13 use Magento\Cms\Test\Page\CmsIndex;
15 use Magento\Mtf\Client\BrowserInterface;
16 use Magento\Mtf\Constraint\AbstractConstraint;
61 CatalogProductSimple $productSimple,
74 $this->objectManager->create(
75 \
Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep::class,
80 $productSimple->persist();
82 $this->browser->open($_ENV[
'app_frontend_url'] . $productSimple->getUrlKey() .
'.html');
83 $this->waitForJsCoreInitialize();
91 private function waitForJsCoreInitialize()
104 CatalogProductSimple $productSimple,
107 $this->cmsIndex->open();
108 $this->cmsIndex->getTopmenu()->selectCategoryByName(
$category->getName());
110 $products = $this->catalogCategoryView->getViewBlock()->getProductsFromRecentlyViewedBlock();
111 \PHPUnit\Framework\Assert::assertTrue(
112 in_array($productSimple->getName(),
$products),
113 'Product' . $productSimple->getName() .
' is absent on Recently Viewed block on Category page.' 124 return "Widget with type Recently Viewed Products is present on Category page.";