You are here

protected function AjaxAddCartViewsTestBase::getRowCartAjaxByVariation in Commerce Ajax Add to Cart 8

Returns the table row element where the variation is present.

Parameters

\Drupal\commerce_product\Entity\ProductVariationInterface $variation: The variation whose row is going to be returned.

Return value

\Behat\Mink\Element\NodeElement|null The table row element, if found, otherwise NULL.

6 calls to AjaxAddCartViewsTestBase::getRowCartAjaxByVariation()
AjaxAddCartViewsEditQuantityTest::testAjaxUpdateCartButton in modules/dc_ajax_add_cart_views/tests/src/FunctionalJavascript/AjaxAddCartViewsEditQuantityTest.php
Tests whether the update cart button is indeed ajaxified.
AjaxAddCartViewsEditQuantityTest::testOrderTotal in modules/dc_ajax_add_cart_views/tests/src/FunctionalJavascript/AjaxAddCartViewsEditQuantityTest.php
Tests whether order total is correct on ajax quantity update.
AjaxAddCartViewsEditQuantityTest::testUpdateCartButton in modules/dc_ajax_add_cart_views/tests/src/FunctionalJavascript/AjaxAddCartViewsEditQuantityTest.php
Tests edit quantity views field.
AjaxAddCartViewsRemoveButtonTest::testAjaxRemoveButton in modules/dc_ajax_add_cart_views/tests/src/FunctionalJavascript/AjaxAddCartViewsRemoveButtonTest.php
Tests whether the remove button views field is indeed ajaxified.
AjaxAddCartViewsRemoveButtonTest::testOrderTotal in modules/dc_ajax_add_cart_views/tests/src/FunctionalJavascript/AjaxAddCartViewsRemoveButtonTest.php
Tests whether order total is correct on ajax removing product from cart.

... See full list

File

modules/dc_ajax_add_cart_views/tests/src/Functional/AjaxAddCartViewsTestBase.php, line 106

Class

AjaxAddCartViewsTestBase
Base class for ajax add cart views tests.

Namespace

Drupal\Tests\dc_ajax_add_cart_views\Functional

Code

protected function getRowCartAjaxByVariation(ProductVariationInterface $variation) {
  return $this
    ->getSession()
    ->getPage()
    ->find('css', ".view-dc-ajax-add-cart-views-test-view table tr.variation-{$variation->id()}");
}