assertFalse() 공개 정적인 메소드

Asserts that a condition is false.
public static assertFalse ( boolean $condition, string $message = '' )
$condition boolean
$message string
 public function testIsValidAssetName()
 {
     PHPUnit::assertTrue(Validator::isValidAssetName('MYTOKEN'));
     PHPUnit::assertTrue(Validator::isValidAssetName('A95428956661682202'));
     PHPUnit::assertFalse(Validator::isValidAssetName('ABADTOKEN'));
     PHPUnit::assertTrue(Validator::isValidAssetNames(['MYTOKEN', 'MYTOKENTWO']));
 }
예제 #2
0
 public function assertSessionDoesntHave($key)
 {
     if (is_array($key)) {
         return $this->assertSessionDoesntHaveAll($key);
     }
     PHPUnit::assertFalse($this->app['session.store']->has($key), "Session contains key: {$key}");
 }
예제 #3
0
 /**
  * Assert that product is not displayed in up-sell section
  *
  * @param BrowserInterface $browser
  * @param CatalogProductSimple $product
  * @param InjectableFixture[] $relatedProducts
  * @param CatalogProductView $catalogProductView
  * @return void
  */
 public function processAssert(BrowserInterface $browser, CatalogProductSimple $product, array $relatedProducts, CatalogProductView $catalogProductView)
 {
     $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
     foreach ($relatedProducts as $relatedProduct) {
         \PHPUnit_Framework_Assert::assertFalse($catalogProductView->getUpsellBlock()->isUpsellProductVisible($relatedProduct->getName()), 'Product \'' . $relatedProduct->getName() . '\' is exist in up-sells products.');
     }
 }
 /**
  * Assert Link block for downloadable product on front-end
  *
  * @param CatalogProductView $downloadableProductView
  * @param CatalogProductDownloadable $product
  * @param Browser $browser
  * @return void
  */
 public function processAssert(CatalogProductView $downloadableProductView, CatalogProductDownloadable $product, Browser $browser)
 {
     $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
     $linksBlock = $downloadableProductView->getDownloadableViewBlock()->getDownloadableLinksBlock();
     $fields = $product->getData();
     // Title for for Link block
     \PHPUnit_Framework_Assert::assertEquals($linksBlock->getTitleForLinkBlock(), $fields['downloadable_links']['title'], 'Title for for Link block for downloadable product on front-end is not correct.');
     $this->sortDownloadableArray($fields['downloadable_links']['downloadable']['link']);
     foreach ($fields['downloadable_links']['downloadable']['link'] as $index => $link) {
         $index++;
         // Titles for each links
         // Links are displaying according to Sort Order
         \PHPUnit_Framework_Assert::assertEquals($linksBlock->getItemTitle($index), $link['title'], 'Link item ' . $index . ' with title "' . $link['title'] . '" is not visible.');
         // If Links can be Purchase Separately, check-nob is presented near each link
         // If Links CANNOT be Purchase Separately, check-nob is not presented near each link
         if ($fields['downloadable_links']['links_purchased_separately'] == "Yes") {
             \PHPUnit_Framework_Assert::assertTrue($linksBlock->isVisibleItemCheckbox($index), 'Item ' . $index . ' link block CANNOT be Purchase Separately.');
             // Price is equals passed according to fixture
             $link['price'] = sprintf('$%1.2f', $link['price']);
             \PHPUnit_Framework_Assert::assertEquals($linksBlock->getItemPrice($index), $link['price'], 'Link item ' . $index . ' price is not visible.');
         } elseif ($fields['downloadable_links']['links_purchased_separately'] == "No") {
             \PHPUnit_Framework_Assert::assertFalse($linksBlock->isVisibleItemCheckbox($index), 'Item ' . $index . ' link block can be Purchase Separately.');
         }
     }
 }
 /**
  * Assert that deleted attribute can't be used for Products' Export
  *
  * @param AdminExportIndex $exportIndex
  * @param CatalogProductAttribute $attribute
  * @param ImportExport $export
  * @return void
  */
 public function processAssert(AdminExportIndex $exportIndex, CatalogProductAttribute $attribute, ImportExport $export)
 {
     $exportIndex->open();
     $exportIndex->getExportForm()->fill($export);
     $filter = ['attribute_code' => $attribute->getAttributeCode()];
     \PHPUnit_Framework_Assert::assertFalse($exportIndex->getFilterExport()->isRowVisible($filter), 'Attribute \'' . $attribute->getFrontendLabel() . '\' is present in Filter export grid');
 }
 /**
  * Assert that products' MAP has been applied before checkout.
  *
  * @param CatalogCategory $category
  * @param Customer $customer
  * @param Address $address
  * @param CatalogCategoryView $catalogCategoryView
  * @param CmsIndex $cmsIndex
  * @param CatalogProductView $catalogProductView
  * @param CheckoutCart $cart
  * @param CheckoutOnepage $checkoutOnePage
  * @param array $products
  * @return void
  */
 public function processAssert(CatalogCategory $category, Customer $customer, Address $address, CatalogCategoryView $catalogCategoryView, CmsIndex $cmsIndex, CatalogProductView $catalogProductView, CheckoutCart $cart, CheckoutOnepage $checkoutOnePage, array $products)
 {
     for ($i = 0; $i < count($products); $i++) {
         $cart->getCartBlock()->clearShoppingCart();
         $productName = $products[$i]->getName();
         $cmsIndex->open();
         $cmsIndex->getTopmenu()->selectCategory($category->getName());
         // Check that price is not present on category page.
         $listProductBlock = $catalogCategoryView->getListProductBlock();
         $productPriceBlock = $listProductBlock->getProductPriceBlock($productName);
         $productPriceBlock->clickForPrice();
         \PHPUnit_Framework_Assert::assertFalse($productPriceBlock->getMapBlock()->isPriceVisible(), 'Price is present in MSRP dialog on category page.');
         // Check that price is not present on product page.
         $listProductBlock->openProductViewPage($productName);
         \PHPUnit_Framework_Assert::assertFalse($catalogProductView->getViewBlock()->getPriceBlock()->isRegularPriceVisible(), 'Price is present in View block on product page.');
         // Check that price is not present on cart.
         $catalogProductView->getViewBlock()->addToCart($products[$i]);
         \PHPUnit_Framework_Assert::assertTrue($cart->getCartBlock()->getCartItem($products[$i])->isMsrpVisible(), "MSRP link is not visible in cart.");
         // Check that price is present on review block in onepage checkout page.
         $cart->getCartBlock()->getProceedToCheckoutBlock()->proceedToCheckout();
         $checkoutMethodBlock = $checkoutOnePage->getLoginBlock();
         $billingBlock = $checkoutOnePage->getBillingBlock();
         $paymentMethodBlock = $checkoutOnePage->getPaymentMethodsBlock();
         $shippingBlock = $checkoutOnePage->getShippingMethodBlock();
         $checkoutMethodBlock->guestCheckout();
         $checkoutMethodBlock->clickContinue();
         $billingBlock->fillBilling($address, $customer);
         $billingBlock->clickContinue();
         $shippingBlock->selectShippingMethod(['shipping_service' => 'Flat Rate', 'shipping_method' => 'Fixed']);
         $shippingBlock->clickContinue();
         $paymentMethodBlock->selectPaymentMethod(['method' => 'checkmo']);
         $paymentMethodBlock->clickContinue();
         \PHPUnit_Framework_Assert::assertEquals(number_format($products[$i]->getPrice(), 2), $checkoutOnePage->getReviewBlock()->getTotalBlock()->getData('subtotal'), "Subtotal in checkout one page for {$productName} is not equal to expected.");
     }
 }
 /**
  * Assert that Wishlist can't be find by another Customer (or guest) via "Wishlist Search".
  *
  * @param CustomerAccountLogout $customerAccountLogout
  * @param CmsIndex $cmsIndex
  * @param CatalogCategoryView $catalogCategoryView
  * @param SearchResult $searchResult
  * @param CatalogCategory $category
  * @param Customer $customer
  * @param Wishlist $wishlist
  * @return void
  */
 public function processAssert(CustomerAccountLogout $customerAccountLogout, CmsIndex $cmsIndex, CatalogCategoryView $catalogCategoryView, SearchResult $searchResult, CatalogCategory $category, Customer $customer, Wishlist $wishlist)
 {
     $customerAccountLogout->open();
     $cmsIndex->open()->getTopmenu()->selectCategory($category->getName());
     $catalogCategoryView->getWishlistSearchBlock()->searchByCustomer($customer);
     \PHPUnit_Framework_Assert::assertFalse($searchResult->getWishlistSearchResultBlock()->isWishlistVisibleInGrid($wishlist), "Multiple wishlist is visible on wishlist search result page.");
 }
 /**
  * Assert that video is displayed on category page on Store front.
  *
  * @param CmsIndex $cmsIndex
  * @param CatalogCategoryView $catalogCategoryView
  * @param InjectableFixture $initialProduct
  * @return void
  */
 public function processAssert(CmsIndex $cmsIndex, CatalogCategoryView $catalogCategoryView, InjectableFixture $initialProduct)
 {
     $cmsIndex->open();
     $cmsIndex->getTopmenu()->selectCategoryByName($initialProduct->getCategoryIds()[0]);
     $src = $catalogCategoryView->getListProductBlock()->getProductItem($initialProduct)->getBaseImageSource();
     \PHPUnit_Framework_Assert::assertFalse(strpos($src, '/placeholder/') !== false, 'Video preview image is not displayed on category view when it should.');
 }
 /**
  * Assert that deleted attribute can't be added to product template on Product Page via Add Attribute control
  *
  * @param CatalogProductAttribute $productAttribute
  * @param CatalogProductIndex $productGrid
  * @param CatalogProductNew $newProductPage
  * @param CatalogProductEdit $productEdit
  * @return void
  */
 public function processAssert(CatalogProductAttribute $productAttribute, CatalogProductIndex $productGrid, CatalogProductEdit $productEdit, CatalogProductNew $newProductPage)
 {
     $productGrid->open();
     $productGrid->getGridPageActionBlock()->addProduct('simple');
     $productEdit->getForm()->openVariationsTab();
     \PHPUnit_Framework_Assert::assertFalse($newProductPage->getForm()->checkAttributeInVariationsSearchAttributeForm($productAttribute), "Product attribute found in Attribute Search form.");
 }
 /**
  * Assert order is not visible in customer account on frontend
  *
  * @param OrderInjectable $order
  * @param Customer $customer
  * @param CustomerAccountIndex $customerAccountIndex
  * @param OrderHistory $orderHistory
  * @param string $status
  * @return void
  */
 public function processAssert(OrderInjectable $order, Customer $customer, CustomerAccountIndex $customerAccountIndex, OrderHistory $orderHistory, $status)
 {
     $filter = ['id' => $order->getId(), 'status' => $status];
     $this->objectManager->create('Magento\\Customer\\Test\\TestStep\\LoginCustomerOnFrontendStep', ['customer' => $customer])->run();
     $customerAccountIndex->getAccountMenuBlock()->openMenuItem('My Orders');
     \PHPUnit_Framework_Assert::assertFalse($orderHistory->getOrderHistoryBlock()->isVisible() && $orderHistory->getOrderHistoryBlock()->isOrderVisible($filter), 'Order with following data \'' . implode(', ', $filter) . '\' is present in Orders block on frontend.');
 }
 /**
  * Assert that product rating is not displayed on frontend on product review
  *
  * @param CatalogProductView $catalogProductView
  * @param CatalogProductSimple $product
  * @param Rating $productRating
  * @param BrowserInterface $browser
  * @return void
  */
 public function processAssert(CatalogProductView $catalogProductView, CatalogProductSimple $product, Rating $productRating, BrowserInterface $browser)
 {
     $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
     $catalogProductView->getReviewSummary()->getAddReviewLink()->click();
     $reviewForm = $catalogProductView->getReviewFormBlock();
     \PHPUnit_Framework_Assert::assertFalse($reviewForm->isVisibleRating($productRating), 'Product rating "' . $productRating->getRatingCode() . '" is displayed.');
 }
