10 use Magento\Backend\Test\Page\Adminhtml\Dashboard;
11 use Magento\Mtf\Constraint\AbstractConstraint;
26 public function processAssert(Dashboard $dashboard, GlobalSearch $search)
28 $types = [
'Products',
'Customers',
'Orders',
'Pages'];
29 foreach ($types as
$type) {
30 $this->adminSearchAssert($dashboard, $search,
$type);
41 private function adminSearchAssert($dashboard, $search,
$type)
43 $adminSearchPreview =
'"' . $search->getQuery() .
'" in '.
$type;
44 $isVisibleInResult = $dashboard->getAdminPanelHeader()->isAdminSearchPreviewVisible($adminSearchPreview,
$type);
45 \PHPUnit\Framework\Assert::assertTrue(
47 'Search Preview for ' .
$type .
' is not in search results' 58 return 'Search preview is present in search results';
processAssert(Dashboard $dashboard, GlobalSearch $search)