10 use Magento\Catalog\Test\Page\Category\CatalogCategoryView;
11 use Magento\Cms\Test\Page\CmsIndex;
12 use Magento\Mtf\Constraint\AbstractConstraint;
13 use Magento\Mtf\Fixture\FixtureInterface;
46 CatalogCategoryView $catalogCategoryView,
53 $cmsIndex->getTopmenu()->selectCategoryByName($categoryName);
55 $isProductVisible = $catalogCategoryView->getListProductBlock()->getProductItem(
$product)->isVisible();
56 while (!$isProductVisible && $catalogCategoryView->getBottomToolbar()->nextPage()) {
57 $isProductVisible = $catalogCategoryView->getListProductBlock()->getProductItem(
$product)->isVisible();
61 $isProductVisible = !$isProductVisible;
62 $this->errorMessage =
'Product found in this category.';
63 $this->successfulMessage =
'Asserts that the product could not be found in this category.';
66 \PHPUnit\Framework\Assert::assertTrue(
80 $quantityAndStockStatus =
$product->getQuantityAndStockStatus();
81 return isset($quantityAndStockStatus[
'is_in_stock']) ? $quantityAndStockStatus[
'is_in_stock'] :
null;
getStockStatus(FixtureInterface $product)
processAssert(CatalogCategoryView $catalogCategoryView, CmsIndex $cmsIndex, FixtureInterface $product, Category $category=null)