Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertStoreGroupInGrid.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Backend\Test\Page\Adminhtml\StoreIndex;
11 use Magento\Mtf\Constraint\AbstractConstraint;
12 
17 class AssertStoreGroupInGrid extends AbstractConstraint
18 {
19  /* tags */
20  const SEVERITY = 'low';
21  /* end tags */
22 
30  public function processAssert(StoreIndex $storeIndex, StoreGroup $storeGroup)
31  {
32  $storeGroupName = $storeGroup->getName();
33  $storeIndex->open()->getStoreGrid()->search(['group_title' => $storeGroupName]);
34  \PHPUnit\Framework\Assert::assertTrue(
35  $storeIndex->getStoreGrid()->isStoreExists($storeGroupName),
36  'Store group \'' . $storeGroupName . '\' is not present in grid.'
37  );
38  }
39 
45  public function toString()
46  {
47  return 'Store Group is present in grid.';
48  }
49 }
processAssert(StoreIndex $storeIndex, StoreGroup $storeGroup)