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
Backend
Test
Constraint
AssertBestsellersOnDashboard.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Backend\Test\Constraint
;
8
9
use Magento\Mtf\Constraint\AbstractConstraint;
10
use
Magento\Sales\Test\Fixture\OrderInjectable
;
11
use Magento\Backend\Test\Page\Adminhtml\Dashboard;
12
16
class
AssertBestsellersOnDashboard
extends
AbstractConstraint
17
{
18
/* tags */
19
const
SEVERITY
=
'low'
;
20
/* end tags */
21
29
public
function
processAssert(OrderInjectable
$order
, Dashboard $dashboard)
30
{
31
$dashboard->open();
32
$dashboard->getStoreStatsBlock()->refreshData();
34
$bestsellersGrid = $dashboard->getStoreStatsBlock()->getTab(
'bestsellers'
)->getBestsellersGrid();
35
$products
=
$order
->getEntityId()[
'products'
];
36
foreach
(
$products
as
$product
) {
37
\PHPUnit\Framework\Assert::assertTrue(
38
$bestsellersGrid->isProductVisible(
$product
),
39
'Bestseller '
.
$product
->getName() .
' is not present in report grid after refresh data.'
40
);
41
}
42
}
43
49
public
function
toString
()
50
{
51
return
'Bestsellers successfully updated after Refreshing data.'
;
52
}
53
}
Magento\Backend\Test\Constraint\AssertBestsellersOnDashboard\SEVERITY
const SEVERITY
Definition:
AssertBestsellersOnDashboard.php:19
$order
$order
Definition:
order.php:55
$products
$products
Definition:
products_for_search.php:14
$product
$product
Definition:
bundle_product_with_not_visible_children.php:22
Magento\Backend\Test\Constraint
Definition:
AssertAdminLoginPageIsAvailable.php:7
Magento\Backend\Test\Constraint\AssertBestsellersOnDashboard\toString
toString()
Definition:
AssertBestsellersOnDashboard.php:49
Magento\Sales\Test\Fixture\OrderInjectable
Definition:
BillingAddressId.php:7
Magento\Backend\Test\Constraint\AssertBestsellersOnDashboard
Definition:
AssertBestsellersOnDashboard.php:16