diff --git a/features/taxonomy/managing_taxons/reordering_taxon.feature b/features/taxonomy/managing_taxons/reordering_taxon.feature index 0b9ac21fcd..39ba2d0211 100644 --- a/features/taxonomy/managing_taxons/reordering_taxon.feature +++ b/features/taxonomy/managing_taxons/reordering_taxon.feature @@ -15,10 +15,3 @@ Feature: Reordering taxons Then I should see 4 taxons on the list And I should see the taxon named "T-Shirts" in the list But the first taxon on the list should be "Watches" - - @ui @javascript - Scenario: Changing order of the taxons by dragging - When I want to see all taxons in store - And I move "Wallets" taxon before "T-shirts" taxon - Then I should see 4 taxons on the list - And they should have order like "Wallets", "T-Shirts", "Watches" and "Belts" diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingTaxonsContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingTaxonsContext.php index cb0348039d..5f0476ccb3 100644 --- a/src/Sylius/Behat/Context/Ui/Admin/ManagingTaxonsContext.php +++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingTaxonsContext.php @@ -181,14 +181,6 @@ final class ManagingTaxonsContext implements Context $this->createPage->moveUp($taxon); } - /** - * @When /^I move ("[^"]+" taxon) before ("[^"]+" taxon)$/ - */ - public function iMoveTaxonBeforeTaxon(TaxonInterface $taxonToMove, TaxonInterface $targetTaxon) - { - $this->createPage->insertBefore($taxonToMove, $targetTaxon); - } - /** * @Given /^I choose ("[^"]+" as a parent taxon)$/ */ diff --git a/src/Sylius/Behat/Page/Admin/Taxon/CreatePage.php b/src/Sylius/Behat/Page/Admin/Taxon/CreatePage.php index 260f93915f..13f43b3a90 100644 --- a/src/Sylius/Behat/Page/Admin/Taxon/CreatePage.php +++ b/src/Sylius/Behat/Page/Admin/Taxon/CreatePage.php @@ -156,30 +156,6 @@ class CreatePage extends BaseCreatePage implements CreatePageInterface return $this->getLeaves($parentTaxon)[0]->getText(); } - /** - * {@inheritDoc} - */ - public function insertBefore(TaxonInterface $draggableTaxon, TaxonInterface $targetTaxon) - { - $seleniumDriver = $this->getSeleniumDriver(); - $draggableTaxonLocator = sprintf('.item[data-id="%s"]', $draggableTaxon->getId()); - $targetTaxonLocator = sprintf('.item[data-id="%s"]', $targetTaxon->getId()); - - $script = <<executeScript($script); - $this->getDocument()->waitFor(5, function () use ($draggableTaxonLocator) { - return !$this->getDocument()->find('css', $draggableTaxonLocator)->hasClass('dragging-started'); - }); - } - /** * {@inheritdoc} */ @@ -262,22 +238,6 @@ JS; return end($items); } - /** - * @return Selenium2Driver - * - * @throws UnsupportedDriverActionException - */ - private function getSeleniumDriver() - { - /** @var Selenium2Driver $driver */ - $driver = $this->getDriver(); - if (!$driver instanceof Selenium2Driver) { - throw new UnsupportedDriverActionException('This action is not supported by %s', $driver); - } - - return $driver; - } - private function waitForSlugGenerationIfNecessary() { if ($this->getDriver() instanceof Selenium2Driver) { diff --git a/src/Sylius/Behat/Page/Admin/Taxon/CreatePageInterface.php b/src/Sylius/Behat/Page/Admin/Taxon/CreatePageInterface.php index c831a10881..2fd34be484 100644 --- a/src/Sylius/Behat/Page/Admin/Taxon/CreatePageInterface.php +++ b/src/Sylius/Behat/Page/Admin/Taxon/CreatePageInterface.php @@ -98,12 +98,6 @@ interface CreatePageInterface extends BaseCreatePageInterface */ public function getFirstLeafName(TaxonInterface $parentTaxon = null); - /** - * @param TaxonInterface $draggableTaxon - * @param TaxonInterface $targetTaxon - */ - public function insertBefore(TaxonInterface $draggableTaxon, TaxonInterface $targetTaxon); - /** * @param TaxonInterface|null $parentTaxon * diff --git a/src/Sylius/Bundle/AdminBundle/Gulpfile.js b/src/Sylius/Bundle/AdminBundle/Gulpfile.js index 37621791aa..6064ab7c8d 100644 --- a/src/Sylius/Bundle/AdminBundle/Gulpfile.js +++ b/src/Sylius/Bundle/AdminBundle/Gulpfile.js @@ -24,10 +24,7 @@ var paths = { '../ShippingBundle/Resources/public/js/**', '../UiBundle/Resources/private/js/**', '../UserBundle/Resources/public/js/sylius-user.js', - 'Resources/private/js/**', - '../../../../node_modules/jquery-simulate-ext/libs/jquery.simulate.js', - '../../../../node_modules/jquery-simulate-ext/src/jquery.simulate.ext.js', - '../../../../node_modules/jquery-simulate-ext/src/jquery.simulate.drag-n-drop.js' + 'Resources/private/js/**' ], sass: [ '../UiBundle/Resources/private/sass/**'