PHP Class Sylius\Behat\Context\Ui\CheckoutContext

Author: Arkadiusz Krakowiak ([email protected])
Inheritance: extends Sylius\Behat\Context\FeatureContext
Show file Open project: sylius/sylius

Public Methods

Method Description
__construct ( Sylius\Behat\Service\SharedStorageInterface $sharedStorage, Sylius\Behat\Page\Shop\HomePageInterface $homePage, Sylius\Behat\Page\Shop\Checkout\AddressPageInterface $addressPage, Sylius\Behat\Page\Shop\Checkout\SelectPaymentPageInterface $selectPaymentPage, Sylius\Behat\Page\Shop\Order\ThankYouPageInterface $thankYouPage, Sylius\Behat\Page\Shop\Checkout\SelectShippingPageInterface $selectShippingPage, Sylius\Behat\Page\Shop\Checkout\CompletePageInterface $completePage, Sylius\Behat\Page\Shop\Order\ShowPageInterface $orderDetails, Sylius\Component\Order\Repository\OrderRepositoryInterface $orderRepository, Sylius\Component\Resource\Factory\FactoryInterface $addressFactory, Sylius\Behat\Service\Resolver\CurrentPageResolverInterface $currentPageResolver, Sylius\Component\Addressing\Comparator\AddressComparatorInterface $addressComparator )
addressShouldBeFilledAsBillingAddress ( Sylius\Component\Core\Model\AddressInterface $address )
addressShouldBeFilledAsShippingAddress ( Sylius\Component\Core\Model\AddressInterface $address )
iAmAtTheCheckoutAddressingStep ( )
iAmAtTheCheckoutPaymentStep ( )
iChangePaymentMethodTo ( $paymentMethodName )
iChangeShippingMethod ( $shippingMethodName )
iChooseForBillingAddress ( Sylius\Component\Core\Model\AddressInterface $address )
iChooseForShippingAddress ( Sylius\Component\Core\Model\AddressInterface $address )
iChoosePaymentMethod ( $paymentMethodName )
iChooseTheDifferentBillingAddress ( )
iCompleteAddressingStepWithEmail ( $email, Sylius\Component\Core\Model\AddressInterface $address )
iCompleteTheAddressingStep ( )
iCompleteThePaymentStep ( )
iCompleteTheShippingStep ( )
iConfirmMyOrder ( )
iDecideToChangeMyAddress ( )
iDecideToChangeMyShippingMethod ( )
iDoNotModifyAnything ( )
iDoNotSelectAnyPaymentMethod ( )
iDoNotSelectAnyShippingMethod ( )
iGoBackToShippingStepOfTheCheckout ( )
iGoBackToStore ( )
iGoToTheAddressingStep ( )
iGoToThePaymentStep ( )
iGoToTheShippingStep ( )
iHaveProceededSelectingShippingMethod ( $shippingMethodName )
iProceedLoggingAsGuestWithAsShippingCountry ( $email, Sylius\Component\Addressing\Model\CountryInterface $shippingCountry = null )
iProceedOrderWithShippingMethodAndPayment ( $shippingMethod, $paymentMethod )
iProceedSelectingPaymentMethod ( $paymentMethodName = 'Offline' )
iProceedSelectingShippingCountry ( Sylius\Component\Addressing\Model\CountryInterface $shippingCountry = null )
iProceedSelectingShippingCountryAndPaymentMethod ( $shippingCountry, $paymentMethodName )
iProceedSelectingShippingCountryAndShippingMethod ( Sylius\Component\Addressing\Model\CountryInterface $shippingCountry = null, $shippingMethodName )
iProceedSelectingShippingMethod ( $shippingMethodName )
iProceedWithoutSelectingShippingAddress ( )
iProvideAdditionalNotesLike ( $notes )
iReturnToTheCheckoutSummaryStep ( )
iSelectPaymentMethod ( $name )
iSelectShippingMethod ( $shippingMethod )
iShouldBeAbleToGoToThePaymentStepAgain ( )
iShouldBeAbleToGoToTheShippingStepAgain ( )
iShouldBeAbleToGoToTheSummaryPageAgain ( )
iShouldBeAbleToLogIn ( )
iShouldBeAbleToPayAgain ( )
iShouldBeAbleToSelectPaymentMethod ( $paymentMethodName )
iShouldBeInformedThatMyOrderCannotBeShippedToThisAddress ( )
iShouldBeInformedWithPaymentMethodInstructions ( Sylius\Component\Payment\Model\PaymentMethodInterface $paymentMethod )
iShouldBeNotifiedAboutBadCredentials ( )
iShouldBeNotifiedThatTheAndTheInShippingDetailsAreRequired ( $firstElement, $secondElement, $type )
iShouldBeNotifiedThatTheShippingMethodIsRequired ( )
iShouldBeNotifiedThatThisProductDoesNotHaveSufficientStock ( Sylius\Component\Core\Model\ProductInterface $product )
iShouldBeOnTheCheckoutAddressingStep ( )
iShouldBeOnTheCheckoutPaymentStep ( )
iShouldBeOnTheCheckoutShippingStep ( )
iShouldBeOnTheCheckoutSummaryStep ( )
iShouldBeRedirectedBackToTheThankYouPage ( )
iShouldBeRedirectedToTheAddressingStep ( )
iShouldBeRedirectedToTheHomepage ( )
iShouldBeRedirectedToThePaymentStep ( )
iShouldBeRedirectedToTheShippingStep ( )
iShouldHaveNoCountrySelected ( )
iShouldHavePaymentMethodAvailableAsFirstChoice ( $paymentMethodName )
iShouldHavePaymentMethodAvailableAsLastChoice ( $paymentMethodName )
iShouldHaveProductsInTheCart ( $quantity, $productName )
iShouldHaveSelectedAsCountry ( $countryName )
iShouldHaveShippingMethodAvailableAsFirstChoice ( $shippingMethodName )
iShouldHaveShippingMethodAvailableAsLastChoice ( $shippingMethodName )
iShouldNotBeAbleToCompleteThePaymentStep ( )
iShouldNotBeAbleToCompleteTheShippingStep ( )
iShouldNotBeAbleToPayAgain ( )
iShouldNotBeAbleToSelectPaymentMethod ( $paymentMethodName )
iShouldNotBeAbleToSelectShippingMethod ( $shippingMethodName )
iShouldNotBeAbleToSpecifyProvinceNameManuallyForBillingAddress ( )
iShouldNotBeAbleToSpecifyProvinceNameManuallyForShippingAddress ( )
iShouldNotBeNotifiedThatThisProductDoesNotHaveSufficientStock ( Sylius\Component\Core\Model\ProductInterface $product )
iShouldNotSeeShippingMethod ( $shippingMethodName )
iShouldNotSeeTheThankYouPage ( )
iShouldSeeInTheBillingAddress ( $provinceName )
iShouldSeeInTheShippingAddress ( $provinceName )
iShouldSeeShippingFee ( $shippingMethodName, $fee )
iShouldSeeShippingMethod ( $shippingMethodName )
iShouldSeeTheThankYouPage ( )
iShouldSeeThisBillingAddressAsBillingAddress ( $fullName )
iShouldSeeThisShippingAddressAsShippingAddress ( $fullName )
iShouldSeeThisShippingAddressAsShippingAndBillingAddress ( $fullName )
iShouldStillBeOnTheShippingStep ( )
iSignIn ( )
iSpecifiedTheShippingAddress ( Sylius\Component\Core\Model\AddressInterface $address )
iSpecifyBillingCountryProvinceAs ( $province )
iSpecifyShippingCountryProvinceAs ( $province )
iSpecifyTheBillingAddressAs ( Sylius\Component\Core\Model\AddressInterface $address )
iSpecifyTheEmail ( $email = null )
iSpecifyThePasswordAs ( $password )
iSpecifyTheProvinceNameManuallyAsForBillingAddress ( $provinceName )
iSpecifyTheProvinceNameManuallyAsForShippingAddress ( $provinceName )
iSpecifyTheShippingAddressAs ( Sylius\Component\Core\Model\AddressInterface $address )
iTryToOpenCheckoutAddressingPage ( )
iTryToOpenCheckoutCompletePage ( )
iTryToOpenCheckoutPaymentPage ( )
iTryToOpenCheckoutShippingPage ( )
iWantToBrowseOrderDetailsForThisOrder ( Sylius\Component\Core\Model\OrderInterface $order )
iWantToBrowseThankYouPageForThisOrder ( )
iWantToCompleteCheckout ( )
iWasAtTheCheckoutSummaryStep ( )
myOrderPromotionTotalShouldBe ( $promotionTotal )
myOrderSCurrencyShouldBe ( $currencyCode )
myOrderSLocaleShouldBe ( $localeName )
myOrderSPaymentMethodShouldBe ( Sylius\Component\Payment\Model\PaymentMethodInterface $paymentMethod )
myOrderSShippingMethodShouldBe ( Sylius\Component\Core\Model\ShippingMethodInterface $shippingMethod )
myOrderShippingShouldBe ( $price )
myOrderTotalInBaseCurrencyShouldBe ( $total )
myOrderTotalShouldBe ( $total )
myTaxTotalShouldBe ( $taxTotal )
shouldBeAppliedToMyOrder ( $promotionName )
theLoginFormShouldNoLongerBeAccessible ( )
theProductShouldHaveUnitPrice ( Sylius\Component\Core\Model\ProductInterface $product, $price )
theShouldHaveUnitPriceDiscountedFor ( Sylius\Component\Core\Model\ProductInterface $product, $amount )
theSubtotalOfItemShouldBe ( $item, $price )
thereShouldBeInformationAboutNoPaymentMethodsAvailableForMyOrder ( )
thereShouldBeInformationAboutNoShippingMethodsAvailableForMyShippingAddress ( )

