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
Review
Test
Constraint
AssertReviewLinksIsPresentOnProductPage.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Review\Test\Constraint
;
8
9
use Magento\Mtf\Client\Browser;
10
use Magento\Mtf\Fixture\InjectableFixture;
11
use Magento\Catalog\Test\Page\Product\CatalogProductView;
12
use Magento\Mtf\Constraint\AbstractConstraint;
13
17
class
AssertReviewLinksIsPresentOnProductPage
extends
AbstractConstraint
18
{
24
protected
$severeness
=
'middle'
;
25
34
public
function
processAssert
(Browser $browser, CatalogProductView $catalogProductView, InjectableFixture
$product
)
35
{
36
$browser->open($_ENV[
'app_frontend_url'
] .
$product
->getUrlKey() .
'.html'
);
37
38
// Verify add review link
39
\PHPUnit\Framework\Assert::assertTrue(
40
$catalogProductView->getReviewSummary()->getAddReviewLink()->isVisible(),
41
'Add review link is not visible on product page.'
42
);
43
44
// Verify view review link
45
$viewReviewLink = $catalogProductView->getReviewSummary()->getViewReviewLink();
46
\PHPUnit\Framework\Assert::assertTrue(
47
$viewReviewLink->isVisible(),
48
'View review link is not visible on product page.'
49
);
50
\PHPUnit\Framework\Assert::assertContains(
51
'1'
,
52
$viewReviewLink->getText(),
53
'There is more than 1 approved review.'
54
);
55
}
56
62
public
function
toString
()
63
{
64
return
'Add and view review links are present on product page.'
;
65
}
66
}
Magento\Review\Test\Constraint\AssertReviewLinksIsPresentOnProductPage\processAssert
processAssert(Browser $browser, CatalogProductView $catalogProductView, InjectableFixture $product)
Definition:
AssertReviewLinksIsPresentOnProductPage.php:34
Magento\Review\Test\Constraint\AssertReviewLinksIsPresentOnProductPage
Definition:
AssertReviewLinksIsPresentOnProductPage.php:17
Magento\Review\Test\Constraint\AssertReviewLinksIsPresentOnProductPage\toString
toString()
Definition:
AssertReviewLinksIsPresentOnProductPage.php:62
Magento\Review\Test\Constraint\AssertReviewLinksIsPresentOnProductPage\$severeness
$severeness
Definition:
AssertReviewLinksIsPresentOnProductPage.php:24
$product
$product
Definition:
bundle_product_with_not_visible_children.php:22
Magento\Review\Test\Constraint
Definition:
AssertProductRatingInGrid.php:7