/**
  * Assert that gift registry data on edit page equals passed from fixture.
  *
  * @param GiftRegistryIndex $giftRegistryIndex
  * @param GiftRegistryEdit $giftRegistryEdit
  * @param GiftRegistry $giftRegistry
  * @return void
  */
 public function processAssert(GiftRegistryIndex $giftRegistryIndex, GiftRegistryEdit $giftRegistryEdit, GiftRegistry $giftRegistry)
 {
     $giftRegistryIndex->open();
     $fixtureData = $giftRegistry->getData();
     $giftRegistryIndex->getGiftRegistryList()->eventAction($fixtureData['title'], 'Edit');
     $formData = $giftRegistryEdit->getGiftRegistryEditForm()->getData();
     $errors = $this->verifyData($fixtureData, $formData);
     \PHPUnit_Framework_Assert::assertEmpty($errors, $errors);
 }
Example #2
0
 /**
  * Check that gift registry available in shopping cart.
  *
  * @param GiftRegistry $giftRegistry
  * @return bool
  */
 public function isGiftRegistryAvailable(GiftRegistry $giftRegistry)
 {
     $optionSelector = sprintf($this->giftRegistryOption, $giftRegistry->getTitle());
     return $this->_rootElement->find($optionSelector, Locator::SELECTOR_XPATH)->isVisible();
 }
 /**
  * Check gift registry visibility in list.
  *
  * @param GiftRegistry $giftRegistry
  * @return bool
  */
 public function isGiftRegistryInGrid(GiftRegistry $giftRegistry)
 {
     return $this->_rootElement->find(sprintf($this->eventSelector, $giftRegistry->getTitle()))->isVisible();
 }
 /**
  * Create gift registry entity test.
  *
  * @param GiftRegistry $giftRegistry
  * @param Customer $customer
  * @return void
  */
 public function test(GiftRegistry $giftRegistry, Customer $customer)
 {
     // Steps
     $this->objectManager->create('Mage\\Customer\\Test\\TestStep\\LoginCustomerOnFrontendStep', ['customer' => $customer])->run();
     $this->customerAccountIndex->getAccountNavigationBlock()->openNavigationItem("Gift Registry");
     $this->giftRegistryIndex->getGiftRegistryList()->addNew();
     $this->giftRegistryAddSelect->getGiftRegistryEditForm()->selectGiftRegistryType($giftRegistry->getTypeId());
     $this->giftRegistryEdit->getGiftRegistryEditForm()->fill($giftRegistry);
     $this->giftRegistryEdit->getGiftRegistryEditForm()->save();
 }