Private Methods

Method Description
assertElementValidationMessage ( string $type, string $element, string $expectedMessage )
createDefaultAddress ( ) : Sylius\Component\Core\Model\AddressInterface
resolveCurrentStepPage ( ) : Sylius\Behat\Page\SymfonyPageInterface

Method Details

__construct() public method

public __construct ( Sylius\Behat\Service\SharedStorageInterface $sharedStorage, Sylius\Behat\Page\Shop\HomePageInterface $homePage, Sylius\Behat\Page\Shop\Checkout\AddressPageInterface $addressPage, Sylius\Behat\Page\Shop\Checkout\SelectPaymentPageInterface $selectPaymentPage, Sylius\Behat\Page\Shop\Order\ThankYouPageInterface $thankYouPage, Sylius\Behat\Page\Shop\Checkout\SelectShippingPageInterface $selectShippingPage, Sylius\Behat\Page\Shop\Checkout\CompletePageInterface $completePage, Sylius\Behat\Page\Shop\Order\ShowPageInterface $orderDetails, Sylius\Component\Order\Repository\OrderRepositoryInterface $orderRepository, Sylius\Component\Resource\Factory\FactoryInterface $addressFactory, Sylius\Behat\Service\Resolver\CurrentPageResolverInterface $currentPageResolver, Sylius\Component\Addressing\Comparator\AddressComparatorInterface $addressComparator )
$sharedStorage Sylius\Behat\Service\SharedStorageInterface
$homePage Sylius\Behat\Page\Shop\HomePageInterface
$addressPage Sylius\Behat\Page\Shop\Checkout\AddressPageInterface
$selectPaymentPage Sylius\Behat\Page\Shop\Checkout\SelectPaymentPageInterface
$thankYouPage Sylius\Behat\Page\Shop\Order\ThankYouPageInterface
$selectShippingPage Sylius\Behat\Page\Shop\Checkout\SelectShippingPageInterface
$completePage Sylius\Behat\Page\Shop\Checkout\CompletePageInterface
$orderDetails Sylius\Behat\Page\Shop\Order\ShowPageInterface
$orderRepository Sylius\Component\Order\Repository\OrderRepositoryInterface
$addressFactory Sylius\Component\Resource\Factory\FactoryInterface
$currentPageResolver Sylius\Behat\Service\Resolver\CurrentPageResolverInterface
$addressComparator Sylius\Component\Addressing\Comparator\AddressComparatorInterface