예제 #12
0
파일: TXOTest.php 프로젝트: CryptArc/xchain
 public function testAddTXOsFromReceive()
 {
     // receiving a transaction adds TXOs
     $txo_repository = $this->app->make('App\\Repositories\\TXORepository');
     // setup monitors
     $payment_address_helper = app('PaymentAddressHelper');
     $receiving_address_one = $payment_address_helper->createSamplePaymentAddressWithoutInitialBalances(null, ['address' => '1JztLWos5K7LsqW5E78EASgiVBaCe6f7cD']);
     // receive unconfirmed transactions
     $parsed_txs = $this->receiveUnconfirmedTransactions(1);
     $loaded_txos = $txo_repository->findAll();
     PHPUnit::assertCount(1, $loaded_txos);
     $loaded_txo = $loaded_txos[0];
     PHPUnit::assertEquals('0000000000000000000000000000000000000000000000000000000000000001', $loaded_txo['txid']);
     PHPUnit::assertEquals(0, $loaded_txo['n']);
     PHPUnit::assertEquals(TXO::UNCONFIRMED, $loaded_txo['type']);
     PHPUnit::assertEquals(400000, $loaded_txo['amount']);
     // confirm the transactions (1)
     $this->sendConfirmationEvents(1, $parsed_txs);
     $loaded_txo = $txo_repository->findAll()[0];
     PHPUnit::assertEquals(TXO::UNCONFIRMED, $loaded_txo['type']);
     PHPUnit::assertFalse($loaded_txo['green']);
     // confirm the transactions (2)
     $this->sendConfirmationEvents(2, $parsed_txs);
     $loaded_txo = $txo_repository->findAll()[0];
     PHPUnit::assertEquals(TXO::CONFIRMED, $loaded_txo['type']);
 }
 /**
  * Assert that products are absent in shopping cart.
  *
  * @param CheckoutCart $checkoutCart
  * @param array $products
  * @return void
  */
 public function processAssert(CheckoutCart $checkoutCart, array $products)
 {
     $checkoutCart->open();
     foreach ($products as $product) {
         \PHPUnit_Framework_Assert::assertFalse($checkoutCart->getCartBlock()->getCartItem($product)->isVisible(), 'Product ' . $product->getName() . ' is present in shopping cart.');
     }
 }
 /**
  * Assert that the category cannot be accessed from the navigation bar in the frontend
  *
  * @param CmsIndex $cmsIndex
  * @param Category $category
  * @param BrowserInterface $browser
  * @return void
  */
 public function processAssert(CmsIndex $cmsIndex, Category $category, BrowserInterface $browser)
 {
     $cmsIndex->open();
     \PHPUnit_Framework_Assert::assertFalse($cmsIndex->getTopmenu()->isCategoryVisible($category->getName()), 'Category can be accessed from the navigation bar in the frontend.');
     $browser->open($_ENV['app_frontend_url'] . $category->getUrlKey() . '.html');
     \PHPUnit_Framework_Assert::assertEquals(self::NOT_FOUND_MESSAGE, $cmsIndex->getTitleBlock()->getTitle(), 'Wrong page is displayed.');
 }
 /**
  * Assert that 'Button name' button is absent order page.
  *
  * @param SalesOrderView $salesOrderView
  * @param SalesOrderIndex $orderIndex
  * @param Order $order
  * @param string|null $orderId
  * @return void
  */
 public function processAssert(SalesOrderView $salesOrderView, SalesOrderIndex $orderIndex, Order $order = null, $orderId = null)
 {
     $orderIndex->open();
     $orderId = $orderId == null ? $order->getId() : $orderId;
     $orderIndex->getSalesOrderGrid()->searchAndOpen(['id' => $orderId]);
     \PHPUnit_Framework_Assert::assertFalse($salesOrderView->getPageActions()->isActionButtonVisible($this->buttonName), "'{$this->buttonName}' button is present on order view page.");
 }
