diff --git a/features/taxonomy/managing_taxons/adding_taxon_for_parent.feature b/features/taxonomy/managing_taxons/adding_taxon_for_parent.feature index a1b43e112f..164b94a325 100644 --- a/features/taxonomy/managing_taxons/adding_taxon_for_parent.feature +++ b/features/taxonomy/managing_taxons/adding_taxon_for_parent.feature @@ -9,7 +9,7 @@ Feature: Adding a new taxon for parent And the store has "Category" taxonomy And I am logged in as an administrator - @ui @todo + @ui Scenario: Adding a new taxon for specific parent taxon Given I want to create a new taxon for "Category" And I specify its code as "guns" diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingTaxonsContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingTaxonsContext.php index dab752fdb6..eae39a4f8c 100644 --- a/src/Sylius/Behat/Context/Ui/Admin/ManagingTaxonsContext.php +++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingTaxonsContext.php @@ -55,11 +55,14 @@ final class ManagingTaxonsContext implements Context /** * @Given I want to create a new taxon + * @Given I want to create a new taxon for :taxon * @Given I want to see all taxons in store */ - public function iWantToCreateANewTaxon() + public function iWantToCreateANewTaxon(TaxonInterface $taxon = null) { - $this->createPage->open(); + $parameters = (null !== $taxon) ? ['id' => $taxon->getId()] : []; + + $this->createPage->open($parameters); } /**