PHP Class Sylius\Behat\Context\Ui\Shop\CartContext

Author: Mateusz Zalewski ([email protected])
Author: Anna Walasek ([email protected])
Author: Paweł Jędrzejewski ([email protected])
Inheritance: implements Behat\Behat\Context\Context
Show file Open project: sylius/sylius

Public Methods

Method Description
__construct ( Sylius\Behat\Service\SharedStorageInterface $sharedStorage, Sylius\Behat\Page\Shop\Cart\SummaryPageInterface $summaryPage, Sylius\Behat\Page\Shop\Product\ShowPageInterface $productShowPage, Sylius\Behat\Service\NotificationCheckerInterface $notificationChecker )
iAddMultipleProductsToTheCart ( array $products )
iAddProductToTheCart ( Sylius\Component\Product\Model\ProductInterface $product )
iAddProductToTheCartSelectingVariant ( $variantName, Sylius\Component\Product\Model\ProductInterface $product )
iAddProductsToTheCart ( $quantity, Sylius\Component\Product\Model\ProductInterface $product )
iAddQuantityOfProductsToTheCart ( $quantity, Sylius\Component\Product\Model\ProductInterface $product )
iAddThisProductWithToTheCart ( Sylius\Component\Product\Model\ProductInterface $product, Sylius\Component\Product\Model\ProductOptionInterface $productOption, $productOptionValue )
iChangeQuantityTo ( $productName, $quantity )
iClearMyCart ( )
iOpenCartSummaryPage ( )
iRemoveProductFromTheCart ( $productName )
iShouldBeNotifiedThatCouponIsInvalid ( )
iShouldBeNotifiedThatItHasBeenSuccessfullyAdded ( )
iShouldBeNotifiedThatMyCartIsEmpty ( )
iShouldBeNotifiedThatThisProductDoesNotHaveSufficientStock ( Sylius\Component\Product\Model\ProductInterface $product )
iShouldNotBeNotifiedThatThisProductCannotBeUpdated ( Sylius\Component\Product\Model\ProductInterface $product )
iShouldSeeProductWithUnitPriceInMyCart ( $productName, $unitPrice )
iShouldSeeWithQuantityInMyCart ( $productName, $quantity )
iUpdateMyCart ( )
iUseCouponWithCode ( $couponCode )
itsPriceShouldBeDecreasedBy ( Sylius\Component\Product\Model\ProductInterface $product, $amount )
myBaseCartTotalShouldBe ( $total )
myCartSTotalShouldBe ( $total )
myCartShippingFeeShouldBe ( $shippingTotal = '$0.00' )
myCartTaxesShouldBe ( $taxTotal )
myCartTotalShouldBe ( $total )
myDiscountShouldBe ( $promotionsTotal )
productPriceShouldNotBeDecreased ( Sylius\Component\Product\Model\ProductInterface $product )
shouldBeOnMyCartSummaryPage ( )
thereShouldBeNoDiscount ( )
thereShouldBeNoShippingFee ( )
thereShouldBeOneItemInMyCart ( )
thisItemPriceShouldBe ( $productName, $productPrice )
thisItemShouldHaveCode ( $variantCode )
thisItemShouldHaveOptionValue ( Sylius\Component\Product\Model\ProductInterface $product, $optionName, $optionValue )
thisItemShouldHaveVariant ( $variantName )
thisProductShouldHaveName ( $itemName )

Private Methods

Method Description
getPriceFromString ( string $price ) : integer

Method Details

__construct() public method

public __construct ( Sylius\Behat\Service\SharedStorageInterface $sharedStorage, Sylius\Behat\Page\Shop\Cart\SummaryPageInterface $summaryPage, Sylius\Behat\Page\Shop\Product\ShowPageInterface $productShowPage, Sylius\Behat\Service\NotificationCheckerInterface $notificationChecker )
$sharedStorage Sylius\Behat\Service\SharedStorageInterface
$summaryPage Sylius\Behat\Page\Shop\Cart\SummaryPageInterface
$productShowPage Sylius\Behat\Page\Shop\Product\ShowPageInterface
$notificationChecker Sylius\Behat\Service\NotificationCheckerInterface

iAddMultipleProductsToTheCart() public method

public iAddMultipleProductsToTheCart ( array $products )
$products array

iAddProductToTheCart() public method

public iAddProductToTheCart ( Sylius\Component\Product\Model\ProductInterface $product )
$product Sylius\Component\Product\Model\ProductInterface