addressShouldBeFilledAsBillingAddress() public method

public addressShouldBeFilledAsBillingAddress ( Sylius\Component\Core\Model\AddressInterface $address )
$address Sylius\Component\Core\Model\AddressInterface

addressShouldBeFilledAsShippingAddress() public method

public addressShouldBeFilledAsShippingAddress ( Sylius\Component\Core\Model\AddressInterface $address )
$address Sylius\Component\Core\Model\AddressInterface

iAmAtTheCheckoutAddressingStep() public method

iAmAtTheCheckoutPaymentStep() public method

iChangePaymentMethodTo() public method

public iChangePaymentMethodTo ( $paymentMethodName )

iChangeShippingMethod() public method

public iChangeShippingMethod ( $shippingMethodName )

iChooseForBillingAddress() public method

public iChooseForBillingAddress ( Sylius\Component\Core\Model\AddressInterface $address )
$address Sylius\Component\Core\Model\AddressInterface

iChooseForShippingAddress() public method

public iChooseForShippingAddress ( Sylius\Component\Core\Model\AddressInterface $address )
$address Sylius\Component\Core\Model\AddressInterface

iChoosePaymentMethod() public method

public iChoosePaymentMethod ( $paymentMethodName )

iChooseTheDifferentBillingAddress() public method

