PHP Class Sylius\Behat\Context\Ui\Admin\ManagingPromotionsContext

Author: Mateusz Zalewski ([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\Admin\Promotion\IndexPageInterface $indexPage, Sylius\Behat\Page\Admin\Promotion\CreatePageInterface $createPage, Sylius\Behat\Page\Admin\Promotion\UpdatePageInterface $updatePage, Sylius\Behat\Service\Resolver\CurrentPageResolverInterface $currentPageResolver, Sylius\Behat\Service\NotificationCheckerInterface $notificationChecker, Sylius\Component\Currency\Provider\CurrencyProviderInterface $currencyProvider )
iAddAMaxPriceFilterRangeForChannel ( $channelName, $maximum )
iAddAMinMaxPriceFilterRangeForChannel ( $channelName, $minimum, $maximum )
iAddAMinPriceFilterRangeForChannel ( $channelName, $minimum )
iAddIt ( )
iAddTheAction ( $actionType )
iAddTheActionConfiguredWithAPercentageValue ( $actionType, $percentage = null )
iAddTheActionConfiguredWithAPercentageValueForChannel ( $actionType, $percentage = null, $channelName )
iAddTheActionConfiguredWithAmountForChannel ( $actionType, $amount, $channelName )
iAddTheHasTaxonRuleConfiguredWith ( $taxons )
iAddTheItemTotalRuleConfiguredWithTwoChannel ( $firstAmount, $firstChannelName, $secondAmount, $secondChannelName )
iAddTheRuleConfiguredWith ( $taxonName, $amount, $channelName )
iAddTheRuleConfiguredWithTheProduct ( $productName )
iDeletePromotion ( Sylius\Component\Core\Model\PromotionInterface $promotion )
iMakeItApplicableForTheChannel ( $channelName )
iMakeItAvailableFromTo ( DateTime $startsDate, DateTime $endsDate )
iMakeItCouponBased ( )
iMakeItExclusive ( )
iNameIt ( $name = null )
iSaveMyChanges ( )
iSetItsUsageLimitTo ( $usageLimit )
iShouldBeAbleToManageCouponsForThisPromotion ( Sylius\Component\Core\Model\PromotionInterface $promotion )
iShouldBeNotifiedOfFailure ( )
iShouldBeNotifiedThatAMinimalValueShouldBeNumeric ( $element )
iShouldBeNotifiedThatAPercentageDiscountValueMustBeAtLeast0 ( )
iShouldBeNotifiedThatIsRequired ( $element )
iShouldBeNotifiedThatPromotionCannotEndBeforeItsEvenStart ( )
iShouldBeNotifiedThatPromotionWithThisCodeAlreadyExists ( )
iShouldBeNotifiedThatTheMaximumValueOfAPercentageDiscountIs100 ( )
iShouldBeNotifiedThatThisValueShouldNotBeBlank ( )
iShouldSeePromotionsOnTheList ( $count )
iSpecifyItsCodeAs ( $code = null )
iSpecifyThatThisActionShouldBeAppliedToItemsFromCategory ( $taxonName )
iSpecifyThatThisActionShouldBeAppliedToTheProduct ( $productName )
iWantToBrowsePromotions ( )
iWantToCreateANewPromotion ( )
iWantToModifyAPromotion ( Sylius\Component\Core\Model\PromotionInterface $promotion )
itIsConfiguredWithAmountForChannel ( $amount, $channelName )
promotionShouldNotExistInTheRegistry ( Sylius\Component\Core\Model\PromotionInterface $promotion )
promotionWithElementValueShouldNotBeAdded ( $element, $name )
theCodeFieldShouldBeDisabled ( )
theFirstPromotionOnTheListShouldHave ( $field, $value )
theLastPromotionOnTheListShouldHave ( $field, $value )
thePromotionShouldAppearInTheRegistry ( $promotionName )
thePromotionShouldBeApplicableForTheChannel ( Sylius\Component\Core\Model\PromotionInterface $promotion, $channelName )
thePromotionShouldBeAvailableFromTo ( Sylius\Component\Core\Model\PromotionInterface $promotion, DateTime $startsDate, DateTime $endsDate )
thePromotionShouldBeAvailableToUseOnlyTimes ( Sylius\Component\Core\Model\PromotionInterface $promotion, $usageLimit )
thePromotionShouldBeCouponBased ( Sylius\Component\Core\Model\PromotionInterface $promotion )
thePromotionShouldBeExclusive ( Sylius\Component\Core\Model\PromotionInterface $promotion )
thePromotionShouldBeUsedTime ( Sylius\Component\Core\Model\PromotionInterface $promotion, $usage )
thereShouldBePromotion ( $number )
thereShouldStillBeOnlyOnePromotionWith ( $element, $value )
thisPromotionShouldBeCouponBased ( Sylius\Component\Core\Model\PromotionInterface $promotion )

Private Methods

Method Description
assertFieldValidationMessage ( string $element, string $expectedMessage )
assertIfFieldIsTrue ( Sylius\Component\Core\Model\PromotionInterface $promotion, string $field )

Method Details

__construct() public method

public __construct ( Sylius\Behat\Service\SharedStorageInterface $sharedStorage, Sylius\Behat\Page\Admin\Promotion\IndexPageInterface $indexPage, Sylius\Behat\Page\Admin\Promotion\CreatePageInterface $createPage, Sylius\Behat\Page\Admin\Promotion\UpdatePageInterface $updatePage, Sylius\Behat\Service\Resolver\CurrentPageResolverInterface $currentPageResolver, Sylius\Behat\Service\NotificationCheckerInterface $notificationChecker, Sylius\Component\Currency\Provider\CurrencyProviderInterface $currencyProvider )
$sharedStorage Sylius\Behat\Service\SharedStorageInterface
$indexPage Sylius\Behat\Page\Admin\Promotion\IndexPageInterface
$createPage Sylius\Behat\Page\Admin\Promotion\CreatePageInterface
$updatePage Sylius\Behat\Page\Admin\Promotion\UpdatePageInterface
$currentPageResolver Sylius\Behat\Service\Resolver\CurrentPageResolverInterface
$notificationChecker Sylius\Behat\Service\NotificationCheckerInterface
$currencyProvider Sylius\Component\Currency\Provider\CurrencyProviderInterface

iAddAMaxPriceFilterRangeForChannel() public method

public iAddAMaxPriceFilterRangeForChannel ( $channelName, $maximum )

iAddAMinMaxPriceFilterRangeForChannel() public method

public iAddAMinMaxPriceFilterRangeForChannel ( $channelName, $minimum, $maximum )

iAddAMinPriceFilterRangeForChannel() public method

public iAddAMinPriceFilterRangeForChannel ( $channelName, $minimum )

iAddIt() public method

public iAddIt ( )

iAddTheAction() public method

public iAddTheAction ( $actionType )

iAddTheActionConfiguredWithAPercentageValue() public method

public iAddTheActionConfiguredWithAPercentageValue ( $actionType, $percentage = null )

iAddTheActionConfiguredWithAPercentageValueForChannel() public method

public iAddTheActionConfiguredWithAPercentageValueForChannel ( $actionType, $percentage = null, $channelName )

iAddTheActionConfiguredWithAmountForChannel() public method

public iAddTheActionConfiguredWithAmountForChannel ( $actionType, $amount, $channelName )

iAddTheHasTaxonRuleConfiguredWith() public method

iAddTheItemTotalRuleConfiguredWithTwoChannel() public method

public iAddTheItemTotalRuleConfiguredWithTwoChannel ( $firstAmount, $firstChannelName, $secondAmount, $secondChannelName )

iAddTheRuleConfiguredWith() public method

public iAddTheRuleConfiguredWith ( $taxonName, $amount, $channelName )

iAddTheRuleConfiguredWithTheProduct() public method

public iAddTheRuleConfiguredWithTheProduct ( $productName )

iDeletePromotion() public method

public iDeletePromotion ( Sylius\Component\Core\Model\PromotionInterface $promotion )
$promotion Sylius\Component\Core\Model\PromotionInterface

iMakeItApplicableForTheChannel() public method

public iMakeItApplicableForTheChannel ( $channelName )

iMakeItAvailableFromTo() public method

public iMakeItAvailableFromTo ( DateTime $startsDate, DateTime $endsDate )
$startsDate DateTime
$endsDate DateTime

iMakeItCouponBased() public method

public iMakeItCouponBased ( )

iMakeItExclusive() public method

public iMakeItExclusive ( )

iNameIt() public method

public iNameIt ( $name = null )

iSaveMyChanges() public method

public iSaveMyChanges ( )

iSetItsUsageLimitTo() public method

public iSetItsUsageLimitTo ( $usageLimit )

iShouldBeAbleToManageCouponsForThisPromotion() public method

public iShouldBeAbleToManageCouponsForThisPromotion ( Sylius\Component\Core\Model\PromotionInterface $promotion )
$promotion Sylius\Component\Core\Model\PromotionInterface

iShouldBeNotifiedOfFailure() public method

iShouldBeNotifiedThatAMinimalValueShouldBeNumeric() public method

iShouldBeNotifiedThatAPercentageDiscountValueMustBeAtLeast0() public method

iShouldBeNotifiedThatIsRequired() public method

public iShouldBeNotifiedThatIsRequired ( $element )

iShouldBeNotifiedThatPromotionCannotEndBeforeItsEvenStart() public method

iShouldBeNotifiedThatPromotionWithThisCodeAlreadyExists() public method

iShouldBeNotifiedThatTheMaximumValueOfAPercentageDiscountIs100() public method

iShouldBeNotifiedThatThisValueShouldNotBeBlank() public method

iShouldSeePromotionsOnTheList() public method

public iShouldSeePromotionsOnTheList ( $count )

iSpecifyItsCodeAs() public method

public iSpecifyItsCodeAs ( $code = null )

iSpecifyThatThisActionShouldBeAppliedToItemsFromCategory() public method

iSpecifyThatThisActionShouldBeAppliedToTheProduct() public method

iWantToBrowsePromotions() public method

iWantToCreateANewPromotion() public method

iWantToModifyAPromotion() public method

public iWantToModifyAPromotion ( Sylius\Component\Core\Model\PromotionInterface $promotion )
$promotion Sylius\Component\Core\Model\PromotionInterface

itIsConfiguredWithAmountForChannel() public method

public itIsConfiguredWithAmountForChannel ( $amount, $channelName )

promotionShouldNotExistInTheRegistry() public method

public promotionShouldNotExistInTheRegistry ( Sylius\Component\Core\Model\PromotionInterface $promotion )
$promotion Sylius\Component\Core\Model\PromotionInterface

promotionWithElementValueShouldNotBeAdded() public method

public promotionWithElementValueShouldNotBeAdded ( $element, $name )

theCodeFieldShouldBeDisabled() public method

theFirstPromotionOnTheListShouldHave() public method

public theFirstPromotionOnTheListShouldHave ( $field, $value )

theLastPromotionOnTheListShouldHave() public method

public theLastPromotionOnTheListShouldHave ( $field, $value )

thePromotionShouldAppearInTheRegistry() public method

public thePromotionShouldAppearInTheRegistry ( $promotionName )

thePromotionShouldBeApplicableForTheChannel() public method

public thePromotionShouldBeApplicableForTheChannel ( Sylius\Component\Core\Model\PromotionInterface $promotion, $channelName )
$promotion Sylius\Component\Core\Model\PromotionInterface

thePromotionShouldBeAvailableFromTo() public method

public thePromotionShouldBeAvailableFromTo ( Sylius\Component\Core\Model\PromotionInterface $promotion, DateTime $startsDate, DateTime $endsDate )
$promotion Sylius\Component\Core\Model\PromotionInterface
$startsDate DateTime
$endsDate DateTime

thePromotionShouldBeAvailableToUseOnlyTimes() public method

public thePromotionShouldBeAvailableToUseOnlyTimes ( Sylius\Component\Core\Model\PromotionInterface $promotion, $usageLimit )
$promotion Sylius\Component\Core\Model\PromotionInterface

thePromotionShouldBeCouponBased() public method

public thePromotionShouldBeCouponBased ( Sylius\Component\Core\Model\PromotionInterface $promotion )
$promotion Sylius\Component\Core\Model\PromotionInterface

thePromotionShouldBeExclusive() public method

public thePromotionShouldBeExclusive ( Sylius\Component\Core\Model\PromotionInterface $promotion )
$promotion Sylius\Component\Core\Model\PromotionInterface

thePromotionShouldBeUsedTime() public method

public thePromotionShouldBeUsedTime ( Sylius\Component\Core\Model\PromotionInterface $promotion, $usage )
$promotion Sylius\Component\Core\Model\PromotionInterface

thereShouldBePromotion() public method

public thereShouldBePromotion ( $number )

thereShouldStillBeOnlyOnePromotionWith() public method

public thereShouldStillBeOnlyOnePromotionWith ( $element, $value )

thisPromotionShouldBeCouponBased() public method

public thisPromotionShouldBeCouponBased ( Sylius\Component\Core\Model\PromotionInterface $promotion )
$promotion Sylius\Component\Core\Model\PromotionInterface