/**
  * Create newsletter template
  *
  * @param Template $template
  */
 public function testCreateNewsletterTemplate(Template $template)
 {
     // Steps
     $this->templateIndex->open();
     $this->templateIndex->getGridPageActions()->addNew();
     $this->templateNewIndex->getEditForm()->fill($template);
     $this->templateNewIndex->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();
 }