iCompleteAddressingStepWithEmail() public method

public iCompleteAddressingStepWithEmail ( $email, Sylius\Component\Core\Model\AddressInterface $address )
$address Sylius\Component\Core\Model\AddressInterface

iCompleteTheAddressingStep() public method

iCompleteThePaymentStep() public method

iCompleteTheShippingStep() public method

iConfirmMyOrder() public method

public iConfirmMyOrder ( )

iDecideToChangeMyAddress() public method

iDecideToChangeMyShippingMethod() public method

iDoNotModifyAnything() public method

iDoNotSelectAnyPaymentMethod() public method

iDoNotSelectAnyShippingMethod() public method

iGoBackToShippingStepOfTheCheckout() public method

iGoBackToStore() public method

public iGoBackToStore ( )

iGoToTheAddressingStep() public method

iGoToThePaymentStep() public method

public iGoToThePaymentStep ( )

iGoToTheShippingStep() public method

iHaveProceededSelectingShippingMethod() public method

public iHaveProceededSelectingShippingMethod ( $shippingMethodName )

iProceedLoggingAsGuestWithAsShippingCountry() public method

public iProceedLoggingAsGuestWithAsShippingCountry ( $email, Sylius\Component\Addressing\Model\CountryInterface $shippingCountry = null )
$shippingCountry Sylius\Component\Addressing\Model\CountryInterface

iProceedOrderWithShippingMethodAndPayment() public method

public iProceedOrderWithShippingMethodAndPayment ( $shippingMethod, $paymentMethod )

iProceedSelectingPaymentMethod() public method

public iProceedSelectingPaymentMethod ( $paymentMethodName = 'Offline' )

iProceedSelectingShippingCountry() public method

public iProceedSelectingShippingCountry ( Sylius\Component\Addressing\Model\CountryInterface $shippingCountry = null )
$shippingCountry Sylius\Component\Addressing\Model\CountryInterface

iProceedSelectingShippingCountryAndPaymentMethod() public method

public iProceedSelectingShippingCountryAndPaymentMethod ( $shippingCountry, $paymentMethodName )

iProceedSelectingShippingCountryAndShippingMethod() public method

public iProceedSelectingShippingCountryAndShippingMethod ( Sylius\Component\Addressing\Model\CountryInterface $shippingCountry = null, $shippingMethodName )
$shippingCountry Sylius\Component\Addressing\Model\CountryInterface

iProceedSelectingShippingMethod() public method

public iProceedSelectingShippingMethod ( $shippingMethodName )

iProceedWithoutSelectingShippingAddress() public method

iProvideAdditionalNotesLike() public method

public iProvideAdditionalNotesLike ( $notes )

iReturnToTheCheckoutSummaryStep() public method

iSelectPaymentMethod() public method

public iSelectPaymentMethod ( $name )

iSelectShippingMethod() public method

public iSelectShippingMethod ( $shippingMethod )

iShouldBeAbleToGoToThePaymentStepAgain() public method

iShouldBeAbleToGoToTheShippingStepAgain() public method

iShouldBeAbleToGoToTheSummaryPageAgain() public method

iShouldBeAbleToLogIn() public method

iShouldBeAbleToPayAgain() public method

