diff --git a/features/promotion/applying_catalog_promotions/applying_catalog_promotions_for_variant.feature b/features/promotion/applying_catalog_promotions/applying_catalog_promotions_for_variant.feature index 3a085d09e76d..2c09f62b3bb2 100644 --- a/features/promotion/applying_catalog_promotions/applying_catalog_promotions_for_variant.feature +++ b/features/promotion/applying_catalog_promotions/applying_catalog_promotions_for_variant.feature @@ -14,8 +14,8 @@ Feature: Applying catalog promotions for variants And this product has "PHP Mug" variant priced at "$5.00" And this product has "Kotlin Mug" variant priced at "$7.00" And there is a catalog promotion with "winter_sale" code and "Winter sale" name - And it will be applied on "PHP T-Shirt" variant - And it will reduce price by "30%" + And it applies on "PHP T-Shirt" variant + And it reduces price by "30%" @api Scenario: Applying simple catalog promotions diff --git a/features/promotion/applying_catalog_promotions/seeing_applied_catalog_promotion_on_variant.feature b/features/promotion/applying_catalog_promotions/seeing_applied_catalog_promotion_on_variant.feature index 47fa888921f7..b0f29b2ae0af 100644 --- a/features/promotion/applying_catalog_promotions/seeing_applied_catalog_promotion_on_variant.feature +++ b/features/promotion/applying_catalog_promotions/seeing_applied_catalog_promotion_on_variant.feature @@ -9,8 +9,8 @@ Feature: Seeing applied catalog promotions on variant And the store has a "T-Shirt" configurable product And this product has "PHP T-Shirt" variant priced at "$20.00" And there is a catalog promotion with "winter_sale" code and "Winter sale" name - And it will be applied on "PHP T-Shirt" variant - And it will reduce price by "50%" + And it applies on "PHP T-Shirt" variant + And it reduces price by "50%" @api Scenario: Seeing applied catalog promotion on variant diff --git a/features/promotion/applying_catalog_promotions/seeing_applied_catalog_promotions_on_variants_list.feature b/features/promotion/applying_catalog_promotions/seeing_applied_catalog_promotions_on_variants_list.feature index eeef0a7bf915..0cd62d5c2c32 100644 --- a/features/promotion/applying_catalog_promotions/seeing_applied_catalog_promotions_on_variants_list.feature +++ b/features/promotion/applying_catalog_promotions/seeing_applied_catalog_promotions_on_variants_list.feature @@ -11,8 +11,8 @@ Feature: Seeing applied catalog promotions on variants list And this product has "Kotlin T-Shirt" variant priced at "$40.00" And this product has "Python T-Shirt" variant priced at "$40.00" And there is a catalog promotion with "winter_sale" code and "Winter sale" name - And it will be applied on "PHP T-Shirt" variant - And it will reduce price by "50%" + And it applies on "PHP T-Shirt" variant + And it reduces price by "50%" @api Scenario: Seeing applied catalog promotion on variant diff --git a/features/promotion/managing_catalog_promotions/creating_catalog_promotion.feature b/features/promotion/managing_catalog_promotions/creating_catalog_promotion.feature index 527e8431ab42..62e357d617a0 100644 --- a/features/promotion/managing_catalog_promotions/creating_catalog_promotion.feature +++ b/features/promotion/managing_catalog_promotions/creating_catalog_promotion.feature @@ -26,8 +26,8 @@ Feature: Creating a catalog promotion And I name it "Winter sale" And I specify its label as "Winter -50%" in "English (United States)" And I describe it as "This promotion gives a 50% discount on all products" in "English (United States)" - And it applies on variants "PHP T-Shirt" variant and "Kotlin T-Shirt" variant - And it gives the "50%" percentage discount + And I add rule that applies on variants "PHP T-Shirt" variant and "Kotlin T-Shirt" variant + And I add action that gives the "50%" percentage discount And I add it Then there should be 1 new catalog promotion on the list And it should have "winter_sale" code and "Winter sale" name diff --git a/features/promotion/managing_catalog_promotions/editing_catalog_promotion.feature b/features/promotion/managing_catalog_promotions/editing_catalog_promotion.feature index a7a947804632..0eff980b3cfd 100644 --- a/features/promotion/managing_catalog_promotions/editing_catalog_promotion.feature +++ b/features/promotion/managing_catalog_promotions/editing_catalog_promotion.feature @@ -11,8 +11,8 @@ Feature: Editing catalog promotion And this product has "PHP T-Shirt" variant priced at "$20.00" And this product has "Kotlin T-Shirt" variant priced at "$40.00" And there is a catalog promotion with "christmas_sale" code and "Christmas sale" name - And it will be applied on "PHP T-Shirt" variant - And it will reduce price by "30%" + And it applies on "PHP T-Shirt" variant + And it reduces price by "30%" And I am logged in as an administrator @api @ui diff --git a/src/Sylius/Behat/Context/Api/Admin/ManagingCatalogPromotionsContext.php b/src/Sylius/Behat/Context/Api/Admin/ManagingCatalogPromotionsContext.php index f8edb99920e1..d05b5643bbd4 100644 --- a/src/Sylius/Behat/Context/Api/Admin/ManagingCatalogPromotionsContext.php +++ b/src/Sylius/Behat/Context/Api/Admin/ManagingCatalogPromotionsContext.php @@ -163,9 +163,9 @@ public function iWantToModifyACatalogPromotion(CatalogPromotionInterface $catalo } /** - * @When /^it gives the ("[^"]+") percentage discount$/ + * @When /^I add action that gives the ("[^"]+") percentage discount$/ */ - public function iGivesPercentageDistount(float $amount): void + public function iAddActionThatGivesThePercentageDiscount(float $amount): void { $actions = [[ 'type' => CatalogPromotionActionInterface::TYPE_PERCENTAGE_DISCOUNT, @@ -194,9 +194,9 @@ public function iBrowseCatalogPromotions(): void } /** - * @When /^it applies on variants ("[^"]+" variant) and ("[^"]+" variant)$/ + * @When /^I add rule that applies on variants ("[^"]+" variant) and ("[^"]+" variant)$/ */ - public function iAddTheRuleConfiguredWithProductAnd(ProductVariantInterface $firstVariant, ProductVariantInterface $secondVariant): void + public function iAddRuleThatAppliesOnVariants(ProductVariantInterface $firstVariant, ProductVariantInterface $secondVariant): void { $rules = [[ 'type' => CatalogPromotionRuleInterface::TYPE_FOR_VARIANTS, @@ -263,9 +263,9 @@ public function ISpecifyNonexistentCatalogPromotionRule(): void } /** - * @When I specify rule "For variants" with the wrong configuration + * @When I add for variants rule with the wrong configuration */ - public function iSpecifyRuleWithWrongConfiguration(): void + public function iAddForVariantsRuleWithTheWrongConfiguration(): void { $rules = [[ 'type' => CatalogPromotionRuleInterface::TYPE_FOR_VARIANTS, diff --git a/src/Sylius/Behat/Context/Setup/CatalogPromotionContext.php b/src/Sylius/Behat/Context/Setup/CatalogPromotionContext.php index 3bf53549ed88..0c4ce3cc83ea 100644 --- a/src/Sylius/Behat/Context/Setup/CatalogPromotionContext.php +++ b/src/Sylius/Behat/Context/Setup/CatalogPromotionContext.php @@ -85,9 +85,9 @@ public function theCatalogPromotionIsAvailableIn( } /** - * @Given /^(it) will be applied on ("[^"]+" variant)$/ + * @Given /^(it) applies on ("[^"]+" variant)$/ */ - public function itWillBeAppliedOnVariant(CatalogPromotionInterface $catalogPromotion, ProductVariantInterface $variant): void + public function itAppliesOnVariant(CatalogPromotionInterface $catalogPromotion, ProductVariantInterface $variant): void { /** @var CatalogPromotionRuleInterface $catalogPromotionRule */ $catalogPromotionRule = $this->catalogPromotionRuleFactory->createNew(); @@ -100,7 +100,7 @@ public function itWillBeAppliedOnVariant(CatalogPromotionInterface $catalogPromo } /** - * @Given /^(it) will reduce price by ("[^"]+")$/ + * @Given /^(it) reduces price by ("[^"]+")$/ */ public function itWillReducePrice(CatalogPromotionInterface $catalogPromotion, float $discount): void { diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php index 6406fed3e748..22bb86043a6d 100644 --- a/src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php +++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingCatalogPromotionsContext.php @@ -136,9 +136,9 @@ public function iMakeItUnavailableInChannel(string $channelName): void } /** - * @When /^it applies on variants ("[^"]+" variant) and ("[^"]+" variant)$/ + * @When /^I add rule that applies on variants ("[^"]+" variant) and ("[^"]+" variant)$/ */ - public function itAppliesOnVariants(ProductVariantInterface ...$variants): void + public function iAddRuleThatAppliesOnVariants(ProductVariantInterface ...$variants): void { $variantCodes = array_map(function(ProductVariantInterface $variant) { return $variant->getCode(); @@ -149,9 +149,9 @@ public function itAppliesOnVariants(ProductVariantInterface ...$variants): void } /** - * @When /^it gives the "([^"]+)%" percentage discount$/ + * @When I add action that gives the ":discount%" percentage discount */ - public function catalogPromotionGivesDiscount(string $discount): void + public function iAddActionThatGivesThePercentageDiscount(string $discount): void { $this->formElement->addAction(); $this->formElement->specifyLastActionDiscount($discount);