/**
  * Action for Newsletter Template
  *
  * @param Template $newsletter
  * @param string $action
  * @return void
  */
 public function test(Template $newsletter, $action)
 {
     // Preconditions
     $newsletter->persist();
     // Steps
     $this->templateIndex->open();
     $this->templateIndex->getNewsletterTemplateGrid()->search(['code' => $newsletter->getCode()]);
     $this->templateIndex->getNewsletterTemplateGrid()->performAction($action);
 }
 /**
  * Run Update Newsletter test
  *
  * @param Template $templateInitial
  * @param Template $template
  * @return void
  */
 public function test(Template $templateInitial, Template $template)
 {
     // Preconditions:
     $templateInitial->persist();
     // Steps:
     $this->templateIndex->open();
     $this->templateIndex->getNewsletterTemplateGrid()->searchAndOpen(['code' => $templateInitial->getCode()]);
     $this->templateEdit->getEditForm()->fill($template);
     $this->templateEdit->getFormPageActions()->save();
 }
 /**
  * Action for Newsletter Template
  *
  * @param Template $newsletter
  * @return void
  */
 public function test(Template $newsletter)
 {
     // Preconditions
     $newsletter->persist();
     // Steps
     // 1. Open Backend
     // 2. Go to "Marketing" -> "Newsletter Template"
     $this->templateIndex->open();
     // 3. Find created template in grid and open it
     $this->templateIndex->getNewsletterTemplateGrid()->searchAndOpen(['code' => $newsletter->getCode()]);
     // 4. Click "Preview Template" button at the top of the page
     $this->templateNewIndex->getFormPageActions()->clickPreview();
 }