Problem/Motivation

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.

Proposed resolution

Create a new assertion method that would check whether an item is added to cart. Made code changes in other tests if necessary.

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Comments

subhojit777 created an issue. See original summary.

subhojit777’s picture

Status: Active » Closed (outdated)

I think we are okay with what we have. There is no need to create a separate assetion method.