/**
  * Assert that gift registry type form data is equal to fixture data.
  *
  * @param GiftRegistryType $giftRegistryType
  * @param BackendGiftRegistryIndex $giftRegistryIndex
  * @param GiftRegistryNew $giftRegistryNew
  * @return void
  */
 public function processAssert(GiftRegistryType $giftRegistryType, BackendGiftRegistryIndex $giftRegistryIndex, GiftRegistryNew $giftRegistryNew)
 {
     $giftRegistryIndex->getGiftRegistryGrid()->searchAndOpen(['label' => $giftRegistryType->getLabel()]);
     $formData = $giftRegistryNew->getGiftRegistryForm()->getData($giftRegistryType);
     $fixtureData = $giftRegistryType->getData();
     $errors = $this->verifyData($fixtureData, $formData);
     \PHPUnit_Framework_Assert::assertEmpty($errors, $errors);
 }
 /**
  * Run create gift registry type entity test.
  *
  * @param GiftRegistryType $giftRegistryType
  * @return void
  */
 public function test(GiftRegistryType $giftRegistryType)
 {
     // Steps
     $this->giftRegistryIndex->open();
     $this->giftRegistryIndex->getPageActions()->addNew();
     $this->giftRegistryNew->getGiftRegistryForm()->fill($giftRegistryType);
     $this->giftRegistryNew->getPageActions()->save();
 }
 /**
  * Assert that created gift registry type can be found at gift registry grid in backend.
  *
  * @param BackendGiftRegistryIndex $giftRegistryIndex
  * @param GiftRegistryType $giftRegistryType
  * @return void
  */
 public function processAssert(BackendGiftRegistryIndex $giftRegistryIndex, GiftRegistryType $giftRegistryType)
 {
     $giftRegistryIndex->open();
     $filter = ['label' => $giftRegistryType->getLabel()];
     \PHPUnit_Framework_Assert::assertTrue($giftRegistryIndex->getGiftRegistryGrid()->isRowVisible($filter), "Gift registry type '{$giftRegistryType->getLabel()}' is not present in grid.");
 }
 /**
  * Assert that after save a gift registry type success message appears.
  *
  * @param BackendGiftRegistryIndex $giftRegistryIndex
  * @return void
  */
 public function processAssert(BackendGiftRegistryIndex $giftRegistryIndex)
 {
     \PHPUnit_Framework_Assert::assertEquals(self::SUCCESS_MESSAGE, $giftRegistryIndex->getMessagesBlock()->getSuccessMessages());
 }