diff --git a/etc/behat/suites/ui/channel/managing_channels.yml b/etc/behat/suites/ui/channel/managing_channels.yml index 660fcf1910..83b7e97bbf 100644 --- a/etc/behat/suites/ui/channel/managing_channels.yml +++ b/etc/behat/suites/ui/channel/managing_channels.yml @@ -9,6 +9,7 @@ default: - sylius.behat.context.transform.channel - sylius.behat.context.transform.currency + - sylius.behat.context.transform.locale - sylius.behat.context.transform.shared_storage - sylius.behat.context.setup.channel diff --git a/etc/behat/suites/ui/locale/managing_locales.yml b/etc/behat/suites/ui/locale/managing_locales.yml index 35b90934bb..5eae8ea106 100644 --- a/etc/behat/suites/ui/locale/managing_locales.yml +++ b/etc/behat/suites/ui/locale/managing_locales.yml @@ -7,6 +7,7 @@ default: contexts_as_services: - sylius.behat.context.hook.doctrine_orm + - sylius.behat.context.transform.locale - sylius.behat.context.transform.shared_storage - sylius.behat.context.setup.locale diff --git a/etc/behat/suites/ui/payment/managing_payment_methods.yml b/etc/behat/suites/ui/payment/managing_payment_methods.yml index b7e943a4a7..5b434fa77c 100644 --- a/etc/behat/suites/ui/payment/managing_payment_methods.yml +++ b/etc/behat/suites/ui/payment/managing_payment_methods.yml @@ -8,6 +8,7 @@ default: - sylius.behat.context.hook.doctrine_orm - sylius.behat.context.setup.channel + - sylius.behat.context.setup.locale - sylius.behat.context.setup.payment - sylius.behat.context.setup.security diff --git a/etc/behat/suites/ui/product/managing_product_options.yml b/etc/behat/suites/ui/product/managing_product_options.yml index eb7079692d..3afcfd6804 100644 --- a/etc/behat/suites/ui/product/managing_product_options.yml +++ b/etc/behat/suites/ui/product/managing_product_options.yml @@ -12,7 +12,7 @@ default: - sylius.behat.context.transform.product_option - sylius.behat.context.transform.shared_storage - - sylius.behat.context.setup.channel + - sylius.behat.context.setup.locale - sylius.behat.context.setup.product_option - sylius.behat.context.setup.security diff --git a/etc/behat/suites/ui/shipping/managing_shipping_methods.yml b/etc/behat/suites/ui/shipping/managing_shipping_methods.yml index 2a09bd917b..ac5809ed43 100644 --- a/etc/behat/suites/ui/shipping/managing_shipping_methods.yml +++ b/etc/behat/suites/ui/shipping/managing_shipping_methods.yml @@ -8,15 +8,17 @@ default: - sylius.behat.context.hook.doctrine_orm - sylius.behat.context.transform.addressing + - sylius.behat.context.transform.currency - sylius.behat.context.transform.customer + - sylius.behat.context.transform.locale - sylius.behat.context.transform.payment - sylius.behat.context.transform.product - sylius.behat.context.transform.shared_storage - sylius.behat.context.transform.shipping_method - - sylius.behat.context.transform.locale - sylius.behat.context.setup.channel - sylius.behat.context.setup.currency + - sylius.behat.context.setup.locale - sylius.behat.context.setup.order - sylius.behat.context.setup.payment - sylius.behat.context.setup.product diff --git a/etc/behat/suites/ui/taxonomy/managing_taxons.yml b/etc/behat/suites/ui/taxonomy/managing_taxons.yml index 24191cab98..f4ad664ceb 100644 --- a/etc/behat/suites/ui/taxonomy/managing_taxons.yml +++ b/etc/behat/suites/ui/taxonomy/managing_taxons.yml @@ -10,7 +10,7 @@ default: - sylius.behat.context.transform.locale - sylius.behat.context.transform.taxon - - sylius.behat.context.setup.channel + - sylius.behat.context.setup.locale - sylius.behat.context.setup.security - sylius.behat.context.setup.taxonomy diff --git a/features/currency/managing_currency/browsing_currencies.feature b/features/currency/managing_currency/browsing_currencies.feature index 876cacf928..a2cb45c5cc 100644 --- a/features/currency/managing_currency/browsing_currencies.feature +++ b/features/currency/managing_currency/browsing_currencies.feature @@ -5,11 +5,11 @@ Feature: Browsing currencies I want to browse currencies Background: - Given the store has currency "Euro", "British Pound Sterling" and "US Dollar" + Given the store has currency "Euro", "British Pound Sterling" And I am logged in as an administrator @ui Scenario: Browsing currencies in store Given I browse currencies of the store - Then I should see 3 currencies in the list + Then I should see 2 currencies in the list And I should see the currency "British Pound Sterling" in the list diff --git a/features/payment/managing_payment_methods/adding_payment_method.feature b/features/payment/managing_payment_methods/adding_payment_method.feature index c81afc8fe2..6fbc98661e 100644 --- a/features/payment/managing_payment_methods/adding_payment_method.feature +++ b/features/payment/managing_payment_methods/adding_payment_method.feature @@ -5,7 +5,7 @@ Feature: Adding a new payment method I want to add a new payment method to the registry Background: - Given the store operates on a single channel in "France" + Given the store is available in "English (United States)" And I am logged in as an administrator @ui diff --git a/features/product/managing_product_attributes/adding_checkbox_product_attribute.feature b/features/product/managing_product_attributes/adding_checkbox_product_attribute.feature index ccb7142926..c3aed8f873 100644 --- a/features/product/managing_product_attributes/adding_checkbox_product_attribute.feature +++ b/features/product/managing_product_attributes/adding_checkbox_product_attribute.feature @@ -5,7 +5,7 @@ Feature: Adding a new checkbox product attribute I want to add a new checkbox product attribute Background: - Given the store has locale "English (United States)" + Given the store is available in "English (United States)" And I am logged in as an administrator @ui diff --git a/features/product/managing_product_attributes/adding_integer_product_attribute.feature b/features/product/managing_product_attributes/adding_integer_product_attribute.feature index dfe31fd597..7422a5252a 100644 --- a/features/product/managing_product_attributes/adding_integer_product_attribute.feature +++ b/features/product/managing_product_attributes/adding_integer_product_attribute.feature @@ -5,7 +5,7 @@ Feature: Adding a new integer product attribute I want to add a new integer product attribute Background: - Given the store has locale "English (United States)" + Given the store is available in "English (United States)" And I am logged in as an administrator @ui diff --git a/features/product/managing_product_attributes/adding_percent_product_attribute.feature b/features/product/managing_product_attributes/adding_percent_product_attribute.feature index caf718d4be..aaf3d02ebd 100644 --- a/features/product/managing_product_attributes/adding_percent_product_attribute.feature +++ b/features/product/managing_product_attributes/adding_percent_product_attribute.feature @@ -5,7 +5,7 @@ Feature: Adding a new percent product attribute I want to add a new percent product attribute Background: - Given the store has locale "English (United States)" + Given the store is available in "English (United States)" And I am logged in as an administrator @ui diff --git a/features/product/managing_product_attributes/adding_text_product_attribute.feature b/features/product/managing_product_attributes/adding_text_product_attribute.feature index 2e2a1dba70..9d14b7693c 100644 --- a/features/product/managing_product_attributes/adding_text_product_attribute.feature +++ b/features/product/managing_product_attributes/adding_text_product_attribute.feature @@ -5,7 +5,7 @@ Feature: Adding a new text product attribute I want to add a new text product attribute Background: - Given the store has locale "English (United States)" + Given the store is available in "English (United States)" And I am logged in as an administrator @ui diff --git a/features/product/managing_product_attributes/adding_textarea_product_attribute.feature b/features/product/managing_product_attributes/adding_textarea_product_attribute.feature index 3fc4b560d2..fd41d8a153 100644 --- a/features/product/managing_product_attributes/adding_textarea_product_attribute.feature +++ b/features/product/managing_product_attributes/adding_textarea_product_attribute.feature @@ -5,7 +5,7 @@ Feature: Adding a new textarea product attribute I want to add a new textarea product attribute Background: - Given the store has locale "English (United States)" + Given the store is available in "English (United States)" And I am logged in as an administrator @ui diff --git a/features/product/managing_product_attributes/edit_text_product_attribute.feature b/features/product/managing_product_attributes/edit_text_product_attribute.feature index 83538625f4..ad87db0dce 100644 --- a/features/product/managing_product_attributes/edit_text_product_attribute.feature +++ b/features/product/managing_product_attributes/edit_text_product_attribute.feature @@ -5,7 +5,7 @@ Feature: Text product attribute edition I want to be able to edit a text product attribute Background: - Given the store has locale "English (United States)" + Given the store is available in "English (United States)" And I am logged in as an administrator @ui diff --git a/features/product/managing_product_attributes/product_attribute_unique_code_validation.feature b/features/product/managing_product_attributes/product_attribute_unique_code_validation.feature index 8f479393bd..94cbe1b31a 100644 --- a/features/product/managing_product_attributes/product_attribute_unique_code_validation.feature +++ b/features/product/managing_product_attributes/product_attribute_unique_code_validation.feature @@ -5,7 +5,7 @@ Feature: Product attribute unique code validation I want to be prevented from adding a new product attribute with taken code Background: - Given the store has locale "English (United States)" + Given the store is available in "English (United States)" And I am logged in as an administrator @ui diff --git a/features/product/managing_product_attributes/text_product_attribute_validation.feature b/features/product/managing_product_attributes/text_product_attribute_validation.feature index d45daea2d7..74a2dd500a 100644 --- a/features/product/managing_product_attributes/text_product_attribute_validation.feature +++ b/features/product/managing_product_attributes/text_product_attribute_validation.feature @@ -5,7 +5,7 @@ Feature: Text product attribute validation I want to be prevented from adding it without specify required fields Background: - Given the store has locale "English (United States)" + Given the store is available in "English (United States)" And I am logged in as an administrator @ui diff --git a/features/product/managing_product_options/adding_product_option.feature b/features/product/managing_product_options/adding_product_option.feature index b8b92d6162..afb0d8f02c 100644 --- a/features/product/managing_product_options/adding_product_option.feature +++ b/features/product/managing_product_options/adding_product_option.feature @@ -5,7 +5,7 @@ Feature: Adding a new product option I want to be able to add a new product option to the registry Background: - Given the store operates on a single channel in "France" + Given the store is available in "English (United States)" And I am logged in as an administrator @ui @javascript diff --git a/features/product/managing_product_options/browsing_product_options.feature b/features/product/managing_product_options/browsing_product_options.feature index f2c68613f2..84119c0e31 100644 --- a/features/product/managing_product_options/browsing_product_options.feature +++ b/features/product/managing_product_options/browsing_product_options.feature @@ -4,12 +4,10 @@ Feature: Browsing product options As an Administrator I want to be able to browse product options - Background: - And I am logged in as an administrator - @ui Scenario: Browsing defined product options - Given the store has a product option "T-Shirt size" with a code "t_shirt_size" + Given I am logged in as an administrator + And the store has a product option "T-Shirt size" with a code "t_shirt_size" And the store has a product option "T-Shirt color" with a code "t_shirt_color" When I browse product options Then I should see 2 product options in the list diff --git a/features/product/managing_product_options/editing_product_option.feature b/features/product/managing_product_options/editing_product_option.feature index a80143c846..b43655285b 100644 --- a/features/product/managing_product_options/editing_product_option.feature +++ b/features/product/managing_product_options/editing_product_option.feature @@ -5,7 +5,8 @@ Feature: Editing product options I want to be able to edit a product option Background: - Given the store has a product option "T-Shirt size" with a code "t_shirt_size" + Given the store is available in "English (United States)" + And the store has a product option "T-Shirt size" with a code "t_shirt_size" And I am logged in as an administrator @ui diff --git a/features/product/managing_product_options/managing_values_of_product_option.feature b/features/product/managing_product_options/managing_values_of_product_option.feature index e3e6b38968..167d3e8862 100644 --- a/features/product/managing_product_options/managing_values_of_product_option.feature +++ b/features/product/managing_product_options/managing_values_of_product_option.feature @@ -5,7 +5,7 @@ Feature: Managing option values of a product option I want to be able to edit a product option and its option values Background: - Given the store operates on a single channel in "France" + Given the store is available in "English (United States)" And the store has a product option "T-Shirt size" with a code "t_shirt_size" And this product option has the "S" option value with code "OV1" And this product option has also the "M" option value with code "OV2" diff --git a/features/product/managing_product_options/product_option_unique_code_validation.feature b/features/product/managing_product_options/product_option_unique_code_validation.feature index 65528e8c60..54c224253e 100644 --- a/features/product/managing_product_options/product_option_unique_code_validation.feature +++ b/features/product/managing_product_options/product_option_unique_code_validation.feature @@ -5,7 +5,7 @@ Feature: Product option unique code validation I want to be prevented from adding two product options with the same code Background: - Given the store operates on a single channel in "France" + Given the store is available in "English (United States)" And the store has a product option "T-Shirt size" with a code "t_shirt_size" And I am logged in as an administrator diff --git a/features/product/managing_product_options/product_option_validation.feature b/features/product/managing_product_options/product_option_validation.feature index f815c03195..6e56644d9b 100644 --- a/features/product/managing_product_options/product_option_validation.feature +++ b/features/product/managing_product_options/product_option_validation.feature @@ -5,7 +5,7 @@ Feature: Product option validation I want to be prevented from adding it without specifying required fields Background: - Given the store operates on a single channel in "France" + Given the store is available in "English (United States)" And the store has a product option "T-Shirt color" with a code "t_shirt_color" And I am logged in as an administrator diff --git a/features/shipping/managing_shipping_methods/adding_shipping_method.feature b/features/shipping/managing_shipping_methods/adding_shipping_method.feature index a39fd066bf..8b3e19bb0a 100644 --- a/features/shipping/managing_shipping_methods/adding_shipping_method.feature +++ b/features/shipping/managing_shipping_methods/adding_shipping_method.feature @@ -5,7 +5,8 @@ Feature: Adding a new shipping method I want to add a new shipping method to the registry Background: - Given the store operates on a single channel in "France" + Given the store is available in "English (United States)" + And the store has a base currency "Euro" And there is a zone "EU" containing all members of the European Union And I am logged in as an administrator diff --git a/features/shipping/managing_shipping_methods/browsing_shipping_methods.feature b/features/shipping/managing_shipping_methods/browsing_shipping_methods.feature index 7335fc6197..3c4f6ddc1f 100644 --- a/features/shipping/managing_shipping_methods/browsing_shipping_methods.feature +++ b/features/shipping/managing_shipping_methods/browsing_shipping_methods.feature @@ -5,7 +5,9 @@ Feature: Browsing shipping methods I want to be able to browse list of them Background: - Given the store operates on a single channel in "France" + Given the store is available in "English (United States)" + And the store has a base currency "Euro" + And there is a zone "EU" containing all members of the European Union And the store allows shipping with "UPS Carrier" and "FedEx Carrier" And I am logged in as an administrator diff --git a/features/shipping/managing_shipping_methods/deleting_shipping_method.feature b/features/shipping/managing_shipping_methods/deleting_shipping_method.feature index 1227216c88..1e0285dd68 100644 --- a/features/shipping/managing_shipping_methods/deleting_shipping_method.feature +++ b/features/shipping/managing_shipping_methods/deleting_shipping_method.feature @@ -5,7 +5,9 @@ Feature: Deleting a shipping method I want to be able to delete a shipping method Background: - Given the store operates on a single channel in "France" + Given the store is available in "English (United States)" + And the store has a base currency "Euro" + And there is a zone "EU" containing all members of the European Union And the store allows shipping with "UPS Ground" And I am logged in as an administrator diff --git a/features/shipping/managing_shipping_methods/editing_shipping_method.feature b/features/shipping/managing_shipping_methods/editing_shipping_method.feature index 552ae3b349..8e7c3da129 100644 --- a/features/shipping/managing_shipping_methods/editing_shipping_method.feature +++ b/features/shipping/managing_shipping_methods/editing_shipping_method.feature @@ -5,7 +5,9 @@ Feature: Editing shipping method I want to be able to edit a shipping method Background: - Given the store operates on a single channel in "France" + Given the store is available in "English (United States)" + And the store has a base currency "Euro" + And there is a zone "EU" containing all members of the European Union And the store allows shipping with "UPS Carrier" identified by "UPS_CARRIER" And I am logged in as an administrator diff --git a/features/shipping/managing_shipping_methods/shipping_method_flat_rate_per_shipment_validation.feature b/features/shipping/managing_shipping_methods/shipping_method_flat_rate_per_shipment_validation.feature index 80932e77bd..f897d45be3 100644 --- a/features/shipping/managing_shipping_methods/shipping_method_flat_rate_per_shipment_validation.feature +++ b/features/shipping/managing_shipping_methods/shipping_method_flat_rate_per_shipment_validation.feature @@ -5,7 +5,8 @@ Feature: Shipping method flat rate per shipment calculator validation I want to be prevented from adding it without specifying amount Background: - Given the store operates on a single channel in "France" + Given the store is available in "English (United States)" + And the store has a base currency "Euro" And there is a zone "EU" containing all members of the European Union Given I am logged in as an administrator diff --git a/features/shipping/managing_shipping_methods/shipping_method_flat_rate_per_unit_validation.feature b/features/shipping/managing_shipping_methods/shipping_method_flat_rate_per_unit_validation.feature index a53e0de683..897deabf3e 100644 --- a/features/shipping/managing_shipping_methods/shipping_method_flat_rate_per_unit_validation.feature +++ b/features/shipping/managing_shipping_methods/shipping_method_flat_rate_per_unit_validation.feature @@ -5,7 +5,8 @@ Feature: Shipping method flat rate per unit calculator validation I want to be prevented from adding it without specifying amount Background: - Given the store operates on a single channel in "France" + Given the store is available in "English (United States)" + And the store has a base currency "Euro" And there is a zone "EU" containing all members of the European Union Given I am logged in as an administrator diff --git a/features/shipping/managing_shipping_methods/shipping_method_unique_code_validation.feature b/features/shipping/managing_shipping_methods/shipping_method_unique_code_validation.feature index 9ac97a681d..28e6501ab4 100644 --- a/features/shipping/managing_shipping_methods/shipping_method_unique_code_validation.feature +++ b/features/shipping/managing_shipping_methods/shipping_method_unique_code_validation.feature @@ -5,7 +5,9 @@ Feature: Shipping method unique code validation I want to be prevented from adding two shipping methods with same code Background: - Given the store operates on a single channel in "France" + Given the store is available in "English (United States)" + And the store has a base currency "Euro" + And there is a zone "EU" containing all members of the European Union And the store allows shipping with "UPS Ground" identified by "UPS" And I am logged in as an administrator @@ -14,7 +16,7 @@ Feature: Shipping method unique code validation Given I want to create a new shipping method When I specify its code as "UPS" And I name it "FedEx Carrier" in "English (United States)" - And I define it for the "France" zone + And I define it for the "European Union" zone And I choose "Flat rate per shipment" calculator And I specify its amount as 50 And I try to add it diff --git a/features/shipping/managing_shipping_methods/shipping_method_validation.feature b/features/shipping/managing_shipping_methods/shipping_method_validation.feature index eb26ffff25..ba9157f517 100644 --- a/features/shipping/managing_shipping_methods/shipping_method_validation.feature +++ b/features/shipping/managing_shipping_methods/shipping_method_validation.feature @@ -5,7 +5,8 @@ Feature: Shipping method validation I want to be prevented from adding it without specifying required fields Background: - Given the store operates on a single channel in "France" + Given the store is available in "English (United States)" + And the store has a base currency "Euro" And there is a zone "EU" containing all members of the European Union Given I am logged in as an administrator diff --git a/features/shipping/managing_shipping_methods/toggling_shipping_method.feature b/features/shipping/managing_shipping_methods/toggling_shipping_method.feature index 601dbd7c28..99f733578d 100644 --- a/features/shipping/managing_shipping_methods/toggling_shipping_method.feature +++ b/features/shipping/managing_shipping_methods/toggling_shipping_method.feature @@ -5,7 +5,9 @@ Feature: Toggling a shipping method I want to be able to switch state of shipping method between enable and disable Background: - Given the store operates on a single channel in "France" + Given the store is available in "English (United States)" + And the store has a base currency "Euro" + And there is a zone "EU" containing all members of the European Union And the store allows shipping with "UPS Carrier" identified by "UPS_CARRIER" And I am logged in as an administrator diff --git a/features/taxonomy/managing_taxons/adding_taxon.feature b/features/taxonomy/managing_taxons/adding_taxon.feature index 02837f7c15..f1204b7ef8 100644 --- a/features/taxonomy/managing_taxons/adding_taxon.feature +++ b/features/taxonomy/managing_taxons/adding_taxon.feature @@ -5,7 +5,7 @@ Feature: Adding a new taxon I want to add a new taxon to the registry Background: - Given the store operates on a single channel in "France" + Given the store is available in "English (United States)" And I am logged in as an administrator @ui diff --git a/features/taxonomy/managing_taxons/deleting_taxon.feature b/features/taxonomy/managing_taxons/deleting_taxon.feature index 31ced0b530..2957dc466c 100644 --- a/features/taxonomy/managing_taxons/deleting_taxon.feature +++ b/features/taxonomy/managing_taxons/deleting_taxon.feature @@ -5,8 +5,7 @@ Feature: Deleting a taxon I want to be able to delete a taxon Background: - Given the store operates on a single channel in "France" - And I am logged in as an administrator + Given I am logged in as an administrator @ui Scenario: Deleted taxon should disappear from the registry diff --git a/features/taxonomy/managing_taxons/editing_taxon.feature b/features/taxonomy/managing_taxons/editing_taxon.feature index c047749792..ab19793faa 100644 --- a/features/taxonomy/managing_taxons/editing_taxon.feature +++ b/features/taxonomy/managing_taxons/editing_taxon.feature @@ -5,7 +5,8 @@ Feature: Editing a taxon I want to be able to edit a taxon Background: - Given the store classifies its products as "T-Shirts" and "Accessories" + Given the store is available in "English (United States)" + And the store classifies its products as "T-Shirts" and "Accessories" And I am logged in as an administrator @ui diff --git a/features/taxonomy/managing_taxons/taxon_unique_code_validation.feature b/features/taxonomy/managing_taxons/taxon_unique_code_validation.feature index e63629f62a..e3505f6585 100644 --- a/features/taxonomy/managing_taxons/taxon_unique_code_validation.feature +++ b/features/taxonomy/managing_taxons/taxon_unique_code_validation.feature @@ -5,7 +5,7 @@ Feature: Taxon unique code validation I want to be prevented from adding two taxons with same code Background: - Given the store operates on a single channel in "France" + Given the store is available in "English (United States)" And the store classifies its products as "T-Shirts" And I am logged in as an administrator diff --git a/features/taxonomy/managing_taxons/taxon_validation.feature b/features/taxonomy/managing_taxons/taxon_validation.feature index e3145d4d3b..921adc3e12 100644 --- a/features/taxonomy/managing_taxons/taxon_validation.feature +++ b/features/taxonomy/managing_taxons/taxon_validation.feature @@ -5,7 +5,7 @@ Feature: Taxon validation I want to be prevented from adding it without specifying required fields Background: - Given the store operates on a single channel in "France" + Given the store is available in "English (United States)" And I am logged in as an administrator @ui diff --git a/src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php b/src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php index 7eeac776ec..630967b552 100644 --- a/src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php +++ b/src/Sylius/Behat/Context/Ui/Admin/ManagingChannelsContext.php @@ -355,25 +355,25 @@ final class ManagingChannelsContext implements Context } /** - * @When I make it available in :language + * @When I make it available in :locale */ - public function iMakeItAvailableIn($language) + public function iMakeItAvailableIn($locale) { $currentPage = $this->currentPageResolver->getCurrentPageWithForm($this->createPage, $this->updatePage); - $currentPage->chooseLocale($language); + $currentPage->chooseLocale($locale); } /** - * @Then the channel :channel should be available in :language + * @Then the channel :channel should be available in :locale */ - public function theChannelShouldBeAvailableIn(ChannelInterface $channel, $language) + public function theChannelShouldBeAvailableIn(ChannelInterface $channel, $locale) { $this->updatePage->open(['id' => $channel->getId()]); Assert::true( - $this->updatePage->isLocaleChosen($language), - sprintf('Language %s should be selected but it is not', $language) + $this->updatePage->isLocaleChosen($locale), + sprintf('Language %s should be selected but it is not', $locale) ); }