Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertCmsPageInGrid.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Cms\Test\Page\Adminhtml\CmsPageIndex;
11 use Magento\Mtf\Constraint\AbstractConstraint;
12 
16 class AssertCmsPageInGrid extends AbstractConstraint
17 {
26  public function processAssert(CmsPageIndex $cmsIndex, CmsPage $cms, $expectedStatus = '')
27  {
28  $filter = [
29  'title' => $cms->getTitle(),
30  'is_active' => $expectedStatus
31  ];
32  $cmsIndex->open();
33  \PHPUnit\Framework\Assert::assertTrue(
34  $cmsIndex->getCmsPageGridBlock()->isRowVisible($filter, true, false),
35  'Cms page \'' . $cms->getTitle() . '\' is not present in pages grid.'
36  );
37  }
38 
44  public function toString()
45  {
46  return 'Cms page is present in pages grid.';
47  }
48 }
processAssert(CmsPageIndex $cmsIndex, CmsPage $cms, $expectedStatus='')