Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
DeleteCmsPageEntityTest.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Cms\Test\Page\Adminhtml\CmsPageIndex;
11 use Magento\Cms\Test\Page\Adminhtml\CmsPageNew;
12 use Magento\Mtf\TestCase\Injectable;
13 
28 class DeleteCmsPageEntityTest extends Injectable
29 {
30  /* tags */
31  const MVP = 'yes';
32  const SEVERITY = 'S1';
33  /* end tags */
34 
40  protected $cmsPageIndex;
41 
47  protected $cmsPageNew;
48 
56  public function __inject(CmsPageIndex $cmsPageIndex, CmsPageNew $cmsPageNew)
57  {
58  $this->cmsPageIndex = $cmsPageIndex;
59  $this->cmsPageNew = $cmsPageNew;
60  }
61 
68  public function test(CmsPage $cmsPage)
69  {
70  // Preconditions
71  $cmsPage->persist();
72 
73  // Steps
74  $this->cmsPageIndex->open();
75  $this->cmsPageIndex->getCmsPageGridBlock()->searchAndOpen(['title' => $cmsPage->getTitle()]);
76  $this->cmsPageNew->getPageMainActions()->delete();
77  $this->cmsPageNew->getModalBlock()->acceptAlert();
78  }
79 }
__inject(CmsPageIndex $cmsPageIndex, CmsPageNew $cmsPageNew)