iShouldBeAbleToSelectPaymentMethod() public method

public iShouldBeAbleToSelectPaymentMethod ( $paymentMethodName )

iShouldBeInformedThatMyOrderCannotBeShippedToThisAddress() public method

iShouldBeInformedWithPaymentMethodInstructions() public method

public iShouldBeInformedWithPaymentMethodInstructions ( Sylius\Component\Payment\Model\PaymentMethodInterface $paymentMethod )
$paymentMethod Sylius\Component\Payment\Model\PaymentMethodInterface

iShouldBeNotifiedAboutBadCredentials() public method

iShouldBeNotifiedThatTheAndTheInShippingDetailsAreRequired() public method

public iShouldBeNotifiedThatTheAndTheInShippingDetailsAreRequired ( $firstElement, $secondElement, $type )

iShouldBeNotifiedThatTheShippingMethodIsRequired() public method

iShouldBeNotifiedThatThisProductDoesNotHaveSufficientStock() public method

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

iShouldBeOnTheCheckoutAddressingStep() public method

iShouldBeOnTheCheckoutPaymentStep() public method

iShouldBeOnTheCheckoutShippingStep() public method

iShouldBeOnTheCheckoutSummaryStep() public method

iShouldBeRedirectedBackToTheThankYouPage() public method

iShouldBeRedirectedToTheAddressingStep() public method

iShouldBeRedirectedToTheHomepage() public method

iShouldBeRedirectedToThePaymentStep() public method

iShouldBeRedirectedToTheShippingStep() public method

iShouldHaveNoCountrySelected() public method

iShouldHavePaymentMethodAvailableAsFirstChoice() public method

public iShouldHavePaymentMethodAvailableAsFirstChoice ( $paymentMethodName )

iShouldHavePaymentMethodAvailableAsLastChoice() public method

public iShouldHavePaymentMethodAvailableAsLastChoice ( $paymentMethodName )

iShouldHaveProductsInTheCart() public method

public iShouldHaveProductsInTheCart ( $quantity, $productName )

iShouldHaveSelectedAsCountry() public method

public iShouldHaveSelectedAsCountry ( $countryName )

iShouldHaveShippingMethodAvailableAsFirstChoice() public method

public iShouldHaveShippingMethodAvailableAsFirstChoice ( $shippingMethodName )

iShouldHaveShippingMethodAvailableAsLastChoice() public method

public iShouldHaveShippingMethodAvailableAsLastChoice ( $shippingMethodName )

iShouldNotBeAbleToCompleteThePaymentStep() public method

iShouldNotBeAbleToCompleteTheShippingStep() public method

iShouldNotBeAbleToPayAgain() public method

iShouldNotBeAbleToSelectPaymentMethod() public method

public iShouldNotBeAbleToSelectPaymentMethod ( $paymentMethodName )

iShouldNotBeAbleToSelectShippingMethod() public method

public iShouldNotBeAbleToSelectShippingMethod ( $shippingMethodName )

iShouldNotBeAbleToSpecifyProvinceNameManuallyForBillingAddress() public method

iShouldNotBeAbleToSpecifyProvinceNameManuallyForShippingAddress() public method

iShouldNotBeNotifiedThatThisProductDoesNotHaveSufficientStock() public method

public iShouldNotBeNotifiedThatThisProductDoesNotHaveSufficientStock ( Sylius\Component\Core\Model\ProductInterface $product )
$product Sylius\Component\Core\Model\ProductInterface

iShouldNotSeeShippingMethod() public method

public iShouldNotSeeShippingMethod ( $shippingMethodName )

iShouldNotSeeTheThankYouPage() public method

iShouldSeeInTheBillingAddress() public method

public iShouldSeeInTheBillingAddress ( $provinceName )

iShouldSeeInTheShippingAddress() public method

public iShouldSeeInTheShippingAddress ( $provinceName )

iShouldSeeShippingFee() public method

public iShouldSeeShippingFee ( $shippingMethodName, $fee )

iShouldSeeShippingMethod() public method

public iShouldSeeShippingMethod ( $shippingMethodName )

iShouldSeeTheThankYouPage() public method

iShouldSeeThisBillingAddressAsBillingAddress() public method

