Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
magento2-base
dev
tests
functional
tests
app
Magento
Catalog
Test
Constraint
AssertProductIsNotVisibleInComparePage.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Catalog\Test\Constraint
;
8
9
use Magento\Catalog\Test\Page\Product\CatalogProductCompare;
10
use Magento\Mtf\Constraint\AbstractConstraint;
11
use Magento\Mtf\Fixture\FixtureInterface;
12
17
class
AssertProductIsNotVisibleInComparePage
extends
AbstractConstraint
18
{
19
/* tags */
20
const
SEVERITY
=
'low'
;
21
/* end tags */
22
23
const
SUCCESS_MESSAGE
=
'You have no items to compare.'
;
24
33
public
function
processAssert
(CatalogProductCompare $comparePage, FixtureInterface
$product
, $countProducts = 0)
34
{
35
$comparePage->open();
36
$compareBlock = $comparePage->getCompareProductsBlock();
37
38
if
($countProducts > 1) {
39
\PHPUnit\Framework\Assert::assertFalse(
40
$compareBlock->isProductVisibleInCompareBlock(
$product
->getName()),
41
'The product displays on Compare Products page.'
42
);
43
}
else
{
44
\PHPUnit\Framework\Assert::assertEquals(
45
self::SUCCESS_MESSAGE,
46
$compareBlock->getEmptyMessage(),
47
'The product displays on Compare Products page.'
48
);
49
}
50
}
51
57
public
function
toString
()
58
{
59
return
'Products is not displayed on Compare Products page.'
;
60
}
61
}
Magento\Catalog\Test\Constraint\AssertProductIsNotVisibleInComparePage\SEVERITY
const SEVERITY
Definition:
AssertProductIsNotVisibleInComparePage.php:20
Magento\Catalog\Test\Constraint\AssertProductIsNotVisibleInComparePage
Definition:
AssertProductIsNotVisibleInComparePage.php:17
Magento\Catalog\Test\Constraint\AssertProductIsNotVisibleInComparePage\processAssert
processAssert(CatalogProductCompare $comparePage, FixtureInterface $product, $countProducts=0)
Definition:
AssertProductIsNotVisibleInComparePage.php:33
Magento\Catalog\Test\Constraint\AssertProductIsNotVisibleInComparePage\SUCCESS_MESSAGE
const SUCCESS_MESSAGE
Definition:
AssertProductIsNotVisibleInComparePage.php:23
Magento\Catalog\Test\Constraint
Definition:
AssertAbsenceDeleteAttributeButton.php:7
$product
$product
Definition:
bundle_product_with_not_visible_children.php:22
Magento\Catalog\Test\Constraint\AssertProductIsNotVisibleInComparePage\toString
toString()
Definition:
AssertProductIsNotVisibleInComparePage.php:57