Closed (outdated)
Project:
Commerce Ajax Add to Cart
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
20 Oct 2017 at 06:35 UTC
Updated:
1 Mar 2018 at 13:20 UTC
Jump to comment: Most recent
There are some common assertions like:
/*
* Confirm that the initial add to cart submit works.
*/
$this->cart = Order::load($this->cart->id());
$order_items = $this->cart->getItems();
$this->assertOrderItemInOrder($this->variation, $order_items[0]);
This assertion has been used in multiple places. This can be moved inside a base assertion method inside AjaxAddCartTestBase.
Create a new assertion method that would check whether an item is added to cart. Made code changes in other tests if necessary.
N/A
N/A
N/A
N/A
Comments
Comment #2
subhojit777I think we are okay with what we have. There is no need to create a separate assetion method.