11 use Magento\Catalog\Test\Page\Product\CatalogProductCompare;
12 use Magento\Catalog\Test\Page\Product\CatalogProductView;
13 use Magento\Cms\Test\Page\CmsIndex;
15 use Magento\Mtf\Client\BrowserInterface;
16 use Magento\Mtf\Constraint\AbstractConstraint;
71 CatalogProductSimple $productSimple1,
72 CatalogProductSimple $productSimple2,
83 $productSimple1->persist();
85 $productSimple2->persist();
92 \PHPUnit\Framework\Assert::assertTrue(
93 $this->catalogProductCompare->getWidgetView()->isWidgetVisible($widget,
'Recently Compared'),
94 'Widget is absent on Product Compare page.' 107 $this->browser->open($_ENV[
'app_frontend_url'] . $itemProduct->getUrlKey() .
'.html');
108 $this->catalogProductView->getViewBlock()->clickAddToCompare();
109 $this->catalogProductView->getMessagesBlock()->waitSuccessMessage();
120 $this->cmsIndex->open();
121 $this->cmsIndex->getCompareLinkBlock()->waitForCompareProductsLinks();
122 $this->cmsIndex->getLinksBlock()->openLink(
"Compare Products");
123 $this->catalogProductCompare->getCompareProductsBlock()->removeAllProducts();
133 return "Widget with type Recently Compared Products is present on Product Compare page";