10 use Magento\Cms\Test\Page\Adminhtml\CmsBlockIndex;
11 use Magento\Mtf\Constraint\AbstractConstraint;
30 $cmsBlockIndex->open();
31 $data = $cmsBlock->getData();
32 $data[
'is_active'] =
$data[
'is_active'] ==
'Yes' ?
'Enabled' :
'Disabled';
33 if (isset(
$data[
'stores'])) {
39 'title' =>
$data[
'title'],
40 'identifier' =>
$data[
'identifier'],
41 'is_active' =>
$data[
'is_active'],
42 'store_id' => end($parts),
46 if (isset(
$data[
'creation_time'])) {
47 $filter[
'creation_time_from'] = date(
"M j, Y", strtotime($cmsBlock->getCreationTime()));
49 if (isset(
$data[
'update_time'])) {
50 $filter[
'update_time_from'] = date(
"M j, Y", strtotime($cmsBlock->getUpdateTime()));
53 \PHPUnit\Framework\Assert::assertFalse(
54 $cmsBlockIndex->getCmsBlockGrid()->isRowVisible($filter,
true,
false),
56 .
'title \'' . $filter[
'title'] .
'\',
' 57 . 'identifier \
'' . $filter[
'identifier'] .
'\',
' 58 . 'store view \
'' . $filter[
'store_id'] .
'\',
' 59 . 'status \
'' . $filter[
'is_active'] .
'\',
' 60 . (isset($filter['creation_time_from
']) 61 ? ('creation_time \
'' . $filter[
'creation_time_from'] .
'\',
') 63 . (isset($filter['update_time_from
']) ? ('update_time \
'' . $filter[
'update_time_from'] .
'\'') :
'')
64 .
'exists in CMS Block grid.' 75 return 'CMS Block is not present in grid.';
processAssert(CmsBlock $cmsBlock, CmsBlockIndex $cmsBlockIndex)