/**
  * Assert product details.
  *
  * @param WishlistIndex $wishlistIndex
  * @param InjectableFixture $product
  * @param FixtureFactory $fixtureFactory
  * @return void
  */
 protected function assertProductDetails(WishlistIndex $wishlistIndex, InjectableFixture $product, FixtureFactory $fixtureFactory)
 {
     $actualOptions = $wishlistIndex->getItemsBlock()->getItemProduct($product)->getOptions();
     $cartFixture = $fixtureFactory->createByCode('cart', ['data' => ['items' => ['products' => [$product]]]]);
     $expectedOptions = $cartFixture->getItems()[0]->getData()['options'];
     $errors = $this->verifyData($this->sortDataByPath($expectedOptions, '::title'), $this->sortDataByPath($actualOptions, '::title'));
     \PHPUnit_Framework_Assert::assertEmpty($errors, $errors);
 }
 /**
  * Assert that product is present in default wishlist
  *
  * @param CmsIndex $cmsIndex
  * @param CustomerAccountIndex $customerAccountIndex
  * @param WishlistIndex $wishlistIndex
  * @param InjectableFixture $product
  * @return void
  */
 public function processAssert(CmsIndex $cmsIndex, CustomerAccountIndex $customerAccountIndex, WishlistIndex $wishlistIndex, InjectableFixture $product)
 {
     $cmsIndex->getLinksBlock()->openLink('My Account');
     $customerAccountIndex->getAccountMenuBlock()->openMenuItem('My Wish List');
     \PHPUnit_Framework_Assert::assertTrue($wishlistIndex->getItemsBlock()->getItemProduct($product)->isVisible(), $product->getName() . ' is not visible on wishlist page.');
 }