10 use Magento\Catalog\Test\Page\Category\CatalogCategoryView;
11 use Magento\Cms\Test\Page\CmsIndex;
13 use Magento\Mtf\Constraint\AbstractConstraint;
37 CatalogCategoryView $categoryView,
45 $widgetText = $widget->getParameters()[
'anchor_text'];
47 \PHPUnit\Framework\Assert::assertTrue(
48 $cmsIndex->getWidgetView()->isWidgetVisible($widget, $widgetText),
49 'Widget with type catalog category link is absent on Home page.' 52 $cmsIndex->getWidgetView()->clickToWidget($widget, $widgetText);
53 $title = $categoryView->getTitleBlock()->getTitle();
54 \PHPUnit\Framework\Assert::assertEquals(
55 $widget->getParameters()[
'entities'][0]->getName(),
57 'Wrong category title.' 60 $cmsIndex->getFooterBlock()->openAdvancedSearch();
61 \PHPUnit\Framework\Assert::assertTrue(
62 $cmsIndex->getWidgetView()->isWidgetVisible($widget, $widgetText),
63 'Widget with type catalog category link is absent on Advanced Search page.' 74 return "Created widget displayed on frontend on Home and Advanced Search pages.";