/**
  * Assert that displayed Website data on edit page equals passed from fixture
  *
  * @param StoreIndex $storeIndex
  * @param EditWebsite $editWebsite
  * @param Website $website
  * @return void
  */
 public function processAssert(StoreIndex $storeIndex, EditWebsite $editWebsite, Website $website)
 {
     $fixtureData = $website->getData();
     $storeIndex->open()->getStoreGrid()->searchAndOpenWebsite($website);
     $formData = $editWebsite->getEditFormWebsite()->getData();
     $errors = $this->verifyData($fixtureData, $formData);
     \PHPUnit_Framework_Assert::assertEmpty($errors, $errors);
 }
 /**
  * Update Website
  *
  * @param Website $websiteOrigin
  * @param Website $website
  * @return array
  */
 public function test(Website $websiteOrigin, Website $website)
 {
     //Preconditions
     $websiteOrigin->persist();
     //Steps
     $this->storeIndex->open();
     $this->storeIndex->getStoreGrid()->searchAndOpenWebsite($websiteOrigin);
     $this->editWebsite->getEditFormWebsite()->fill($website);
     $this->editWebsite->getFormPageActions()->save();
     return ['website' => $this->mergeFixture($website, $websiteOrigin)];
 }
 /**
  * Delete Website
  *
  * @param Website $website
  * @param string $createBackup
  * @return void
  */
 public function test(Website $website, $createBackup)
 {
     //Preconditions
     $website->persist();
     $this->backupIndex->open()->getBackupGrid()->massaction([], 'Delete', true, 'Select All');
     //Steps
     $this->storeIndex->open();
     $this->storeIndex->getStoreGrid()->searchAndOpenWebsite($website);
     $this->editWebsite->getFormPageActions()->delete();
     $this->deleteWebsite->getDeleteWebsiteForm()->fillForm(['create_backup' => $createBackup]);
     $this->deleteWebsite->getFormPageActions()->delete();
 }