From a3e81518e1c4e957e01517d19912a63ebd936c92 Mon Sep 17 00:00:00 2001 From: Rafikooo Date: Fri, 28 Apr 2023 01:43:37 +0200 Subject: [PATCH] Revert "[Behat] Describe scenario for messing up products assignments after trying to delete taxon This reverts commit baa01c01 --- ...taxon_after_trying_to_delete_taxon.feature | 29 ------------------- .../Behat/Context/Ui/Shop/ProductContext.php | 24 --------------- .../suites/ui/taxonomy/managing_taxons.yml | 6 +--- 3 files changed, 1 insertion(+), 58 deletions(-) delete mode 100644 features/taxonomy/managing_taxons/displaying_products_in_proper_taxon_after_trying_to_delete_taxon.feature diff --git a/features/taxonomy/managing_taxons/displaying_products_in_proper_taxon_after_trying_to_delete_taxon.feature b/features/taxonomy/managing_taxons/displaying_products_in_proper_taxon_after_trying_to_delete_taxon.feature deleted file mode 100644 index 5bdf105d74..0000000000 --- a/features/taxonomy/managing_taxons/displaying_products_in_proper_taxon_after_trying_to_delete_taxon.feature +++ /dev/null @@ -1,29 +0,0 @@ -@managing_taxons -Feature: Displaying products in proper taxon after trying to delete this taxon - In order not to mess up the products to taxons assignments - As an Administrator - I want to keep the taxons structure the same after failed taxon deletion - - Background: - Given the store operates on a channel named "Web" - And the store classifies its products as "T-Shirts" - And the "T-Shirts" taxon has children taxon "Men" and "Women" - And the store has a product "T-Shirt Coconut" available in "Web" channel - And this product belongs to "T-Shirts" - And the store has a product "T-Shirt Banana" available in "Web" channel - And this product belongs to "Men" - And the product "T-Shirt Banana" has a main taxon "Men" - And the store has a product "T-Shirt Apple" available in "Web" channel - And this product belongs to "Men" - And the store has a product "T-Shirt Pear" available in "Web" channel - And this product belongs to "Women" - And the store has a product "T-Shirt Watermelon" available in "Web" channel - And this product belongs to "Women" - And I am logged in as an administrator - - @ui @javascript - Scenario: Displaying products in proper taxon after trying to delete this taxon - When I try to delete taxon named "Men" - Then I should be notified that I cannot delete a taxon in use - And I should see in taxon "Men" in the store products "T-Shirt Banana" and "T-Shirt Apple" - But I should not see in taxon "Men" in the store products "T-Shirt Pear" and "T-Shirt Watermelon" diff --git a/src/Sylius/Behat/Context/Ui/Shop/ProductContext.php b/src/Sylius/Behat/Context/Ui/Shop/ProductContext.php index e734f15b51..f3807f6ac7 100644 --- a/src/Sylius/Behat/Context/Ui/Shop/ProductContext.php +++ b/src/Sylius/Behat/Context/Ui/Shop/ProductContext.php @@ -260,30 +260,6 @@ final class ProductContext implements Context Assert::false($this->indexPage->isProductOnList($productName)); } - /** - * @Then I should see in taxon :taxon in the store products :firstProductName and :secondProductName - */ - public function iShouldSeeInTaxonInTheStoreProducts(TaxonInterface $taxon, string ...$productNames): void - { - $this->iCheckListOfProductsForTaxon($taxon); - - foreach ($productNames as $productName) { - Assert::true($this->indexPage->isProductOnList($productName)); - } - } - - /** - * @Then I should not see in taxon :taxon in the store products :firstProductName and :secondProductName - */ - public function iShouldNotSeeInTaxonInTheStoreProducts(TaxonInterface $taxon, string ...$productNames): void - { - $this->iCheckListOfProductsForTaxon($taxon); - - foreach ($productNames as $productName) { - Assert::false($this->indexPage->isProductOnList($productName)); - } - } - /** * @Then I should see empty list of products */ diff --git a/src/Sylius/Behat/Resources/config/suites/ui/taxonomy/managing_taxons.yml b/src/Sylius/Behat/Resources/config/suites/ui/taxonomy/managing_taxons.yml index 6249dddba2..720ffdd80d 100644 --- a/src/Sylius/Behat/Resources/config/suites/ui/taxonomy/managing_taxons.yml +++ b/src/Sylius/Behat/Resources/config/suites/ui/taxonomy/managing_taxons.yml @@ -10,21 +10,17 @@ default: - sylius.behat.context.transform.channel - sylius.behat.context.transform.locale - - sylius.behat.context.transform.product - sylius.behat.context.transform.shared_storage - sylius.behat.context.transform.taxon - - sylius.behat.context.setup.admin_security - sylius.behat.context.setup.channel - sylius.behat.context.setup.locale - - sylius.behat.context.setup.product - - sylius.behat.context.setup.product_taxon + - sylius.behat.context.setup.admin_security - sylius.behat.context.setup.taxonomy - sylius.behat.context.ui.admin.managing_taxons - sylius.behat.context.ui.admin.removing_taxons - sylius.behat.context.ui.admin.notification - - sylius.behat.context.ui.shop.product filters: tags: "@managing_taxons&&@ui"