Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertProductGridIsRendered.php
Go to the documentation of this file.
1 <?php
8 
12 class AssertProductGridIsRendered extends \Magento\Mtf\Constraint\AbstractConstraint
13 {
20  public function processAssert(
21  \Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex $catalogProductIndex
22  ) {
23  $productId = $catalogProductIndex->open()->getProductGrid()->getFirstItemId();
24  \PHPUnit\Framework\Assert::assertNotNull(
25  $productId,
26  'Product grid is not rendered correctly.'
27  );
28  }
29 
35  public function toString()
36  {
37  return 'Product grid is rendered correctly.';
38  }
39 }
processAssert(\Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex $catalogProductIndex)