/** * Creating Cms page. * * @param CmsPageFixture $cms * @return void */ public function test(CmsPageFixture $cms) { // Steps $this->cmsIndex->open(); $this->cmsIndex->getPageActionsBlock()->addNew(); $this->cmsPageNew->getPageForm()->fill($cms); $this->cmsPageNew->getPageMainActions()->save(); }
/** * Update CMS Page. * * @param CmsPage $cms * @param CmsPage $cmsOriginal * @return array */ public function test(CmsPage $cms, CmsPage $cmsOriginal) { // Steps $this->cmsPageIndex->open(); $this->cmsPageIndex->getCmsPageGridBlock()->searchAndOpen(['title' => $cmsOriginal->getTitle()]); $this->cmsPageNew->getPageForm()->fill($cms); $this->cmsPageNew->getPageMainActions()->save(); return ['cms' => $this->factory->createByCode('cmsPage', ['data' => array_merge($cmsOriginal->getData(), $cms->getData())])]; }
/** * Delete CMS Page. * * @param CmsPage $cmsPage * @return void */ public function test(CmsPage $cmsPage) { // Preconditions $cmsPage->persist(); // Steps $this->cmsPageIndex->open(); $this->cmsPageIndex->getCmsPageGridBlock()->searchAndOpen(['title' => $cmsPage->getTitle()]); $this->cmsPageNew->getPageMainActions()->delete(); }
/** * Creating Cms page. * * @param array $data * @param string $fixtureType * @return array */ public function test(array $data, $fixtureType) { // Steps $cms = $this->fixtureFactory->createByCode($fixtureType, ['data' => $data]); $this->cmsIndex->open(); $this->cmsIndex->getPageActionsBlock()->addNew(); $this->cmsPageNew->getPageForm()->fill($cms); $this->cmsPageNew->getPageMainActions()->save(); return ['cms' => $cms]; }
/** * Creating Cms page. * * @param CmsPageFixture $cms * @return void */ public function test(CmsPageFixture $cms) { // Steps $this->cmsIndex->open(); $this->cmsIndex->getPageActionsBlock()->addNew(); //TODO: remove cms page new refresh after resolve issue with static js files publication (MAGETWO-37898) $this->cmsPageNew->open(); $this->cmsPageNew->getPageForm()->fill($cms); $this->cmsPageNew->getPageMainActions()->save(); }
/** * Creating Cms page. * * @param array $data * @param string $fixtureType * @return array */ public function test(array $data, $fixtureType) { // Steps $cms = $this->fixtureFactory->createByCode($fixtureType, ['data' => $data]); $this->cmsIndex->open(); $this->cmsIndex->getPageActionsBlock()->addNew(); //TODO: remove cms page new refresh after resolve issue with static js files publication (MAGETWO-37898) $this->cmsPageNew->open(); $this->cmsPageNew->getPageForm()->fill($cms); $this->cmsPageNew->getPageMainActions()->save(); return ['cms' => $cms]; }