9 use Magento\Catalog\Test\Page\Product\CatalogProductView;
10 use Magento\Checkout\Test\Page\CheckoutCart;
12 use Magento\Mtf\Client\BrowserInterface;
13 use Magento\Mtf\Constraint\AbstractConstraint;
31 BrowserInterface $browser,
32 CatalogProductView $catalogProductView,
36 $browser->open($_ENV[
'app_frontend_url'] .
$product->getUrlKey() .
'.html');
38 $catalogProductView->getViewBlock()->addToCart(
$product);
39 $catalogProductView->getMessagesBlock()->waitSuccessMessage();
40 $checkoutCart->open();
42 $checkoutData =
$product->getCheckoutData();
43 $price = $checkoutCart->getCartBlock()->getCartItem(
$product)->getPrice();
44 \PHPUnit\Framework\Assert::assertEquals(
45 $checkoutData[
'cartItem'][
'price'],
47 'Product price in shopping cart is not correct.' 58 return 'Product price in shopping cart is correct.';
processAssert(BrowserInterface $browser, CatalogProductView $catalogProductView, CheckoutCart $checkoutCart, ConfigurableProduct $product)