iShouldSeeThisShippingAddressAsShippingAddress() public method

iShouldSeeThisShippingAddressAsShippingAndBillingAddress() public method

iShouldStillBeOnTheShippingStep() public method

iSignIn() public method

public iSignIn ( )

iSpecifiedTheShippingAddress() public method

public iSpecifiedTheShippingAddress ( Sylius\Component\Core\Model\AddressInterface $address )
$address Sylius\Component\Core\Model\AddressInterface

iSpecifyBillingCountryProvinceAs() public method

public iSpecifyBillingCountryProvinceAs ( $province )

iSpecifyShippingCountryProvinceAs() public method

public iSpecifyShippingCountryProvinceAs ( $province )

iSpecifyTheBillingAddressAs() public method

public iSpecifyTheBillingAddressAs ( Sylius\Component\Core\Model\AddressInterface $address )
$address Sylius\Component\Core\Model\AddressInterface

iSpecifyTheEmail() public method

public iSpecifyTheEmail ( $email = null )

iSpecifyThePasswordAs() public method

public iSpecifyThePasswordAs ( $password )

iSpecifyTheProvinceNameManuallyAsForBillingAddress() public method

iSpecifyTheProvinceNameManuallyAsForShippingAddress() public method

iSpecifyTheShippingAddressAs() public method

public iSpecifyTheShippingAddressAs ( Sylius\Component\Core\Model\AddressInterface $address )
$address Sylius\Component\Core\Model\AddressInterface

iTryToOpenCheckoutAddressingPage() public method

iTryToOpenCheckoutCompletePage() public method

iTryToOpenCheckoutPaymentPage() public method

iTryToOpenCheckoutShippingPage() public method

iWantToBrowseOrderDetailsForThisOrder() public method

public iWantToBrowseOrderDetailsForThisOrder ( Sylius\Component\Core\Model\OrderInterface $order )
$order Sylius\Component\Core\Model\OrderInterface

iWantToBrowseThankYouPageForThisOrder() public method

iWantToCompleteCheckout() public method

iWasAtTheCheckoutSummaryStep() public method

myOrderPromotionTotalShouldBe() public method

public myOrderPromotionTotalShouldBe ( $promotionTotal )

myOrderSCurrencyShouldBe() public method

public myOrderSCurrencyShouldBe ( $currencyCode )

myOrderSLocaleShouldBe() public method

public myOrderSLocaleShouldBe ( $localeName )

myOrderSPaymentMethodShouldBe() public method

public myOrderSPaymentMethodShouldBe ( Sylius\Component\Payment\Model\PaymentMethodInterface $paymentMethod )
$paymentMethod Sylius\Component\Payment\Model\PaymentMethodInterface

myOrderSShippingMethodShouldBe() public method

public myOrderSShippingMethodShouldBe ( Sylius\Component\Core\Model\ShippingMethodInterface $shippingMethod )
$shippingMethod Sylius\Component\Core\Model\ShippingMethodInterface

myOrderShippingShouldBe() public method

public myOrderShippingShouldBe ( $price )

myOrderTotalInBaseCurrencyShouldBe() public method

myOrderTotalShouldBe() public method

public myOrderTotalShouldBe ( $total )

myTaxTotalShouldBe() public method

public myTaxTotalShouldBe ( $taxTotal )

shouldBeAppliedToMyOrder() public method

public shouldBeAppliedToMyOrder ( $promotionName )

theLoginFormShouldNoLongerBeAccessible() public method

theProductShouldHaveUnitPrice() public method

public theProductShouldHaveUnitPrice ( Sylius\Component\Core\Model\ProductInterface $product, $price )
$product Sylius\Component\Core\Model\ProductInterface

theShouldHaveUnitPriceDiscountedFor() public method

public theShouldHaveUnitPriceDiscountedFor ( Sylius\Component\Core\Model\ProductInterface $product, $amount )
$product Sylius\Component\Core\Model\ProductInterface

theSubtotalOfItemShouldBe() public method

public theSubtotalOfItemShouldBe ( $item, $price )

thereShouldBeInformationAboutNoPaymentMethodsAvailableForMyOrder() public method

thereShouldBeInformationAboutNoShippingMethodsAvailableForMyShippingAddress() public method