iAddProductToTheCartSelectingVariant() public method

public iAddProductToTheCartSelectingVariant ( $variantName, Sylius\Component\Product\Model\ProductInterface $product )
$product Sylius\Component\Product\Model\ProductInterface

iAddProductsToTheCart() public method

public iAddProductsToTheCart ( $quantity, Sylius\Component\Product\Model\ProductInterface $product )
$product Sylius\Component\Product\Model\ProductInterface

iAddQuantityOfProductsToTheCart() public method

public iAddQuantityOfProductsToTheCart ( $quantity, Sylius\Component\Product\Model\ProductInterface $product )
$product Sylius\Component\Product\Model\ProductInterface

iAddThisProductWithToTheCart() public method

public iAddThisProductWithToTheCart ( Sylius\Component\Product\Model\ProductInterface $product, Sylius\Component\Product\Model\ProductOptionInterface $productOption, $productOptionValue )
$product Sylius\Component\Product\Model\ProductInterface
$productOption Sylius\Component\Product\Model\ProductOptionInterface

iChangeQuantityTo() public method

public iChangeQuantityTo ( $productName, $quantity )

iClearMyCart() public method

public iClearMyCart ( )

iOpenCartSummaryPage() public method

iRemoveProductFromTheCart() public method

public iRemoveProductFromTheCart ( $productName )

iShouldBeNotifiedThatCouponIsInvalid() public method

iShouldBeNotifiedThatItHasBeenSuccessfullyAdded() public method

iShouldBeNotifiedThatMyCartIsEmpty() public method

iShouldBeNotifiedThatThisProductDoesNotHaveSufficientStock() public method

public iShouldBeNotifiedThatThisProductDoesNotHaveSufficientStock ( Sylius\Component\Product\Model\ProductInterface $product )
$product Sylius\Component\Product\Model\ProductInterface

iShouldNotBeNotifiedThatThisProductCannotBeUpdated() public method

public iShouldNotBeNotifiedThatThisProductCannotBeUpdated ( Sylius\Component\Product\Model\ProductInterface $product )
$product Sylius\Component\Product\Model\ProductInterface

iShouldSeeProductWithUnitPriceInMyCart() public method

public iShouldSeeProductWithUnitPriceInMyCart ( $productName, $unitPrice )

iShouldSeeWithQuantityInMyCart() public method

public iShouldSeeWithQuantityInMyCart ( $productName, $quantity )

iUpdateMyCart() public method

public iUpdateMyCart ( )

iUseCouponWithCode() public method

public iUseCouponWithCode ( $couponCode )

itsPriceShouldBeDecreasedBy() public method

public itsPriceShouldBeDecreasedBy ( Sylius\Component\Product\Model\ProductInterface $product, $amount )
$product Sylius\Component\Product\Model\ProductInterface

myBaseCartTotalShouldBe() public method

public myBaseCartTotalShouldBe ( $total )

myCartSTotalShouldBe() public method

public myCartSTotalShouldBe ( $total )

myCartShippingFeeShouldBe() public method

public myCartShippingFeeShouldBe ( $shippingTotal = '$0.00' )

myCartTaxesShouldBe() public method

public myCartTaxesShouldBe ( $taxTotal )

myCartTotalShouldBe() public method

public myCartTotalShouldBe ( $total )

myDiscountShouldBe() public method

public myDiscountShouldBe ( $promotionsTotal )

productPriceShouldNotBeDecreased() public method

public productPriceShouldNotBeDecreased ( Sylius\Component\Product\Model\ProductInterface $product )
$product Sylius\Component\Product\Model\ProductInterface

shouldBeOnMyCartSummaryPage() public method

thereShouldBeNoDiscount() public method

thereShouldBeNoShippingFee() public method

thereShouldBeOneItemInMyCart() public method

thisItemPriceShouldBe() public method

public thisItemPriceShouldBe ( $productName, $productPrice )

thisItemShouldHaveCode() public method

public thisItemShouldHaveCode ( $variantCode )

thisItemShouldHaveOptionValue() public method

public thisItemShouldHaveOptionValue ( Sylius\Component\Product\Model\ProductInterface $product, $optionName, $optionValue )
$product Sylius\Component\Product\Model\ProductInterface

thisItemShouldHaveVariant() public method

public thisItemShouldHaveVariant ( $variantName )

thisProductShouldHaveName() public method

public thisProductShouldHaveName ( $itemName )