diff --git a/features/channel/managing_channels/selecting_payment_methods_available_for_channel.feature b/features/channel/managing_channels/selecting_payment_methods_available_for_channel.feature deleted file mode 100644 index 5068f68a28..0000000000 --- a/features/channel/managing_channels/selecting_payment_methods_available_for_channel.feature +++ /dev/null @@ -1,32 +0,0 @@ -@managing_channels -Feature: Selecting available payment methods for a channel - In order to give an opportunity of choosing different payment methods to customers - As an Administrator - I want to be able to select available payment methods - - Background: - Given the store has currency "Euro" - And the store has locale "English (United States)" - And the store has a payment method "Offline" with a code "OFF" - And I am logged in as an administrator - - @ui - Scenario: Adding a new channel with payment methods - Given I want to create a new channel - When I specify its code as MOBILE - And I name it "Mobile store" - And I select the "Offline" payment method - And I choose "Euro" as a default currency - And I choose "English (United States)" as a default locale - And I add it - Then I should be notified that it has been successfully created - And the "Offline" payment method should be available for the "Mobile store" channel - - @ui - Scenario: Adding payment methods to an existing channel - Given the store operates on a channel named "Web store" - And I want to modify this channel - When I select the "Offline" payment method - And I save my changes - Then I should be notified that it has been successfully edited - And the "Offline" payment method should be available for the "Web store" channel diff --git a/features/channel/managing_channels/selecting_shipping_methods_available_for_channel.feature b/features/channel/managing_channels/selecting_shipping_methods_available_for_channel.feature deleted file mode 100644 index 25a88b6222..0000000000 --- a/features/channel/managing_channels/selecting_shipping_methods_available_for_channel.feature +++ /dev/null @@ -1,33 +0,0 @@ -@managing_channels -Feature: Selecting available shipping methods for a channel - In order to give an opportunity of choosing different shipping methods to customer - As an Administrator - I want to be able to select available shipping methods - - Background: - Given the store operates on a single channel in "United States" - And the store has currency "Euro" - And the store has locale "English (United States)" - And the store allows shipping with "UPS Carrier" identified by "UPS_CARRIER" - And I am logged in as an administrator - - @ui - Scenario: Adding a new channel with shipping methods - Given I want to create a new channel - When I specify its code as MOBILE - And I name it "Mobile store" - And I select the "UPS Carrier" shipping method - And I choose "Euro" as a default currency - And I choose "English (United States)" as a default locale - And I add it - Then I should be notified that it has been successfully created - And the "UPS Carrier" shipping method should be available for the "Mobile store" channel - - @ui - Scenario: Adding shipping methods to an existing channel - Given the store operates on a channel named "Web store" - And I want to modify this channel - When I select the "UPS Carrier" shipping method - And I save my changes - Then I should be notified that it has been successfully edited - And the "UPS Carrier" shipping method should be available for the "Web store" channel diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php index 611169ab9c..4c89fb12da 100644 --- a/src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php +++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php @@ -415,39 +415,6 @@ final class ManagingChannelsContext implements Context ); } - /** - * @When I select the :shippingMethodName shipping method - */ - public function iSelectTheShippingMethod($shippingMethodName) - { - $currentPage = $this->currentPageResolver->getCurrentPageWithForm([$this->createPage, $this->updatePage]); - - $currentPage->chooseShippingMethod($shippingMethodName); - } - - /** - * @Then the :shippingMethodName shipping method should be available for the :channel channel - */ - public function theShippingMethodShouldBeAvailableForTheChannel($shippingMethodName, ChannelInterface $channel) - { - $this->updatePage->open(['id' => $channel->getId()]); - - Assert::true( - $this->updatePage->isShippingMethodChosen($shippingMethodName), - sprintf('Shipping method %s should be selected but it is not', $shippingMethodName) - ); - } - - /** - * @When I select the :paymentMethodName payment method - */ - public function iSelectThePaymentMethod($paymentMethodName) - { - $currentPage = $this->currentPageResolver->getCurrentPageWithForm([$this->createPage, $this->updatePage]); - - $currentPage->choosePaymentMethod($paymentMethodName); - } - /** * @When I select the :taxZone as default tax zone */ @@ -476,19 +443,6 @@ final class ManagingChannelsContext implements Context $currentPage->chooseTaxCalculationStrategy($taxCalculationStrategy); } - /** - * @Then the :paymentMethodName payment method should be available for the :channel channel - */ - public function thePaymentMethodShouldBeAvailableForTheChannel($paymentMethodName, ChannelInterface $channel) - { - $this->updatePage->open(['id' => $channel->getId()]); - - Assert::true( - $this->updatePage->isPaymentMethodChosen($paymentMethodName), - sprintf('Payment method %s should be selected, but it is not', $paymentMethodName) - ); - } - /** * @Then the default tax zone for the :channel channel should be :taxZone */ diff --git a/src/Sylius/Behat/Page/Admin/Channel/CreatePage.php b/src/Sylius/Behat/Page/Admin/Channel/CreatePage.php index df232a5d23..408228ac4a 100644 --- a/src/Sylius/Behat/Page/Admin/Channel/CreatePage.php +++ b/src/Sylius/Behat/Page/Admin/Channel/CreatePage.php @@ -59,22 +59,6 @@ class CreatePage extends BaseCreatePage implements CreatePageInterface $this->getDocument()->selectFieldOption('Locales', $language); } - /** - * {@inheritdoc} - */ - public function chooseShippingMethod($shippingMethod) - { - $this->getDocument()->selectFieldOption('Shipping Methods', $shippingMethod); - } - - /** - * {@inheritdoc} - */ - public function choosePaymentMethod($paymentMethod) - { - $this->getDocument()->selectFieldOption('Payment Methods', $paymentMethod); - } - /** * {@inheritdoc} */ diff --git a/src/Sylius/Behat/Page/Admin/Channel/CreatePageInterface.php b/src/Sylius/Behat/Page/Admin/Channel/CreatePageInterface.php index 98481d3312..90cb35709e 100644 --- a/src/Sylius/Behat/Page/Admin/Channel/CreatePageInterface.php +++ b/src/Sylius/Behat/Page/Admin/Channel/CreatePageInterface.php @@ -57,16 +57,6 @@ interface CreatePageInterface extends BaseCreatePageInterface */ public function chooseCurrency($currencyCode); - /** - * @param string $shippingMethod - */ - public function chooseShippingMethod($shippingMethod); - - /** - * @param string $paymentMethod - */ - public function choosePaymentMethod($paymentMethod); - /** * @param string $taxZone */ diff --git a/src/Sylius/Behat/Page/Admin/Channel/UpdatePage.php b/src/Sylius/Behat/Page/Admin/Channel/UpdatePage.php index 66b6364a47..63537c89ce 100644 --- a/src/Sylius/Behat/Page/Admin/Channel/UpdatePage.php +++ b/src/Sylius/Behat/Page/Admin/Channel/UpdatePage.php @@ -72,30 +72,6 @@ class UpdatePage extends BaseUpdatePage implements UpdatePageInterface return $this->getElement('currencies')->find('named', array('option', $currencyCode))->hasAttribute('selected'); } - /** - * {@inheritdoc} - */ - public function chooseShippingMethod($shippingMethod) - { - $this->getDocument()->selectFieldOption('Shipping Methods', $shippingMethod); - } - - /** - * {@inheritdoc} - */ - public function isShippingMethodChosen($shippingMethod) - { - return $this->getElement('shipping_methods')->find('named', array('option', $shippingMethod))->hasAttribute('selected'); - } - - /** - * {@inheritdoc} - */ - public function choosePaymentMethod($paymentMethod) - { - $this->getDocument()->selectFieldOption('Payment Methods', $paymentMethod); - } - /** * {@inheritdoc} */ @@ -112,14 +88,6 @@ class UpdatePage extends BaseUpdatePage implements UpdatePageInterface $this->getDocument()->selectFieldOption('Tax calculation strategy', $taxZone); } - /** - * {@inheritdoc} - */ - public function isPaymentMethodChosen($paymentMethod) - { - return $this->getElement('payment_methods')->find('named', array('option', $paymentMethod))->hasAttribute('selected'); - } - /** * {@inheritdoc} */ @@ -176,8 +144,6 @@ class UpdatePage extends BaseUpdatePage implements UpdatePageInterface 'enabled' => '#sylius_channel_enabled', 'locales' => '#sylius_channel_locales', 'name' => '#sylius_channel_name', - 'payment_methods' => '#sylius_channel_paymentMethods', - 'shipping_methods' => '#sylius_channel_shippingMethods', 'tax_calculation_strategy' => '#sylius_channel_taxCalculationStrategy', ]); } diff --git a/src/Sylius/Behat/Page/Admin/Channel/UpdatePageInterface.php b/src/Sylius/Behat/Page/Admin/Channel/UpdatePageInterface.php index f27886d859..c2bee456e1 100644 --- a/src/Sylius/Behat/Page/Admin/Channel/UpdatePageInterface.php +++ b/src/Sylius/Behat/Page/Admin/Channel/UpdatePageInterface.php @@ -62,23 +62,6 @@ interface UpdatePageInterface extends BaseUpdatePageInterface */ public function isCurrencyChosen($currencyCode); - /** - * @param string $shippingMethod - */ - public function chooseShippingMethod($shippingMethod); - - /** - * @param string $shippingMethod - * - * @return bool - */ - public function isShippingMethodChosen($shippingMethod); - - /** - * @param string $paymentMethod - */ - public function choosePaymentMethod($paymentMethod); - /** * @param string $taxZone */ @@ -89,13 +72,6 @@ interface UpdatePageInterface extends BaseUpdatePageInterface */ public function chooseTaxCalculationStrategy($taxCalculationStrategy); - /** - * @param string $paymentMethod - * - * @return bool - */ - public function isPaymentMethodChosen($paymentMethod); - /** * @param string $taxZone * diff --git a/src/Sylius/Bundle/AdminBundle/Resources/views/Channel/_form.html.twig b/src/Sylius/Bundle/AdminBundle/Resources/views/Channel/_form.html.twig index b90b7eb12c..287cd2a1f9 100644 --- a/src/Sylius/Bundle/AdminBundle/Resources/views/Channel/_form.html.twig +++ b/src/Sylius/Bundle/AdminBundle/Resources/views/Channel/_form.html.twig @@ -29,8 +29,6 @@ {{ form_row(form.defaultLocale) }} {{ form_row(form.currencies) }} {{ form_row(form.defaultCurrency) }} - {{ form_row(form.shippingMethods) }} - {{ form_row(form.paymentMethods) }} {{ form_row(form.defaultTaxZone) }} {{ form_row(form.taxCalculationStrategy) }} diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/ChannelType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/ChannelType.php index e34b64463a..a659a939e4 100644 --- a/src/Sylius/Bundle/CoreBundle/Form/Type/ChannelType.php +++ b/src/Sylius/Bundle/CoreBundle/Form/Type/ChannelType.php @@ -59,14 +59,6 @@ class ChannelType extends BaseChannelType 'empty_data' => null, 'empty_value' => 'sylius.ui.no_theme', ]) - ->add('shippingMethods', 'sylius_shipping_method_choice', [ - 'label' => 'sylius.form.channel.shipping_methods', - 'multiple' => true, - ]) - ->add('paymentMethods', 'sylius_payment_method_choice', [ - 'label' => 'sylius.form.channel.payment_methods', - 'multiple' => true, - ]) ; } }