mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
[Behat][TaxonImage] Fix after PR review
This commit is contained in:
parent
a2f73828a4
commit
4fa0b74e18
5 changed files with 3 additions and 15 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -186,7 +186,6 @@
|
|||
</service>
|
||||
|
||||
<service id="sylius.behat.context.ui.admin.managing_taxons" class="Sylius\Behat\Context\Ui\Admin\ManagingTaxonsContext" scope="scenario">
|
||||
<argument type="service" id="sylius.behat.shared_storage" />
|
||||
<argument type="service" id="sylius.behat.page.admin.taxon.create" />
|
||||
<argument type="service" id="sylius.behat.page.admin.taxon.update" />
|
||||
<argument type="service" id="sylius.behat.current_page_resolver" />
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue