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

Author: Łukasz Chruściel ([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\Component\Product\Resolver\DefaultProductVariantResolver $defaultProductVariantResolver, Sylius\Behat\Page\Admin\ProductVariant\CreatePageInterface $createPage, Sylius\Behat\Page\Admin\ProductVariant\IndexPageInterface $indexPage, Sylius\Behat\Page\Admin\ProductVariant\UpdatePageInterface $updatePage, Sylius\Behat\Page\Admin\ProductVariant\GeneratePageInterface $generatePage, Sylius\Behat\Service\Resolver\CurrentPageResolverInterface $currentPageResolver, Sylius\Behat\Service\NotificationCheckerInterface $notificationChecker )
iAddIt ( )
iChangeItsPriceTo ( $price )
iChooseCalculator ( $calculatorName )
iClickGenerate ( )
iDeleteTheVariantOfProduct ( Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
iDisableItsTracking ( )
iDoNetSetItsCurrentStockTo ( )
iEnableItsTracking ( )
iNameItIn ( $name )
iRemoveItsNameFromTranslation ( )
iRemoveVariantFromTheList ( $nthVariant )
iRenameItTo ( $name )
iSaveMyChanges ( )
iSetItsDimensionsTo ( $value )
iSetItsOptionAs ( $optionName, $optionValue )
iSetItsPriceTo ( $price = null, $channel = null )
iSetItsPriceToForCurrencyAndChannel ( $price, Sylius\Component\Currency\Model\CurrencyInterface $currency, Sylius\Component\Core\Model\ChannelInterface $channel )
iSetItsShippingCategoryAs ( $shippingCategoryName )
iShouldBeNotifiedOfFailure ( )
iShouldBeNotifiedThatCodeHasToBeUnique ( )
iShouldBeNotifiedThatCodeIsRequiredForVariant ( $position )
iShouldBeNotifiedThatIsHeightWidthDepthWeightCannotBeLowerThan ( )
iShouldBeNotifiedThatIsRequired ( $element )
iShouldBeNotifiedThatItHasBeenSuccessfullyGenerated ( )
iShouldBeNotifiedThatOnHandIsRequired ( )
iShouldBeNotifiedThatPriceCannotBeLowerThen ( )
iShouldBeNotifiedThatPricesInAllChannelsMustBeDefined ( )
iShouldBeNotifiedThatPricesInAllChannelsMustBeDefinedForTheVariant ( $position )
iShouldBeNotifiedThatThisVariantAlreadyExists ( )
iShouldSeeProductVariantsInTheList ( $numberOfProductVariants )
iShouldSeeThatIsNotTracked ( Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
iShouldSeeThatTheVariantHasZeroOnHandQuantity ( Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
iSpecifyItsCodeAs ( $code = null )
iSpecifyThereAreVariantsIdentifiedByCode ( $nthVariant, $code )
iSpecifyThereAreVariantsIdentifiedByCodeWithCost ( $nthVariant, $code, $price, $channelName )
iSpecifyThereAreVariantsWithCost ( $nthVariant, $price, $channelName )
iWantToCreateANewProduct ( Sylius\Component\Core\Model\ProductInterface $product )
iWantToGenerateNewVariantsForThisProduct ( Sylius\Component\Core\Model\ProductInterface $product )
iWantToModifyAProduct ( Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
iWantToViewAllVariantsOfThisProduct ( Sylius\Component\Core\Model\ProductInterface $product )
productShouldExistInTheProductCatalog ( Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
productVariantShouldNotExist ( Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
theCodeFieldShouldBeDisabled ( )
theProductForCurrencyAndChannelShouldBePricedAt ( Sylius\Component\Core\Model\ProductVariantInterface $productVariant, Sylius\Component\Currency\Model\CurrencyInterface $currency, Sylius\Component\Core\Model\ChannelInterface $channel, $price )
theProductShouldHaveNoVariants ( Sylius\Component\Core\Model\ProductInterface $product )
theProductShouldHaveOnlyOneVariant ( Sylius\Component\Core\Model\ProductInterface $product )
theProductVariantShouldAppearInTheShop ( $productVariantCode, Sylius\Component\Core\Model\ProductInterface $product )
theProductVariantShouldNotAppearInTheShop ( $productVariantCode, Sylius\Component\Core\Model\ProductInterface $product )
theVariantOfProductShouldHaveItemsOnHand ( $productVariantName, Sylius\Component\Core\Model\ProductInterface $product, $quantity )
theVariantOfProductShouldHaveItemsOnHold ( Sylius\Component\Core\Model\ProductVariantInterface $variant, Sylius\Component\Core\Model\ProductInterface $product, $amount )
theVariantWithCodeShouldBePricedAtForChannel ( Sylius\Component\Core\Model\ProductVariantInterface $productVariant, $price, $channelName )
thereShouldBeNoUnitsOfThisProductOnHold ( Sylius\Component\Core\Model\ProductInterface $product )
thisProductVariantShouldBeTracked ( Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
thisProductVariantShouldNotBeTracked ( Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
thisVariantShouldHaveItemsOnHand ( $productVariantName, $quantity )
thisVariantShouldHaveItemsOnHold ( Sylius\Component\Core\Model\ProductVariantInterface $variant, $amount )
unitsOfThisProductShouldBeOnHand ( $quantity, Sylius\Component\Core\Model\ProductInterface $product )
unitsOfThisProductShouldBeOnHold ( $quantity, Sylius\Component\Core\Model\ProductInterface $product )

Private Methods

Method Description
assertNumberOfVariantsOnProductPage ( Sylius\Component\Core\Model\ProductInterface $product, integer $amount )
assertOnHoldQuantityOfVariant ( integer $expectedAmount, Sylius\Component\Core\Model\ProductVariantInterface $variant )
assertValidationMessage ( string $element, $message )

Method Details

__construct() public method

public __construct ( Sylius\Behat\Service\SharedStorageInterface $sharedStorage, Sylius\Component\Product\Resolver\DefaultProductVariantResolver $defaultProductVariantResolver, Sylius\Behat\Page\Admin\ProductVariant\CreatePageInterface $createPage, Sylius\Behat\Page\Admin\ProductVariant\IndexPageInterface $indexPage, Sylius\Behat\Page\Admin\ProductVariant\UpdatePageInterface $updatePage, Sylius\Behat\Page\Admin\ProductVariant\GeneratePageInterface $generatePage, Sylius\Behat\Service\Resolver\CurrentPageResolverInterface $currentPageResolver, Sylius\Behat\Service\NotificationCheckerInterface $notificationChecker )
$sharedStorage Sylius\Behat\Service\SharedStorageInterface
$defaultProductVariantResolver Sylius\Component\Product\Resolver\DefaultProductVariantResolver
$createPage Sylius\Behat\Page\Admin\ProductVariant\CreatePageInterface
$indexPage Sylius\Behat\Page\Admin\ProductVariant\IndexPageInterface
$updatePage Sylius\Behat\Page\Admin\ProductVariant\UpdatePageInterface
$generatePage Sylius\Behat\Page\Admin\ProductVariant\GeneratePageInterface
$currentPageResolver Sylius\Behat\Service\Resolver\CurrentPageResolverInterface
$notificationChecker Sylius\Behat\Service\NotificationCheckerInterface

iAddIt() public method

public iAddIt ( )

iChangeItsPriceTo() public method

public iChangeItsPriceTo ( $price )

iChooseCalculator() public method

public iChooseCalculator ( $calculatorName )

iClickGenerate() public method

public iClickGenerate ( )

iDeleteTheVariantOfProduct() public method

public iDeleteTheVariantOfProduct ( Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
$productVariant Sylius\Component\Core\Model\ProductVariantInterface

iDisableItsTracking() public method

public iDisableItsTracking ( )

iDoNetSetItsCurrentStockTo() public method

iEnableItsTracking() public method

public iEnableItsTracking ( )

iNameItIn() public method

public iNameItIn ( $name )

iRemoveItsNameFromTranslation() public method

iRemoveVariantFromTheList() public method

public iRemoveVariantFromTheList ( $nthVariant )

iRenameItTo() public method

public iRenameItTo ( $name )

iSaveMyChanges() public method

public iSaveMyChanges ( )

iSetItsDimensionsTo() public method

public iSetItsDimensionsTo ( $value )

iSetItsOptionAs() public method

public iSetItsOptionAs ( $optionName, $optionValue )

iSetItsPriceTo() public method

public iSetItsPriceTo ( $price = null, $channel = null )

iSetItsPriceToForCurrencyAndChannel() public method

public iSetItsPriceToForCurrencyAndChannel ( $price, Sylius\Component\Currency\Model\CurrencyInterface $currency, Sylius\Component\Core\Model\ChannelInterface $channel )
$currency Sylius\Component\Currency\Model\CurrencyInterface
$channel Sylius\Component\Core\Model\ChannelInterface

iSetItsShippingCategoryAs() public method

public iSetItsShippingCategoryAs ( $shippingCategoryName )

iShouldBeNotifiedOfFailure() public method

iShouldBeNotifiedThatCodeHasToBeUnique() public method

iShouldBeNotifiedThatCodeIsRequiredForVariant() public method

iShouldBeNotifiedThatIsHeightWidthDepthWeightCannotBeLowerThan() public method

iShouldBeNotifiedThatIsRequired() public method

public iShouldBeNotifiedThatIsRequired ( $element )

iShouldBeNotifiedThatItHasBeenSuccessfullyGenerated() public method

iShouldBeNotifiedThatOnHandIsRequired() public method

iShouldBeNotifiedThatPriceCannotBeLowerThen() public method

iShouldBeNotifiedThatPricesInAllChannelsMustBeDefined() public method

iShouldBeNotifiedThatPricesInAllChannelsMustBeDefinedForTheVariant() public method

iShouldBeNotifiedThatThisVariantAlreadyExists() public method

iShouldSeeProductVariantsInTheList() public method

public iShouldSeeProductVariantsInTheList ( $numberOfProductVariants )

iShouldSeeThatIsNotTracked() public method

public iShouldSeeThatIsNotTracked ( Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
$productVariant Sylius\Component\Core\Model\ProductVariantInterface

iShouldSeeThatTheVariantHasZeroOnHandQuantity() public method

public iShouldSeeThatTheVariantHasZeroOnHandQuantity ( Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
$productVariant Sylius\Component\Core\Model\ProductVariantInterface

iSpecifyItsCodeAs() public method

public iSpecifyItsCodeAs ( $code = null )

iSpecifyThereAreVariantsIdentifiedByCode() public method

public iSpecifyThereAreVariantsIdentifiedByCode ( $nthVariant, $code )

iSpecifyThereAreVariantsIdentifiedByCodeWithCost() public method

public iSpecifyThereAreVariantsIdentifiedByCodeWithCost ( $nthVariant, $code, $price, $channelName )

iSpecifyThereAreVariantsWithCost() public method

public iSpecifyThereAreVariantsWithCost ( $nthVariant, $price, $channelName )

iWantToCreateANewProduct() public method

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

iWantToGenerateNewVariantsForThisProduct() public method

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

iWantToModifyAProduct() public method

public iWantToModifyAProduct ( Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
$productVariant Sylius\Component\Core\Model\ProductVariantInterface

iWantToViewAllVariantsOfThisProduct() public method

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

productShouldExistInTheProductCatalog() public method

public productShouldExistInTheProductCatalog ( Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
$productVariant Sylius\Component\Core\Model\ProductVariantInterface

productVariantShouldNotExist() public method

public productVariantShouldNotExist ( Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
$productVariant Sylius\Component\Core\Model\ProductVariantInterface

theCodeFieldShouldBeDisabled() public method

theProductForCurrencyAndChannelShouldBePricedAt() public method

public theProductForCurrencyAndChannelShouldBePricedAt ( Sylius\Component\Core\Model\ProductVariantInterface $productVariant, Sylius\Component\Currency\Model\CurrencyInterface $currency, Sylius\Component\Core\Model\ChannelInterface $channel, $price )
$productVariant Sylius\Component\Core\Model\ProductVariantInterface
$currency Sylius\Component\Currency\Model\CurrencyInterface
$channel Sylius\Component\Core\Model\ChannelInterface

theProductShouldHaveNoVariants() public method

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

theProductShouldHaveOnlyOneVariant() public method

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

theProductVariantShouldAppearInTheShop() public method

public theProductVariantShouldAppearInTheShop ( $productVariantCode, Sylius\Component\Core\Model\ProductInterface $product )
$product Sylius\Component\Core\Model\ProductInterface

theProductVariantShouldNotAppearInTheShop() public method

public theProductVariantShouldNotAppearInTheShop ( $productVariantCode, Sylius\Component\Core\Model\ProductInterface $product )
$product Sylius\Component\Core\Model\ProductInterface

theVariantOfProductShouldHaveItemsOnHand() public method

public theVariantOfProductShouldHaveItemsOnHand ( $productVariantName, Sylius\Component\Core\Model\ProductInterface $product, $quantity )
$product Sylius\Component\Core\Model\ProductInterface

theVariantOfProductShouldHaveItemsOnHold() public method

public theVariantOfProductShouldHaveItemsOnHold ( Sylius\Component\Core\Model\ProductVariantInterface $variant, Sylius\Component\Core\Model\ProductInterface $product, $amount )
$variant Sylius\Component\Core\Model\ProductVariantInterface
$product Sylius\Component\Core\Model\ProductInterface

theVariantWithCodeShouldBePricedAtForChannel() public method

public theVariantWithCodeShouldBePricedAtForChannel ( Sylius\Component\Core\Model\ProductVariantInterface $productVariant, $price, $channelName )
$productVariant Sylius\Component\Core\Model\ProductVariantInterface

thereShouldBeNoUnitsOfThisProductOnHold() public method

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

thisProductVariantShouldBeTracked() public method

public thisProductVariantShouldBeTracked ( Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
$productVariant Sylius\Component\Core\Model\ProductVariantInterface

thisProductVariantShouldNotBeTracked() public method

public thisProductVariantShouldNotBeTracked ( Sylius\Component\Core\Model\ProductVariantInterface $productVariant )
$productVariant Sylius\Component\Core\Model\ProductVariantInterface

thisVariantShouldHaveItemsOnHand() public method

public thisVariantShouldHaveItemsOnHand ( $productVariantName, $quantity )

thisVariantShouldHaveItemsOnHold() public method

public thisVariantShouldHaveItemsOnHold ( Sylius\Component\Core\Model\ProductVariantInterface $variant, $amount )
$variant Sylius\Component\Core\Model\ProductVariantInterface

unitsOfThisProductShouldBeOnHand() public method

public unitsOfThisProductShouldBeOnHand ( $quantity, Sylius\Component\Core\Model\ProductInterface $product )
$product Sylius\Component\Core\Model\ProductInterface

unitsOfThisProductShouldBeOnHold() public method

public unitsOfThisProductShouldBeOnHold ( $quantity, Sylius\Component\Core\Model\ProductInterface $product )
$product Sylius\Component\Core\Model\ProductInterface