/**
  * Assert that created Synonym Group can be found in grid via: synonyms.
  *
  * @param SynonymGroup $synonymGroup
  * @param SynonymGroupIndex $synonymGroupIndex
  * @return void
  *
  */
 public function processAssert(SynonymGroup $synonymGroup, SynonymGroupIndex $synonymGroupIndex)
 {
     $synonymGroupIndex->open();
     $data = $synonymGroup->getData();
     $filter = ['synonyms' => $data['synonyms']];
     $synonymGroupIndex->getSynonymGroupGrid()->search($filter);
     \PHPUnit_Framework_Assert::assertTrue($synonymGroupIndex->getSynonymGroupGrid()->isRowVisible($filter, false, false), 'Synonym Group with ' . 'synonyms \'' . $filter['synonyms'] . '\', ' . 'is absent in Synonym grid.');
 }
 /**
  * Update Synonym Group.
  *
  * @param SynonymGroup $initialSynonymGroup
  * @return void
  */
 public function test(SynonymGroup $initialSynonymGroup)
 {
     //precondition
     $initialSynonymGroup->persist();
     $initialData = $initialSynonymGroup->getData();
     $synonyms = $initialData['synonyms'];
     // Steps
     $this->synonymGroupIndex->open();
     $this->synonymGroupIndex->getSynonymGroupGrid()->searchAndOpen(['synonyms' => $synonyms]);
     $this->synonymGroupNew->getFormPageActions()->delete();
     $this->synonymGroupNew->getModalBlock()->acceptAlert();
 }
 /**
  * Update Synonym Group.
  *
  * @param SynonymGroup $initialSynonymGroup
  * @param SynonymGroup $synonymGroup
  * @return void
  */
 public function test(SynonymGroup $initialSynonymGroup, SynonymGroup $synonymGroup)
 {
     //precondition
     $initialSynonymGroup->persist();
     $initialData = $initialSynonymGroup->getData();
     $synonyms = $initialData['synonyms'];
     // Steps
     $this->synonymGroupIndex->open();
     $this->synonymGroupIndex->getSynonymGroupGrid()->searchAndOpen(['synonyms' => $synonyms]);
     $this->synonymGroupNew->getSynonymGroupForm()->fill($synonymGroup);
     $this->synonymGroupNew->getFormPageActions()->save();
 }
 /**
  * Merge Synonym Group.
  *
  * @param SynonymGroup $initialSynonymGroup
  * @param SynonymGroup $synonymGroup
  * @return void
  */
 public function test(SynonymGroup $initialSynonymGroup, SynonymGroup $synonymGroup)
 {
     //precondition
     $initialSynonymGroup->persist();
     $initialData = $initialSynonymGroup->getData();
     $synonyms = $initialData['synonyms'];
     $synonyms = explode(',', $synonyms);
     $data = $synonymGroup->getData();
     $data['synonyms'] = $synonyms[0] . ',' . $data['synonyms'];
     $data['scope_id'] = ['dataset' => 'default_store_view'];
     $synonymGroup = $this->factory->createByCode('synonymGroup', ['data' => $data]);
     // Steps
     $this->synonymGroupIndex->open();
     $this->synonymGroupIndex->getGridPageActions()->addNew();
     $this->synonymGroupNew->getSynonymGroupForm()->fill($synonymGroup);
     $this->synonymGroupNew->getFormPageActions()->save();
 }