9 use Magento\PageCache\Test\Page\Adminhtml\AdminCache;
10 use Magento\Catalog\Test\Page\Category\CatalogCategoryView;
11 use Magento\Cms\Test\Page\CmsIndex;
13 use Magento\Mtf\Constraint\AbstractConstraint;
42 CatalogProductSimple $productSimple1,
43 CatalogProductSimple $productSimple2,
45 AdminCache $adminCache
51 $adminCache->getActionsBlock()->flushMagentoCache();
52 $adminCache->getMessagesBlock()->waitSuccessMessage();
54 $productSimple1->persist();
55 $productSimple2->persist();
60 $categoryName = $widget->getWidgetInstance()[0][
'entities']->getName();
61 $cmsIndex->getTopmenu()->selectCategoryByName($categoryName);
62 \PHPUnit\Framework\Assert::assertTrue(
64 'Widget is absent on Category page.' 66 \PHPUnit\Framework\Assert::assertEquals(
68 $this->catalogCategoryView->getViewBlock()->getProductsFromCatalogNewProductsListBlock(),
69 'There are wrong products or products are absent on Catalog New Products List block on Category page.' 80 return "Catalog New Products List widget is present on Category page.";