예제 #16
0
 public function toBeFalse()
 {
     if ($this->negate) {
         a::assertNotFalse($this->actual);
     } else {
         a::assertFalse($this->actual);
     }
 }
 /**
  * Assert that order with fixture data in not more in the Orders grid
  *
  * @param OrderInjectable $order
  * @param OrderIndex $orderIndex
  * @return void
  */
 public function processAssert(OrderInjectable $order, OrderIndex $orderIndex)
 {
     $data = $order->getData();
     $filter = ['id' => $data['id']];
     $orderIndex->open();
     $errorMessage = implode(', ', $filter);
     \PHPUnit_Framework_Assert::assertFalse($orderIndex->getSalesOrderGrid()->isRowVisible($filter), 'Order with following data \'' . $errorMessage . '\' is present in Orders grid.');
 }
 /**
  * Asserts Product Review not available in grid
  *
  * @param ReviewIndex $reviewIndex
  * @param ReviewInjectable $review
  * @param string $gridStatus
  * @param ReviewInjectable $reviewInitial
  * @return void
  */
 public function processAssert(ReviewIndex $reviewIndex, ReviewInjectable $review, $gridStatus = '', ReviewInjectable $reviewInitial = null)
 {
     $product = $reviewInitial === null ? $review->getDataFieldConfig('entity_id')['source']->getEntity() : $reviewInitial->getDataFieldConfig('entity_id')['source']->getEntity();
     $filter = $this->prepareFilter($product, $review, $gridStatus);
     $reviewIndex->getReviewGrid()->search($filter);
     unset($filter['visible_in']);
     \PHPUnit_Framework_Assert::assertFalse($reviewIndex->getReviewGrid()->isRowVisible($filter, false), 'Review available in grid');
 }
 /**
  * Assert that customer group is not on cart price rule page.
  *
  * @param PromoQuoteNew $promoQuoteNew
  * @param CustomerGroup $customerGroup
  * @return void
  */
 public function processAssert(PromoQuoteNew $promoQuoteNew, CustomerGroup $customerGroup)
 {
     $promoQuoteNew->open();
     $promoQuoteNew->getSalesRuleForm()->openSection('rule_information');
     /** @var RuleInformation $ruleInformationTab */
     $ruleInformationTab = $promoQuoteNew->getSalesRuleForm()->getSection('rule_information');
     \PHPUnit_Framework_Assert::assertFalse($ruleInformationTab->isVisibleCustomerGroup($customerGroup), "Customer group {$customerGroup->getCustomerGroupCode()} is still in cart price rule page.");
 }
 /**
  * Assert that product rating is not displayed on frontend on product review
  *
  * @param CatalogProductView $catalogProductView
  * @param CatalogProductSimple $product
  * @param Rating $productRating
  * @return void
  */
 public function processAssert(CatalogProductView $catalogProductView, CatalogProductSimple $product, Rating $productRating)
 {
     $catalogProductView->init($product);
     $catalogProductView->open();
     $catalogProductView->getReviewSummaryBlock()->getAddReviewLink()->click();
     $reviewForm = $catalogProductView->getReviewFormBlock();
     \PHPUnit_Framework_Assert::assertFalse($reviewForm->isVisibleRating($productRating), 'Product rating "' . $productRating->getRatingCode() . '" is displayed.');
 }
 /**
  * Assert Flush Static Files Cache button visibility.
  *
  * @param AdminCache $adminCache
  * @return void
  */
 public function processAssert(AdminCache $adminCache)
 {
     if ($_ENV['mage_mode'] === 'production') {
         \PHPUnit_Framework_Assert::assertFalse($adminCache->getAdditionalBlock()->isFlushCacheButtonVisible(self::FLUSH_STATIC_FILES_CACHE), self::FLUSH_STATIC_FILES_CACHE . ' button should not be visible in production mode.');
     } else {
         \PHPUnit_Framework_Assert::assertTrue($adminCache->getAdditionalBlock()->isFlushCacheButtonVisible(self::FLUSH_STATIC_FILES_CACHE), self::FLUSH_STATIC_FILES_CACHE . ' button should be visible in developer or default mode.');
     }
 }
 public function testIsDivisible()
 {
     $cache = $this->app->make('Tokenly\\CounterpartyAssetInfoCache\\Cache');
     $cache->set('LTBCOIN', $this->sampleLTBCoinAssetInfo());
     PHPUnit::assertTrue($cache->isDivisible('LTBCOIN'));
     $cache->set('EARLY', $this->sampleEarlyAssetInfo());
     PHPUnit::assertFalse($cache->isDivisible('EARLY'));
 }
 /**
  * Assert that deleted attribute isn't displayed in Attribute set's Unassigned Attributes section
  *
  * @param CatalogAttributeSet $attributeSet
  * @param CatalogProductSetIndex $productSetIndex
  * @param CatalogProductSetEdit $productSetEdit
  * @return void
  */
 public function processAssert(CatalogAttributeSet $attributeSet, CatalogProductSetIndex $productSetIndex, CatalogProductSetEdit $productSetEdit)
 {
     $filter = ['set_name' => $attributeSet->getAttributeSetName()];
     $productSetIndex->open();
     $productSetIndex->getGrid()->searchAndOpen($filter);
     $attributeCode = $attributeSet->getDataFieldConfig('assigned_attributes')['source']->getAttributes()[0]->getAttributeCode();
     \PHPUnit_Framework_Assert::assertFalse($productSetEdit->getAttributeSetEditBlock()->checkUnassignedProductAttribute($attributeCode), "Attribute " . $attributeCode . " is present in Unassigned Attribute set's section.");
 }
 /**
  * Assert that product is not displayed in up-sell section
  *
  * @param CatalogProductSimple $product1
  * @param CatalogProductSimple $product2
  * @param CmsIndex $cmsIndex
  * @param CatalogCategoryView $catalogCategoryView
  * @param CatalogProductView $catalogProductView
  * @return void
  */
 public function processAssert(CatalogProductSimple $product1, CatalogProductSimple $product2, CmsIndex $cmsIndex, CatalogCategoryView $catalogCategoryView, CatalogProductView $catalogProductView)
 {
     $categoryName = $product1->getCategoryIds()[0];
     $cmsIndex->open();
     $cmsIndex->getTopmenu()->selectCategoryByName($categoryName);
     $catalogCategoryView->getListProductBlock()->openProductViewPage($product1->getName());
     \PHPUnit_Framework_Assert::assertFalse($catalogProductView->getUpsellBlock()->isUpsellProductVisible($product2->getName()), 'Product \'' . $product2->getName() . '\' is exist in up-sells products.');
 }
 /**
  * Assert that deleted attribute can't be added to attribute set on Product Page via Add Attribute control.
  *
  * @param CatalogProductAttribute $productAttribute
  * @param CatalogProductIndex $productGrid
  * @param CatalogProductNew $newProductPage
  * @return void
  */
 public function processAssert(CatalogProductAttribute $productAttribute, CatalogProductIndex $productGrid, CatalogProductNew $newProductPage)
 {
     $productGrid->open();
     $productGrid->getGridPageActionBlock()->addProduct('simple');
     $newProductPage->getFormPageActions()->addNewAttribute();
     $filter = ['label' => $productAttribute->getFrontendLabel()];
     \PHPUnit_Framework_Assert::assertFalse($newProductPage->getProductForm()->getAttributesSearchGrid()->isRowVisible($filter), 'Attribute \'' . $productAttribute->getFrontendLabel() . '\' is found in Attributes grid.');
 }
 /**
  * Assert that custom system variable not in cms page form.
  *
  * @param CmsPageNew $cmsPageNew
  * @param SystemVariable $systemVariable
  * @return void
  */
 public function processAssert(CmsPageNew $cmsPageNew, SystemVariable $systemVariable)
 {
     $customVariableName = $systemVariable->getName();
     $cmsPageNew->open();
     $cmsPageForm = $cmsPageNew->getPageForm();
     $variables = $cmsPageForm->getSystemVariables();
     \PHPUnit_Framework_Assert::assertFalse(in_array($customVariableName, $variables), 'Custom System Variable "' . $customVariableName . '" is present in Cms Page Form.');
 }
 /**
  * Assert that product rating is not displayed on frontend on product review
  *
  * @param CatalogProductView $catalogProductView
  * @param CatalogProductSimple $product
  * @param Rating $productRating
  * @param Browser $browser
  * @param ReviewInjectable $review
  * @return void
  */
 public function processAssert(CatalogProductView $catalogProductView, CatalogProductSimple $product, Rating $productRating, Browser $browser, ReviewInjectable $review = null)
 {
     $product = $review === null ? $product : $review->getDataFieldConfig('entity_id')['source']->getEntity();
     $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
     $catalogProductView->getReviewSummary()->getAddReviewLink()->click();
     $reviewForm = $catalogProductView->getReviewFormBlock();
     \PHPUnit_Framework_Assert::assertFalse($reviewForm->isVisibleRating($productRating), 'Product rating "' . $productRating->getRatingCode() . '" is displayed.');
 }
