/**
  * Assert the product is not displayed on Compare Products block on my account page
  *
  * @param CmsIndex $cmsIndex
  * @param CustomerAccountIndex $customerAccountIndex
  * @param int $countProducts [optional]
  * @param FixtureInterface $product [optional]
  * @return void
  */
 public function processAssert(CmsIndex $cmsIndex, CustomerAccountIndex $customerAccountIndex, $countProducts = 0, FixtureInterface $product = null)
 {
     $cmsIndex->open();
     $cmsIndex->getLinksBlock()->openLink("My Account");
     $compareBlock = $customerAccountIndex->getCompareProductsBlock();
     if ($countProducts > 1 && $product !== null) {
         \PHPUnit_Framework_Assert::assertFalse($compareBlock->isProductVisibleInCompareBlock($product->getName()), 'The product displays on Compare Products block on my account page.');
     } else {
         \PHPUnit_Framework_Assert::assertEquals(self::SUCCESS_MESSAGE, $compareBlock->getEmptyMessage(), 'The product displays on Compare Products block on my account page.');
     }
 }
 /**
  * Test creation for clear all compare products.
  *
  * @param string $products
  * @param ConfigData $config
  * @param CustomerAccountIndex $customerAccountIndex
  * @return void
  */
 public function test($products, ConfigData $config, CustomerAccountIndex $customerAccountIndex)
 {
     // Preconditions
     $config->persist();
     $products = $this->createProducts($products);
     //Steps
     $this->cmsIndex->open();
     $this->loginCustomer();
     $this->addProducts($products);
     $this->cmsIndex->getLinksBlock()->openLink("My Account");
     $customerAccountIndex->getCompareProductsBlock()->clickClearAll();
 }