diff --git a/features/channel/managing_channels/adding_new_channel_with_menu_taxon.feature b/features/channel/managing_channels/adding_new_channel_with_menu_taxon.feature index 8158a6d414..c779be5c63 100644 --- a/features/channel/managing_channels/adding_new_channel_with_menu_taxon.feature +++ b/features/channel/managing_channels/adding_new_channel_with_menu_taxon.feature @@ -13,8 +13,8 @@ Feature: Adding a new channel with menu taxon @ui @javascript Scenario: Adding a new channel with menu taxon - Given I want to create a new channel - When I specify its code as "MOBILE" + When I want to create a new channel + And I specify its code as "MOBILE" And I name it "Mobile channel" And I specify menu taxon as "Clothes" And I add it diff --git a/features/taxonomy/managing_taxons/deleting_taxon.feature b/features/taxonomy/managing_taxons/deleting_taxon.feature index eb981a532c..e797b434a5 100644 --- a/features/taxonomy/managing_taxons/deleting_taxon.feature +++ b/features/taxonomy/managing_taxons/deleting_taxon.feature @@ -25,9 +25,9 @@ Feature: Deleting a taxon But the "Shovels" taxon should appear in the registry @ui @javascript - Scenario: Deleted taxon should disappear from the registry + Scenario: Being unable to delete a menu taxon of a channel Given the store classifies its products as "T-Shirts" and "Caps" And the store operates on a channel named "Web Store" And channel "Web Store" has menu taxon "Caps" - When I delete taxon named "Caps" + When I try to delete taxon named "Caps" Then I should be notified that I cannot delete a menu taxon of any channel diff --git a/src/Sylius/Behat/Context/Setup/ChannelContext.php b/src/Sylius/Behat/Context/Setup/ChannelContext.php index ad54e7b0e2..1f352e6886 100644 --- a/src/Sylius/Behat/Context/Setup/ChannelContext.php +++ b/src/Sylius/Behat/Context/Setup/ChannelContext.php @@ -228,7 +228,7 @@ final class ChannelContext implements Context } /** - * @Given /^(channel "[^"]+") has menu (taxon "[^"]+")$/ + * @Given channel :channel has menu taxon :taxon * @Given /^(this channel) has menu (taxon "[^"]+")$/ */ public function channelHasMenuTaxon(ChannelInterface $channel, TaxonInterface $taxon): void diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php index f7f1b6f024..276addd64e 100644 --- a/src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php +++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php @@ -534,7 +534,7 @@ final class ManagingChannelsContext implements Context /** * @Given /^(this channel) menu taxon should be "([^"]+)"$/ - * @Given /^the (channel "[^"]+") should have "([^"]+)" as a menu taxon$/ + * @Given the channel :channel should have :menuTaxon as a menu taxon */ public function thisChannelMenuTaxonShouldBe(ChannelInterface $channel, string $menuTaxon): void { diff --git a/src/Sylius/Behat/Context/Ui/Admin/RemovingTaxonContext.php b/src/Sylius/Behat/Context/Ui/Admin/RemovingTaxonContext.php index 3924c9fed0..3553b2e82e 100644 --- a/src/Sylius/Behat/Context/Ui/Admin/RemovingTaxonContext.php +++ b/src/Sylius/Behat/Context/Ui/Admin/RemovingTaxonContext.php @@ -36,6 +36,7 @@ final class RemovingTaxonContext implements Context /** * @When I remove taxon named :name * @When I delete taxon named :name + * @When I try to delete taxon named :name */ public function iRemoveTaxonNamed(string $name): void { diff --git a/src/Sylius/Bundle/CoreBundle/EventListener/TaxonDeletionListener.php b/src/Sylius/Bundle/CoreBundle/EventListener/TaxonDeletionListener.php index 07c41fb6fb..a75f76dd8b 100644 --- a/src/Sylius/Bundle/CoreBundle/EventListener/TaxonDeletionListener.php +++ b/src/Sylius/Bundle/CoreBundle/EventListener/TaxonDeletionListener.php @@ -26,7 +26,7 @@ final class TaxonDeletionListener /** @var SessionInterface */ private $session; - /** @var ChannelRepositoryInterface $channelRepository */ + /** @var ChannelRepositoryInterface */ private $channelRepository; /** @var TaxonAwareRuleUpdaterInterface[] */