mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
[Channel][Admin] Remove selecting shipping and payments methods on channel
This commit is contained in:
parent
d4079b383d
commit
5cb509b487
9 changed files with 0 additions and 205 deletions
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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) }}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
])
|
||||
;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue