diff --git a/features/taxonomy/managing_taxons/taxon_image_unique_code_validation_within_taxon.feature b/features/taxonomy/managing_taxons/taxon_image_unique_code_validation_within_taxon.feature index 9212eb60de..3e6a0e4764 100644 --- a/features/taxonomy/managing_taxons/taxon_image_unique_code_validation_within_taxon.feature +++ b/features/taxonomy/managing_taxons/taxon_image_unique_code_validation_within_taxon.feature @@ -24,4 +24,4 @@ Feature: Taxon image unique code validation within a taxon And I attach the "mugs.jpg" image with a code "banner" And I try to save my changes Then I should be notified that the image with this code already exists - And there should still be only one image in this taxon + And there should still be only one image in the "T-Shirts" taxon diff --git a/src/Sylius/Behat/Context/Transform/TaxonContext.php b/src/Sylius/Behat/Context/Transform/TaxonContext.php index 92b5c1fc7d..dbaad08ec0 100644 --- a/src/Sylius/Behat/Context/Transform/TaxonContext.php +++ b/src/Sylius/Behat/Context/Transform/TaxonContext.php @@ -42,6 +42,7 @@ final class TaxonContext implements Context * @Transform /^parent taxon to "([^"]+)"$/ * @Transform /^taxon with "([^"]+)" name/ * @Transform /^taxon "([^"]+)"$/ + * @Transform :taxon */ public function getTaxonByName($name) { diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingTaxonsContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingTaxonsContext.php index 07711bf654..7a4a3464f0 100644 --- a/src/Sylius/Behat/Context/Ui/Admin/ManagingTaxonsContext.php +++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingTaxonsContext.php @@ -15,7 +15,6 @@ use Behat\Behat\Context\Context; use Sylius\Behat\Page\Admin\Taxon\CreatePageInterface; use Sylius\Behat\Page\Admin\Taxon\UpdatePageInterface; use Sylius\Behat\Service\Resolver\CurrentPageResolverInterface; -use Sylius\Behat\Service\SharedStorageInterface; use Sylius\Component\Core\Model\TaxonInterface; use Webmozart\Assert\Assert; @@ -24,11 +23,6 @@ use Webmozart\Assert\Assert; */ final class ManagingTaxonsContext implements Context { - /** - * @var SharedStorageInterface - */ - private $sharedStorage; - /** * @var CreatePageInterface */ @@ -45,18 +39,15 @@ final class ManagingTaxonsContext implements Context private $currentPageResolver; /** - * @param SharedStorageInterface $sharedStorage * @param CreatePageInterface $createPage * @param UpdatePageInterface $updatePage * @param CurrentPageResolverInterface $currentPageResolver */ public function __construct( - SharedStorageInterface $sharedStorage, CreatePageInterface $createPage, UpdatePageInterface $updatePage, CurrentPageResolverInterface $currentPageResolver ) { - $this->sharedStorage = $sharedStorage; $this->createPage = $createPage; $this->updatePage = $updatePage; $this->currentPageResolver = $currentPageResolver; @@ -76,8 +67,6 @@ final class ManagingTaxonsContext implements Context */ public function iWantToModifyATaxon(TaxonInterface $taxon) { - $this->sharedStorage->set('taxon', $taxon); - $this->updatePage->open(['id' => $taxon->getId()]); } @@ -391,7 +380,7 @@ final class ManagingTaxonsContext implements Context } /** - * @Then /^there should still be only one image in (this taxon)$/ + * @Then there should still be only one image in the :taxon taxon */ public function thereShouldStillBeOnlyOneImageInThisTaxon(TaxonInterface $taxon) { diff --git a/src/Sylius/Behat/Resources/config/services/contexts/ui.xml b/src/Sylius/Behat/Resources/config/services/contexts/ui.xml index ca96dadf1e..8bbbd8f3c4 100644 --- a/src/Sylius/Behat/Resources/config/services/contexts/ui.xml +++ b/src/Sylius/Behat/Resources/config/services/contexts/ui.xml @@ -186,7 +186,6 @@ - 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 1c6244e42c..0cb25a71b5 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 @@ -8,7 +8,6 @@ default: - sylius.behat.context.hook.doctrine_orm - sylius.behat.context.transform.locale - - sylius.behat.context.transform.shared_storage - sylius.behat.context.transform.taxon - sylius.behat.context.setup.locale