예제 #28
0
 /**
  * Assert no alert when saving an integration.
  *
  * @param IntegrationNew $integrationNew
  * @return void
  */
 public function processAssert(IntegrationNew $integrationNew)
 {
     $isAlertPresent = $integrationNew->getFormPageActions()->isAlertPresent();
     if ($isAlertPresent) {
         $integrationNew->getFormPageActions()->acceptAlert();
     }
     \PHPUnit_Framework_Assert::assertFalse($isAlertPresent, 'Saving an integration should not cause alert.');
 }
 /**
  * Assert that customer group is not on catalog price rule page.
  *
  * @param CatalogRuleNew $catalogRuleNew
  * @param CustomerGroup $customerGroup
  * @return void
  */
 public function processAssert(CatalogRuleNew $catalogRuleNew, CustomerGroup $customerGroup)
 {
     $catalogRuleNew->open();
     $catalogRuleNew->getEditForm()->openSection('rule_information');
     /** @var RuleInformation $ruleInformationSection */
     $ruleInformationSection = $catalogRuleNew->getEditForm()->getSection('rule_information');
     \PHPUnit_Framework_Assert::assertFalse($ruleInformationSection->isVisibleCustomerGroup($customerGroup), "Customer group {$customerGroup->getCustomerGroupCode()} is still in catalog price rule page.");
 }
 /**
  * Assert that product cannot be found by name and sku
  *
  * @param FixtureInterface|FixtureInterface[] $product
  * @param CatalogProductIndex $productGrid
  * @return void
  */
 public function processAssert($product, CatalogProductIndex $productGrid)
 {
     $products = is_array($product) ? $product : [$product];
     foreach ($products as $product) {
         $filter = ['sku' => $product->getSku(), 'name' => $product->getName()];
         $productGrid->open();
         \PHPUnit_Framework_Assert::assertFalse($productGrid->getProductGrid()->isRowVisible($filter), "Product with sku \"{$filter['sku']}\" and name \"{$filter['name']}\" is attend in Products grid.");
     }
 }