/**
  * Assert that created CMS block can be found in grid via: title, identifier, status.
  *
  * @param CmsBlock $cmsBlock
  * @param CmsBlockIndex $cmsBlockIndex
  * @return void
  */
 public function processAssert(CmsBlock $cmsBlock, CmsBlockIndex $cmsBlockIndex)
 {
     $cmsBlockIndex->open();
     $data = $cmsBlock->getData();
     $filter = ['title' => $data['title'], 'identifier' => $data['identifier'], 'is_active' => $data['is_active']];
     $cmsBlockIndex->getCmsBlockGrid()->search($filter);
     \PHPUnit_Framework_Assert::assertTrue($cmsBlockIndex->getCmsBlockGrid()->isRowVisible($filter, false, false));
 }
 /**
  * Create CMS Block.
  *
  * @param CmsBlock $cmsBlock
  * @return void
  */
 public function test(CmsBlock $cmsBlock)
 {
     // Steps
     $this->cmsBlockIndex->open();
     $this->cmsBlockIndex->getGridPageActions()->addNew();
     $this->cmsBlockNew->getBlockForm()->fill($cmsBlock);
     $this->cmsBlockNew->getFormPageActions()->save();
 }
 /**
  * Assert that after save block successful message appears.
  *
  * @param CmsBlockIndex $cmsBlockIndex
  * @return void
  */
 public function processAssert(CmsBlockIndex $cmsBlockIndex)
 {
     \PHPUnit_Framework_Assert::assertEquals(self::SUCCESS_SAVE_MESSAGE, $cmsBlockIndex->getMessagesBlock()->getSuccessMessages());
 }