Example #1
0
 /**
  * Assert that displayed CMS page data on edit page equals passed from fixture.
  *
  * @param CmsPage $cms
  * @param CmsPageIndex $cmsPageIndex
  * @param CmsPageNew $cmsPageNew
  * @return void
  */
 public function processAssert(CmsPage $cms, CmsPageIndex $cmsPageIndex, CmsPageNew $cmsPageNew)
 {
     $cmsPageIndex->open();
     $cmsPageIndex->getCmsPageGridBlock()->searchAndOpen(['title' => $cms->getTitle()]);
     $cmsFormData = $cmsPageNew->getPageForm()->getData($cms);
     $errors = $this->verifyData($cms->getData(), $cmsFormData);
     \PHPUnit_Framework_Assert::assertEmpty($errors, $errors);
 }
 /**
  * Creating Cms page.
  *
  * @param CmsPage $cms
  * return void
  */
 public function test(CmsPage $cms)
 {
     $this->cms = $cms;
     // Steps
     $this->cmsPageIndex->open();
     $this->cmsPageIndex->getPageActionsBlock()->addNew();
     $this->cmsPageNew->getPageForm()->fill($cms);
     $this->cmsPageNew->getPageMainActions()->save();
 }