From 57659649c3137273cde9e6db79abc5d3dbd0be16 Mon Sep 17 00:00:00 2001 From: Jan Goralski Date: Wed, 24 Aug 2016 16:08:00 +0200 Subject: [PATCH] [Behat] Removed the default "EU" zone --- ...cting_default_tax_zone_for_channel.feature | 17 ++++------ ...ping_methods_available_for_channel.feature | 4 +-- .../choosing_province_for_country.feature | 2 +- ...ng_total_tax_on_order_summary_page.feature | 1 - ...vailable_shipping_method_selection.feature | 12 +++---- .../seeing_order_aggregated_taxes.feature | 9 ++---- .../seeing_order_item_detailed_data.feature | 7 ++-- .../seeing_order_item_included_taxes.feature | 9 ++---- .../seeing_order_item_taxes.feature | 7 ++-- .../seeing_order_shipping_taxes.feature | 9 ++---- .../seeing_order_shipping_total.feature | 9 ++---- ..._payment_amount_including_all_fees.feature | 5 +-- ...ng_fee_with_product_taxes_on_order.feature | 28 ++++++++-------- ...t_shipping_fee_with_taxes_on_order.feature | 32 +++++++++---------- .../adding_shipping_method.feature | 12 +++---- .../browsing_shipping_methods.feature | 3 +- .../deleting_shipping_method.feature | 3 +- .../editing_shipping_method.feature | 4 +-- ..._flat_rate_per_shipment_validation.feature | 6 ++-- ...thod_flat_rate_per_unit_validation.feature | 6 ++-- ...ping_method_unique_code_validation.feature | 6 ++-- .../shipping_method_validation.feature | 6 ++-- .../toggling_shipping_method.feature | 3 +- ...rrect_taxes_based_on_customer_data.feature | 8 ++--- ...rent_tax_rates_for_different_zones.feature | 31 +++++++++--------- ...ying_correct_taxes_on_visitor_cart.feature | 17 +++++----- ...riants_with_different_tax_category.feature | 2 +- ...rounding_taxes_on_order_item_level.feature | 2 +- .../adding_tax_rate.feature | 18 +++++------ .../deleting_tax_rate.feature | 6 ++-- .../editing_tax_rate.feature | 24 +++++++------- .../tax_rate_unique_code_validation.feature | 12 +++---- .../tax_rate_validation.feature | 14 ++++---- .../Behat/Context/Setup/ZoneContext.php | 31 ++---------------- .../suites/ui/taxation/managing_tax_rates.yml | 1 + .../DefaultUnitedStatesChannelFactory.php | 3 +- 36 files changed, 154 insertions(+), 215 deletions(-) diff --git a/features/channel/managing_channels/selecting_default_tax_zone_for_channel.feature b/features/channel/managing_channels/selecting_default_tax_zone_for_channel.feature index a7552f9a9e..3ee5ae8daf 100644 --- a/features/channel/managing_channels/selecting_default_tax_zone_for_channel.feature +++ b/features/channel/managing_channels/selecting_default_tax_zone_for_channel.feature @@ -5,10 +5,7 @@ Feature: Selecting default tax zone for a channel I want to be able to select default tax zone Background: - Given the store has currency "Euro" - And the store has locale "English (United States)" - And there is a zone "EU" containing all members of the European Union - And there is a zone "The Rest of the World" containing all other countries + Given the store operates on a single channel in "United States" And I am logged in as an administrator @ui @@ -16,26 +13,26 @@ Feature: Selecting default tax zone for a channel 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 "European Union" as default tax zone - And I choose "Euro" as a default currency + And I select the "United States" as default tax zone + And I choose "USD" 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 default tax zone for the "Mobile store" channel should be "European Union" + And the default tax zone for the "Mobile store" channel should be "United States" @ui Scenario: Selecting default tax zone for existing channel Given the store operates on a channel named "Web store" And I want to modify this channel - When I select the "European Union" as default tax zone + When I select the "United States" as default tax zone And I save my changes Then I should be notified that it has been successfully edited - And the default tax zone for the "Web store" channel should be "European Union" + And the default tax zone for the "Web store" channel should be "United States" @ui Scenario: Removing existing channel default tax zone Given the store operates on a channel named "Web store" - And its default tax zone is zone "EU" + And its default tax zone is zone "US" When I want to modify this channel And I remove its default tax zone And I save my changes 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 index c9747ea532..25a88b6222 100644 --- a/features/channel/managing_channels/selecting_shipping_methods_available_for_channel.feature +++ b/features/channel/managing_channels/selecting_shipping_methods_available_for_channel.feature @@ -5,9 +5,9 @@ Feature: Selecting available shipping methods for a channel I want to be able to select available shipping methods Background: - Given the store has currency "Euro" + 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 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/checkout/addressing_order/choosing_province_for_country.feature b/features/checkout/addressing_order/choosing_province_for_country.feature index 6f4bb4ff01..9ce5eb72df 100644 --- a/features/checkout/addressing_order/choosing_province_for_country.feature +++ b/features/checkout/addressing_order/choosing_province_for_country.feature @@ -6,8 +6,8 @@ Feature: Choosing province for country Background: Given the store operates on a single channel in "United States" - And the store operates in "Nepal" And country "United States" has the "New York" province with "NY" code + And the store ships to "Nepal" And the store has a product "The Dark Knight T-Shirt" priced at "$49.99" And the store ships everywhere for free And I am a logged in customer diff --git a/features/checkout/seeing_order_summary/seeing_total_tax_on_order_summary_page.feature b/features/checkout/seeing_order_summary/seeing_total_tax_on_order_summary_page.feature index 53a916083d..104cd9660c 100644 --- a/features/checkout/seeing_order_summary/seeing_total_tax_on_order_summary_page.feature +++ b/features/checkout/seeing_order_summary/seeing_total_tax_on_order_summary_page.feature @@ -6,7 +6,6 @@ Feature: Seeing tax total on order summary page Background: Given the store operates on a single channel in "United States" - And default tax zone is "US" And the store has "VAT" tax rate of 23% for "Clothes" within "US" zone And the store has a product "The Sorting Hat" priced at "$100.00" And it belongs to "Clothes" tax category diff --git a/features/checkout/shipping_order/preventing_not_available_shipping_method_selection.feature b/features/checkout/shipping_order/preventing_not_available_shipping_method_selection.feature index 46dcac3825..4a1ef2d383 100644 --- a/features/checkout/shipping_order/preventing_not_available_shipping_method_selection.feature +++ b/features/checkout/shipping_order/preventing_not_available_shipping_method_selection.feature @@ -21,15 +21,14 @@ Feature: Preventing not available shipping method selection @ui Scenario: Not being able to select shipping method not available for my shipping address - Given there is a zone "EU" containing all members of the European Union - And there is a zone "The Rest of the World" containing all other countries + Given there is a zone "The Rest of the World" containing all other countries And the store has "Dragon Post" shipping method with "$30.00" fee for the rest of the world - And the store has "Raven Post" shipping method with "$10.00" fee within "EU" zone + And the store has "Raven Post" shipping method with "$10.00" fee within "US" zone And I have product "Targaryen T-Shirt" in the cart When I am at the checkout addressing step And I specify the shipping address as "Ankh Morpork", "Frost Alley", "90210", "United States" for "Jon Snow" And I complete the addressing step - Then I should not be able to select "Raven Post" shipping method + Then I should not be able to select "Dragon Post" shipping method @ui Scenario: Not being able to select shipping method not available for order channel @@ -43,9 +42,8 @@ Feature: Preventing not available shipping method selection @ui Scenario: Being alerted about no shipping method available - Given there is a zone "EU" containing all members of the European Union - And there is a zone "The Rest of the World" containing all other countries - And the store has "Dragon Post" shipping method with "$30.00" fee within "EU" zone + Given there is a zone "The Rest of the World" containing all other countries + And the store has "Dragon Post" shipping method with "$30.00" fee for the rest of the world And the store has disabled "Raven Post" shipping method with "$10.00" fee And I have product "Targaryen T-Shirt" in the cart When I am at the checkout addressing step diff --git a/features/order/managing_orders/seeing_order_aggregated_taxes.feature b/features/order/managing_orders/seeing_order_aggregated_taxes.feature index c9fd07f898..8abc1cc17a 100644 --- a/features/order/managing_orders/seeing_order_aggregated_taxes.feature +++ b/features/order/managing_orders/seeing_order_aggregated_taxes.feature @@ -6,18 +6,15 @@ Feature: Seeing aggregated taxes of an order Background: Given the store operates on a single channel in "United States" - And there is a zone "EU" containing all members of the European Union - And there is a zone "The Rest of the World" containing all other countries - And default tax zone is "US" - And the store has "VAT" tax rate of 23% for "Standard US services" within "RoW" zone - And the store has "Low VAT" tax rate of 10% for "Lowered US services" within "RoW" zone + And the store has "VAT" tax rate of 23% for "Standard US services" within "US" zone + And the store has "Low VAT" tax rate of 10% for "Lowered US services" within "US" zone And the store has a product "Composite bow" priced at "$100.00" And it belongs to "Standard US services" tax category And the store has a product "Claymore" priced at "$50.00" And it belongs to "Lowered US services" tax category And the store has a product "Bastard sword" priced at "$150.00" And it belongs to "Lowered US services" tax category - And the store has "DHL" shipping method with "$10.00" fee within "RoW" zone + And the store has "DHL" shipping method with "$10.00" fee within "US" zone And shipping method "DHL" belongs to "Standard US services" tax category And the store allows paying offline And there is a customer "charles.the.great@medieval.com" that placed an order "#00000001" diff --git a/features/order/managing_orders/seeing_order_item_detailed_data.feature b/features/order/managing_orders/seeing_order_item_detailed_data.feature index 66db5474bc..340b187666 100644 --- a/features/order/managing_orders/seeing_order_item_detailed_data.feature +++ b/features/order/managing_orders/seeing_order_item_detailed_data.feature @@ -6,14 +6,11 @@ Feature: Seeing order item detailed data Background: Given the store operates on a single channel in "United States" - And there is a zone "EU" containing all members of the European Union - And there is a zone "The Rest of the World" containing all other countries - And default tax zone is "US" - And the store has "VAT" tax rate of 10% for "T-Shirts" within "RoW" zone + And the store has "VAT" tax rate of 10% for "T-Shirts" within "US" zone And the store classifies its products as "T-Shirts" And the store has a product "Iron Man T-Shirt" priced at "$39.00" And it belongs to "T-Shirts" tax category - And the store ships everything for free within "RoW" zone + And the store ships everything for free within "US" zone And the store allows paying with "Cash on Delivery" And there is a promotion "#teamIronMan promotion" And it gives "$12.00" discount to every order with quantity at least 3 diff --git a/features/order/managing_orders/seeing_order_item_included_taxes.feature b/features/order/managing_orders/seeing_order_item_included_taxes.feature index 9e7965b98e..8544075c69 100644 --- a/features/order/managing_orders/seeing_order_item_included_taxes.feature +++ b/features/order/managing_orders/seeing_order_item_included_taxes.feature @@ -6,13 +6,11 @@ Feature: Seeing included in price taxes of order items Background: Given the store operates on a single channel in "United States" - And there is a zone "EU" containing all members of the European Union - And there is a zone "The Rest of the World" containing all other countries - And default tax zone is "RoW" - And the store has included in price "Guns tax" tax rate of 10% for "Guns" within "RoW" zone + And the store has included in price "Guns tax" tax rate of 10% for "Guns" within "US" zone + And default tax zone is "US" And the store has a product "Winchester M1866" priced at "$220.00" And it belongs to "Guns" tax category - And the store ships everything for free within "RoW" zone + And the store ships everywhere for free And the store allows paying offline And there is a customer "lucy@teamlucifer.com" that placed an order "#00000666" And I am logged in as an administrator @@ -24,6 +22,5 @@ Feature: Seeing included in price taxes of order items When I view the summary of the order "#00000666" And I check "Winchester M1866" data Then its tax should be $40.00 - And the order's shipping total should be "$0.00" And the order's tax total should be "$40.00" And the order's total should be "$440.00" diff --git a/features/order/managing_orders/seeing_order_item_taxes.feature b/features/order/managing_orders/seeing_order_item_taxes.feature index fce879a53c..d9230bc847 100644 --- a/features/order/managing_orders/seeing_order_item_taxes.feature +++ b/features/order/managing_orders/seeing_order_item_taxes.feature @@ -6,14 +6,11 @@ Feature: Seeing taxes of order items Background: Given the store operates on a single channel in "United States" - And there is a zone "EU" containing all members of the European Union - And there is a zone "The Rest of the World" containing all other countries - And default tax zone is "RoW" - And the store has "VAT" tax rate of 23% for "Clothes" within "RoW" zone + And the store has "VAT" tax rate of 23% for "Clothes" within "US" zone And the store has a product "PHP T-Shirt" priced at "$80.00" And the store has a product "Symfony2 T-Shirt" priced at "$140.00" And it belongs to "Clothes" tax category - And the store ships everything for free within "RoW" zone + And the store ships everything for free within "US" zone And the store allows paying offline And there is a customer "lucy@teamlucifer.com" that placed an order "#00000666" And I am logged in as an administrator diff --git a/features/order/managing_orders/seeing_order_shipping_taxes.feature b/features/order/managing_orders/seeing_order_shipping_taxes.feature index 62a78de4e8..91284eb41c 100644 --- a/features/order/managing_orders/seeing_order_shipping_taxes.feature +++ b/features/order/managing_orders/seeing_order_shipping_taxes.feature @@ -6,14 +6,11 @@ Feature: Seeing taxes of an order Background: Given the store operates on a single channel in "United States" - And there is a zone "EU" containing all members of the European Union - And there is a zone "The Rest of the World" containing all other countries - And default tax zone is "RoW" - And the store has "VAT" tax rate of 23% for "Clothes" within "RoW" zone - And the store has "Shipping VAT" tax rate of 23% for "Shipping Services" within "RoW" zone + And the store has "VAT" tax rate of 23% for "Clothes" within "US" zone + And the store has "Shipping VAT" tax rate of 23% for "Shipping Services" within "US" zone And the store has a product "Symfony2 T-Shirt" priced at "$140.00" And it belongs to "Clothes" tax category - And the store has "DHL" shipping method with "$10.00" fee within "RoW" zone + And the store has "DHL" shipping method with "$10.00" fee within "US" zone And shipping method "DHL" belongs to "Shipping Services" tax category And the store allows paying offline And there is a customer "lucy@teamlucifer.com" that placed an order "#00000666" diff --git a/features/order/managing_orders/seeing_order_shipping_total.feature b/features/order/managing_orders/seeing_order_shipping_total.feature index 6121307e7a..7b14fc0d07 100644 --- a/features/order/managing_orders/seeing_order_shipping_total.feature +++ b/features/order/managing_orders/seeing_order_shipping_total.feature @@ -6,14 +6,11 @@ Feature: Seeing shipping total of an order Background: Given the store operates on a single channel in "United States" - And there is a zone "EU" containing all members of the European Union - And there is a zone "The Rest of the World" containing all other countries - And default tax zone is "RoW" - And the store has "VAT" tax rate of 23% for "Hogwart stuff" within "RoW" zone - And the store has "Shipping VAT" tax rate of 23% for "Shipping Services" within "RoW" zone + And the store has "VAT" tax rate of 23% for "Hogwart stuff" within "US" zone + And the store has "Shipping VAT" tax rate of 23% for "Shipping Services" within "US" zone And the store has a product "Gryffindor scarf" priced at "$100.00" And it belongs to "Hogwart stuff" tax category - And the store has "Owl post" shipping method with "$10.00" fee within "RoW" zone + And the store has "Owl post" shipping method with "$10.00" fee within "US" zone And shipping method "Owl post" belongs to "Shipping Services" tax category And there is a promotion "50% shipping discount" And it gives "50%" discount on shipping to every order diff --git a/features/order/managing_orders/seeing_orders_payment_amount_including_all_fees.feature b/features/order/managing_orders/seeing_orders_payment_amount_including_all_fees.feature index 75177a5496..12934a3325 100644 --- a/features/order/managing_orders/seeing_orders_payment_amount_including_all_fees.feature +++ b/features/order/managing_orders/seeing_orders_payment_amount_including_all_fees.feature @@ -6,10 +6,7 @@ Feature: Seeing order's payment amount including all fees Background: Given the store operates on a single channel in "United States" - And there is a zone "EU" containing all members of the European Union - And there is a zone "The Rest of the World" containing all other countries - And default tax zone is "RoW" - And the store has "VAT" tax rate of 23% for "Clothes" for the rest of the world + And the store has "VAT" tax rate of 23% for "Clothes" within "US" zone And the store has a product "Angel T-Shirt" priced at "$39.00" And it belongs to "Clothes" tax category And the store has a product "Angel Mug" priced at "$19.00" diff --git a/features/shipping/applying_shipping_fee/applying_correct_shipping_fee_with_product_taxes_on_order.feature b/features/shipping/applying_shipping_fee/applying_correct_shipping_fee_with_product_taxes_on_order.feature index 6f727175dd..870e928bb0 100644 --- a/features/shipping/applying_shipping_fee/applying_correct_shipping_fee_with_product_taxes_on_order.feature +++ b/features/shipping/applying_shipping_fee/applying_correct_shipping_fee_with_product_taxes_on_order.feature @@ -5,18 +5,16 @@ Feature: Apply correct shipping fee with product taxes on order I want to have correct shipping fees and all taxes applied to my order Background: - Given the store operates on a single channel - And the store ships to "Germany" and "United States" - And there is a zone "EU" containing all members of the European Union + Given the store operates on a single channel in "United States" And there is a zone "The Rest of the World" containing all other countries - And default tax zone is "RoW" - And the store has "EU VAT" tax rate of 23% for "Clothes" within "EU" zone + And the store ships to "Germany" + And the store has "US VAT" tax rate of 23% for "Clothes" within "US" zone And the store has "Low tax" tax rate of 10% for "Clothes" for the rest of the world - And the store has "EU Shipping VAT" tax rate of 23% for "Shipping Services" within "EU" zone + And the store has "US Shipping VAT" tax rate of 23% for "Shipping Services" within "US" zone And the store has "Low Shipping VAT" tax rate of 10% for "Shipping Services" for the rest of the world And the store has a product "PHP T-Shirt" priced at "$100.00" And it belongs to "Clothes" tax category - And the store has "DHL" shipping method with "$10.00" fee within "EU" zone + And the store has "DHL" shipping method with "$10.00" fee within "US" zone And the store has "FedEx" shipping method with "$20.00" fee for the rest of the world And shipping method "DHL" belongs to "Shipping Services" tax category And shipping method "FedEx" belongs to "Shipping Services" tax category @@ -26,17 +24,17 @@ Feature: Apply correct shipping fee with product taxes on order @ui Scenario: Proper shipping fee, tax and product tax Given I have product "PHP T-Shirt" in the cart - When I proceed selecting "FedEx" shipping method + When I proceed selecting "DHL" shipping method And I choose "Offline" payment method - Then my cart total should be "$132.00" - And my cart taxes should be "$12.00" - And my cart shipping total should be "$22.00" + Then my cart total should be "$135.30" + And my cart taxes should be "$25.30" + And my cart shipping total should be "$12.30" @ui Scenario: Proper shipping fee, tax and products' taxes after addressing Given I have 3 products "PHP T-Shirt" in the cart - When I proceed selecting "Germany" as shipping country with "DHL" method + When I proceed selecting "Germany" as shipping country with "FedEx" method And I choose "Offline" payment method - Then my cart total should be "$381.30" - And my cart taxes should be "$71.30" - And my cart shipping total should be "$12.30" + Then my cart total should be "$352.00" + And my cart taxes should be "$32.00" + And my cart shipping total should be "$22.00" diff --git a/features/shipping/applying_shipping_fee/applying_correct_shipping_fee_with_taxes_on_order.feature b/features/shipping/applying_shipping_fee/applying_correct_shipping_fee_with_taxes_on_order.feature index d09a37ef2d..47e8e8c139 100644 --- a/features/shipping/applying_shipping_fee/applying_correct_shipping_fee_with_taxes_on_order.feature +++ b/features/shipping/applying_shipping_fee/applying_correct_shipping_fee_with_taxes_on_order.feature @@ -5,17 +5,15 @@ Feature: Apply correct shipping fee with taxes on order I want to have correct shipping fees and taxes applied to my order Background: - Given the store operates on a single channel - And there is a zone "EU" containing all members of the European Union + Given the store operates on a single channel in "United States" And there is a zone "The Rest of the World" containing all other countries - And the store ships to "United States" and "Germany" - And default tax zone is "RoW" - And the store has "EU VAT" tax rate of 23% for "Clothes" within "EU" zone + And the store ships to "Germany" + And the store has "NA VAT" tax rate of 23% for "Clothes" within "US" zone And the store has "Low tax" tax rate of 10% for "Clothes" for the rest of the world - And the store has "Shipping EU VAT" tax rate of 23% for "Shipping Services" within "EU" zone + And the store has "Shipping NA VAT" tax rate of 23% for "Shipping Services" within "US" zone And the store has "Shipping Low tax" tax rate of 10% for "Shipping Services" for the rest of the world And the store has a product "PHP T-Shirt" priced at "$100.00" - And the store has "DHL" shipping method with "$10.00" fee within "EU" zone + And the store has "DHL" shipping method with "$10.00" fee within "US" zone And the store has "DHL-World" shipping method with "$20.00" fee for the rest of the world And shipping method "DHL" belongs to "Shipping Services" tax category And shipping method "DHL-World" belongs to "Shipping Services" tax category @@ -25,17 +23,17 @@ Feature: Apply correct shipping fee with taxes on order @ui Scenario: Proper shipping fee and tax Given I have product "PHP T-Shirt" in the cart - When I proceed selecting "DHL-World" shipping method - And I choose "Offline" payment method - Then my cart total should be "$122.00" - And my cart taxes should be "$2.00" - And my cart shipping total should be "$22.00" - - @ui - Scenario: Proper shipping fee and tax after addressing - Given I have product "PHP T-Shirt" in the cart - When I proceed selecting "Germany" as shipping country with "DHL" method + When I proceed selecting "DHL" shipping method And I choose "Offline" payment method Then my cart total should be "$112.30" And my cart taxes should be "$2.30" And my cart shipping total should be "$12.30" + + @ui + Scenario: Proper shipping fee and tax after addressing + Given I have product "PHP T-Shirt" in the cart + When I proceed selecting "Germany" as shipping country with "DHL-World" method + And I choose "Offline" payment method + Then my cart total should be "$122.00" + And my cart taxes should be "$2.00" + And my cart shipping total should be "$22.00" diff --git a/features/shipping/managing_shipping_methods/adding_shipping_method.feature b/features/shipping/managing_shipping_methods/adding_shipping_method.feature index 8fd45eb023..1618b89f69 100644 --- a/features/shipping/managing_shipping_methods/adding_shipping_method.feature +++ b/features/shipping/managing_shipping_methods/adding_shipping_method.feature @@ -5,8 +5,8 @@ Feature: Adding a new shipping method I want to add a new shipping method to the registry Background: - Given the store is available in "English (United States)" - And there is a zone "EU" containing all members of the European Union + Given the store operates on a single channel in "United States" + And the store is available in "English (United States)" And I am logged in as an administrator @ui @javascript @@ -14,7 +14,7 @@ Feature: Adding a new shipping method Given I want to create a new shipping method When I specify its code as "FED_EX_CARRIER" And I name it "FedEx Carrier" in "English (United States)" - And I define it for the "European Union" zone + And I define it for the "United States" zone And I choose "Flat rate per shipment" calculator And I specify its amount as 50 And I add it @@ -26,8 +26,8 @@ Feature: Adding a new shipping method Given I want to create a new shipping method When I specify its code as "FED_EX_CARRIER" And I name it "FedEx Carrier" in "English (United States)" - And I describe it as "FedEx Carrier shipping method for European Union" in "English (United States)" - And I define it for the "European Union" zone + And I describe it as "FedEx Carrier shipping method for United States" in "English (United States)" + And I define it for the "United States" zone And I choose "Flat rate per shipment" calculator And I specify its amount as 50 And I add it @@ -39,7 +39,7 @@ Feature: Adding a new shipping method Given I want to create a new shipping method When I specify its code as "FED_EX_CARRIER" And I name it "FedEx Carrier" in "English (United States)" - And I define it for the "European Union" zone + And I define it for the "United States" zone And I choose "Flat rate per unit" calculator And I specify its amount as 20 And I add it diff --git a/features/shipping/managing_shipping_methods/browsing_shipping_methods.feature b/features/shipping/managing_shipping_methods/browsing_shipping_methods.feature index 8299dfce2b..f30e67d68a 100644 --- a/features/shipping/managing_shipping_methods/browsing_shipping_methods.feature +++ b/features/shipping/managing_shipping_methods/browsing_shipping_methods.feature @@ -5,8 +5,7 @@ Feature: Browsing shipping methods I want to be able to browse list of them Background: - Given the store is available in "English (United States)" - And there is a zone "EU" containing all members of the European Union + Given the store operates on a single channel in "United States" 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 7f09aaa3d4..a32a19cc6e 100644 --- a/features/shipping/managing_shipping_methods/deleting_shipping_method.feature +++ b/features/shipping/managing_shipping_methods/deleting_shipping_method.feature @@ -5,8 +5,7 @@ Feature: Deleting a shipping method I want to be able to delete a shipping method Background: - Given the store is available in "English (United States)" - And there is a zone "EU" containing all members of the European Union + Given the store operates on a single channel in "United States" 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 b90221e4b6..e19e9957d2 100644 --- a/features/shipping/managing_shipping_methods/editing_shipping_method.feature +++ b/features/shipping/managing_shipping_methods/editing_shipping_method.feature @@ -5,8 +5,8 @@ Feature: Editing shipping method I want to be able to edit a shipping method Background: - Given the store is available in "English (United States)" - And there is a zone "EU" containing all members of the European Union + Given the store operates on a single channel in "United States" + And the store is available in "English (United States)" 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 b3cee8d74e..ec0fc3ef14 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,9 +5,9 @@ Feature: Shipping method flat rate per shipment calculator validation I want to be prevented from adding it without specifying amount Background: - Given the store is available in "English (United States)" - And there is a zone "EU" containing all members of the European Union - Given I am logged in as an administrator + Given the store operates on a single channel in "United States" + And the store is available in "English (United States)" + And I am logged in as an administrator @ui @javascript Scenario: Trying to add a new shipping method with flat rate per shipment calculator without specifying its amount 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 8161b29e87..c6ad8b37f4 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,9 +5,9 @@ Feature: Shipping method flat rate per unit calculator validation I want to be prevented from adding it without specifying amount Background: - Given the store is available in "English (United States)" - And there is a zone "EU" containing all members of the European Union - Given I am logged in as an administrator + Given the store operates on a single channel in "United States" + And the store is available in "English (United States)" + And I am logged in as an administrator @ui @javascript Scenario: Trying to add a new shipping method with flat rate per unit calculator without specifying its amount 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 9032dd5e82..6a48476b22 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,8 +5,8 @@ Feature: Shipping method unique code validation I want to be prevented from adding two shipping methods with same code Background: - Given the store is available in "English (United States)" - And there is a zone "EU" containing all members of the European Union + Given the store operates on a single channel in "United States" + And the store is available in "English (United States)" And the store allows shipping with "UPS Ground" identified by "UPS" And I am logged in as an administrator @@ -15,7 +15,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 "European Union" zone + And I define it for the "United States" 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 8c1ca7348f..5651905699 100644 --- a/features/shipping/managing_shipping_methods/shipping_method_validation.feature +++ b/features/shipping/managing_shipping_methods/shipping_method_validation.feature @@ -5,8 +5,8 @@ Feature: Shipping method validation I want to be prevented from adding it without specifying required fields Background: - Given the store is available in "English (United States)" - And there is a zone "EU" containing all members of the European Union + Given the store operates on a single channel in "United States" + And the store is available in "English (United States)" And I am logged in as an administrator @ui @@ -44,4 +44,4 @@ Feature: Shipping method validation When I remove its name from "English (United States)" translation And I try to save my changes Then I should be notified that name is required - And this shipping method should still be named "European Union Sales Tax" + And this shipping method should still be named "United States Sales Tax" diff --git a/features/shipping/managing_shipping_methods/toggling_shipping_method.feature b/features/shipping/managing_shipping_methods/toggling_shipping_method.feature index 57746ffdc9..7b60a9235b 100644 --- a/features/shipping/managing_shipping_methods/toggling_shipping_method.feature +++ b/features/shipping/managing_shipping_methods/toggling_shipping_method.feature @@ -5,8 +5,7 @@ Feature: Toggling a shipping method I want to be able to switch state of shipping method between enable and disable Background: - Given the store is available in "English (United States)" - And there is a zone "EU" containing all members of the European Union + Given the store operates on a single channel in "United States" And the store allows shipping with "UPS Carrier" identified by "UPS_CARRIER" And I am logged in as an administrator diff --git a/features/taxation/applying_taxes/applying_correct_taxes_based_on_customer_data.feature b/features/taxation/applying_taxes/applying_correct_taxes_based_on_customer_data.feature index 20acb32b7f..c315313703 100644 --- a/features/taxation/applying_taxes/applying_correct_taxes_based_on_customer_data.feature +++ b/features/taxation/applying_taxes/applying_correct_taxes_based_on_customer_data.feature @@ -5,13 +5,11 @@ Feature: Apply correct taxes based on customer data I want to have correct taxes applied to my order Background: - Given the store operates on a single channel - And the store ships to "United States" and "Germany" - And there is a zone "EU" containing all members of the European Union + Given the store operates on a single channel in "United States" And there is a zone "The Rest of the World" containing all other countries - And default tax zone is "RoW" + And the store ships to "Germany" And the store ships everywhere for free - And the store has "EU VAT" tax rate of 23% for "Clothes" within "EU" zone + And the store has "NA VAT" tax rate of 23% for "Clothes" within "US" zone And the store has "VAT" tax rate of 10% for "Clothes" for the rest of the world And the store has a product "PHP T-Shirt" priced at "$100.00" And it belongs to "Clothes" tax category diff --git a/features/taxation/applying_taxes/applying_correct_taxes_for_products_with_different_tax_rates_for_different_zones.feature b/features/taxation/applying_taxes/applying_correct_taxes_for_products_with_different_tax_rates_for_different_zones.feature index 08f2c028b3..5ed01a8a04 100644 --- a/features/taxation/applying_taxes/applying_correct_taxes_for_products_with_different_tax_rates_for_different_zones.feature +++ b/features/taxation/applying_taxes/applying_correct_taxes_for_products_with_different_tax_rates_for_different_zones.feature @@ -5,14 +5,13 @@ Feature: Apply correct taxes for products with different tax rates for different I want to have correct taxes applied to my order Background: - Given the store operates on a single channel - And the store ships to "Germany" and "United States" - And there is a zone "EU" containing all members of the European Union + Given the store operates on a single channel in "United States" And there is a zone "The Rest of the World" containing all other countries - And default tax zone is "RoW" + And the store ships to "Germany" And the store ships everywhere for free - And the store has "No tax" tax rate of 0% for "Clothes" within "EU" zone - And the store has "Low VAT" tax rate of 5% for "Mugs" within "EU" zone + And default tax zone is "US" + And the store has "No tax" tax rate of 0% for "Clothes" within "US" zone + And the store has "Low VAT" tax rate of 5% for "Mugs" within "US" zone And the store has "VAT" tax rate of 23% for "Clothes" for the rest of the world And the store has a product "PHP T-Shirt" priced at "$100.00" And it belongs to "Clothes" tax category @@ -23,34 +22,34 @@ Feature: Apply correct taxes for products with different tax rates for different @ui Scenario: Displaying correct tax before specifying shipping address When I add product "PHP T-Shirt" to the cart - Then my cart total should be "$123.00" - And my cart taxes should be "$23.00" + Then my cart total should be "$100.00" + And my cart taxes should be "$0.00" @ui Scenario: Displaying correct tax after specifying shipping address Given I have product "PHP T-Shirt" in the cart When I proceed selecting "Germany" as shipping country - Then my cart total should be "$100.00" - And my cart taxes should be "$0.00" + Then my cart total should be "$123.00" + And my cart taxes should be "$23.00" @ui Scenario: Displaying correct taxes for multiple products after specifying shipping address Given I have 3 products "PHP T-Shirt" in the cart When I proceed selecting "Germany" as shipping country - Then my cart total should be "$300.00" - And my cart taxes should be "$0.00" + Then my cart total should be "$369.00" + And my cart taxes should be "$69.00" @ui Scenario: Displaying correct taxes for multiple products from different zones before specifying shipping address When I add product "PHP T-Shirt" to the cart And I add 2 products "Symfony Mug" to the cart - Then my cart total should be "$223.00" - And my cart taxes should be "$23.00" + Then my cart total should be "$205.00" + And my cart taxes should be "$5.00" @ui Scenario: Displaying correct taxes for multiple products from different zones after specifying shipping address Given I have product "PHP T-Shirt" in the cart And I have 2 products "Symfony Mug" in the cart When I proceed selecting "Germany" as shipping country - Then my cart total should be "$205.00" - And my cart taxes should be "$5.00" + Then my cart total should be "$223.00" + And my cart taxes should be "$23.00" diff --git a/features/taxation/applying_taxes/applying_correct_taxes_on_visitor_cart.feature b/features/taxation/applying_taxes/applying_correct_taxes_on_visitor_cart.feature index 538a660673..c7be9eda6d 100644 --- a/features/taxation/applying_taxes/applying_correct_taxes_on_visitor_cart.feature +++ b/features/taxation/applying_taxes/applying_correct_taxes_on_visitor_cart.feature @@ -5,26 +5,25 @@ Feature: Apply correct taxes on visitor cart I want to have correct taxes applied to my order Background: - Given the store operates on a single channel - And the store ships to "United States" and "Austria" - And there is a zone "EU" containing all members of the European Union + Given the store operates on a single channel in "United States" And there is a zone "The Rest of the World" containing all other countries - And default tax zone is "RoW" + And the store ships to "Austria" And the store ships everywhere for free + And default tax zone is "US" And the store has "RoW VAT" tax rate of 10% for "Clothes" for the rest of the world - And the store has "EU VAT" tax rate of 23% for "Clothes" within "EU" zone + And the store has "US VAT" tax rate of 23% for "Clothes" within "US" zone And the store has a product "PHP T-Shirt" priced at "$100.00" And it belongs to "Clothes" tax category @ui Scenario: Proper taxes for taxed product When I add product "PHP T-Shirt" to the cart - Then my cart total should be "$110.00" - And my cart taxes should be "$10.00" + Then my cart total should be "$123.00" + And my cart taxes should be "$23.00" @ui Scenario: Proper taxes after specifying shipping address Given I have product "PHP T-Shirt" in the cart When I proceed as guest "john@example.com" with "Austria" as shipping country - Then my cart total should be "$123.00" - And my cart taxes should be "$23.00" + Then my cart total should be "$110.00" + And my cart taxes should be "$10.00" diff --git a/features/taxation/applying_taxes/applying_different_taxes_for_variants_with_different_tax_category.feature b/features/taxation/applying_taxes/applying_different_taxes_for_variants_with_different_tax_category.feature index 84e3eb002f..fa32f1cb02 100644 --- a/features/taxation/applying_taxes/applying_different_taxes_for_variants_with_different_tax_category.feature +++ b/features/taxation/applying_taxes/applying_different_taxes_for_variants_with_different_tax_category.feature @@ -7,7 +7,7 @@ Feature: Apply different taxes for variants with different tax category Background: Given the store operates on a single channel in "United States" And default tax zone is "US" - And the store has "EU VAT" tax rate of 23% for "Mugs" within "US" zone + And the store has "US VAT" tax rate of 23% for "Mugs" within "US" zone And the store has "Low VAT" tax rate of 5% for "Cheap Mugs" within "US" zone And the store has a product "PHP Mug" And it comes in the following variations: diff --git a/features/taxation/applying_taxes/rounding_taxes_on_order_item_level.feature b/features/taxation/applying_taxes/rounding_taxes_on_order_item_level.feature index af0f5ab1de..863007d719 100644 --- a/features/taxation/applying_taxes/rounding_taxes_on_order_item_level.feature +++ b/features/taxation/applying_taxes/rounding_taxes_on_order_item_level.feature @@ -7,7 +7,7 @@ Feature: Round taxes on order item level Background: Given the store operates on a single channel in "United States" And default tax zone is "US" - And the store has "EU VAT" tax rate of 23% for "Clothes" within "US" zone + And the store has "US VAT" tax rate of 23% for "Clothes" within "US" zone And the store has "Low VAT" tax rate of 10% for "Mugs" within "US" zone And the store has a product "PHP T-Shirt" priced at "$10.10" And it belongs to "Clothes" tax category diff --git a/features/taxation/managing_tax_rates/adding_tax_rate.feature b/features/taxation/managing_tax_rates/adding_tax_rate.feature index 12e1bb6543..44e718232f 100644 --- a/features/taxation/managing_tax_rates/adding_tax_rate.feature +++ b/features/taxation/managing_tax_rates/adding_tax_rate.feature @@ -5,33 +5,33 @@ Feature: Adding a new tax rate I want to add a new tax rate to the registry Background: - Given there is a zone "EU" containing all members of the European Union + Given the store operates on a single channel in "United States" And the store has a tax category "Food and Beverage" And I am logged in as an administrator @ui Scenario: Adding a new tax rate Given I want to create a new tax rate - When I specify its code as "EUROPEAN_UNION_SALES_TAX" - And I name it "European Union Sales Tax" - And I define it for the "European Union" zone + When I specify its code as "US_SALES_TAX" + And I name it "United States Sales Tax" + And I define it for the "United States" zone And I make it applicable for the "Food and Beverage" tax category And I specify its amount as 20% And I choose the default tax calculator And I add it Then I should be notified that it has been successfully created - And the tax rate "European Union Sales Tax" should appear in the registry + And the tax rate "United States Sales Tax" should appear in the registry @ui @javascript Scenario: Adding a new tax rate which will be included in product price Given I want to create a new tax rate - When I specify its code as "EUROPEAN_UNION_SALES_TAX" - And I name it "European Union Sales Tax" - And I define it for the "European Union" zone + When I specify its code as "US_SALES_TAX" + And I name it "United States Sales Tax" + And I define it for the "United States" zone And I make it applicable for the "Food and Beverage" tax category And I specify its amount as 20% And I choose the default tax calculator And I choose "Included in price" option And I add it Then I should be notified that it has been successfully created - And the tax rate "European Union Sales Tax" should appear in the registry + And the tax rate "United States Sales Tax" should appear in the registry diff --git a/features/taxation/managing_tax_rates/deleting_tax_rate.feature b/features/taxation/managing_tax_rates/deleting_tax_rate.feature index 048301d24b..5db129b520 100644 --- a/features/taxation/managing_tax_rates/deleting_tax_rate.feature +++ b/features/taxation/managing_tax_rates/deleting_tax_rate.feature @@ -5,13 +5,13 @@ Feature: Deleting a tax rate I want to be able to delete a tax rate Background: - Given there is a zone "EU" containing all members of the European Union + Given the store operates on a single channel in "United States" And the store has a tax category "Sports gear" - And the store has "European Union Sales Tax" tax rate of 20% for "Sports gear" within "EU" zone + And the store has "United States Sales Tax" tax rate of 20% for "Sports gear" within "US" zone And I am logged in as an administrator @ui Scenario: Deleted tax rate should disappear from the registry - When I delete tax rate "European Union Sales Tax" + When I delete tax rate "United States Sales Tax" Then I should be notified that it has been successfully deleted Then this tax rate should no longer exist in the registry diff --git a/features/taxation/managing_tax_rates/editing_tax_rate.feature b/features/taxation/managing_tax_rates/editing_tax_rate.feature index e919941ea2..69d200119c 100644 --- a/features/taxation/managing_tax_rates/editing_tax_rate.feature +++ b/features/taxation/managing_tax_rates/editing_tax_rate.feature @@ -5,35 +5,35 @@ Feature: Editing tax rate I want to be able to edit a tax rate Background: - Given there is a zone "EU" containing all members of the European Union + Given the store operates on a single channel in "United States" And the store has a tax category "Sports gear" - And the store has "European Union Sales Tax" tax rate of 20% for "Sports gear" within "EU" zone + And the store has "United States Sales Tax" tax rate of 20% for "Sports gear" within "US" zone And I am logged in as an administrator @todo Scenario: Trying to change tax rate code - Given I want to modify a tax rate "European Union Sales Tax" - When I change its code to "eu_vat" + Given I want to modify a tax rate "United States Sales Tax" + When I change its code to "us_vat" And I save my changes Then I should be notified that code cannot be changed - And tax rate "European Union Sales Tax" should still have code "european_union_sales_tax" + And tax rate "United States Sales Tax" should still have code "united_states_sales_tax" @ui Scenario: Seeing disabled code field when editing tax rate - When I want to modify a tax rate "European Union Sales Tax" + When I want to modify a tax rate "United States Sales Tax" Then the code field should be disabled @ui Scenario: Renaming the tax rate - Given I want to modify a tax rate "European Union Sales Tax" - When I rename it to "EU VAT" + Given I want to modify a tax rate "United States Sales Tax" + When I rename it to "US VAT" And I save my changes Then I should be notified that it has been successfully edited - And this tax rate name should be "EU VAT" + And this tax rate name should be "US VAT" @ui Scenario: Changing the tax rate amount - Given I want to modify a tax rate "European Union Sales Tax" + Given I want to modify a tax rate "United States Sales Tax" When I specify its amount as 16% And I save my changes Then I should be notified that it has been successfully edited @@ -42,7 +42,7 @@ Feature: Editing tax rate @ui Scenario: Changing related tax category Given the store has a tax category "Food and Beverage" also - And I want to modify a tax rate "European Union Sales Tax" + And I want to modify a tax rate "United States Sales Tax" When I change it to be applicable for the "Food and Beverage" tax category And I save my changes Then I should be notified that it has been successfully edited @@ -51,7 +51,7 @@ Feature: Editing tax rate @ui Scenario: Changing related zone Given there is a zone "The Rest of the World" containing all other countries - And I want to modify a tax rate "European Union Sales Tax" + And I want to modify a tax rate "United States Sales Tax" When I change its zone to "The Rest of the World" And I save my changes Then I should be notified that it has been successfully edited diff --git a/features/taxation/managing_tax_rates/tax_rate_unique_code_validation.feature b/features/taxation/managing_tax_rates/tax_rate_unique_code_validation.feature index 6cd174da42..f441bcfe02 100644 --- a/features/taxation/managing_tax_rates/tax_rate_unique_code_validation.feature +++ b/features/taxation/managing_tax_rates/tax_rate_unique_code_validation.feature @@ -5,20 +5,20 @@ Feature: Tax rate unique code validation I want to be prevented from adding two tax rates with same code Background: - Given there is a zone "EU" containing all members of the European Union + Given the store operates on a single channel in "United States" And the store has a tax category "Sports gear" - And the store has "European Union Sales Tax" tax rate of 20% for "Sports gear" within "EU" zone identified by "EUROPEAN_UNION_SALES_TAX" code + And the store has "United States Sales Tax" tax rate of 20% for "Sports gear" within "US" zone identified by "UNITED_STATES_SALES_TAX" code And I am logged in as an administrator @ui Scenario: Trying to add tax rate with taken code Given I want to create a new tax rate - When I specify its code as "EUROPEAN_UNION_SALES_TAX" - And I name it "European Union Sales Tax" - And I define it for the "European Union" zone + When I specify its code as "UNITED_STATES_SALES_TAX" + And I name it "United States Sales Tax" + And I define it for the "United States" zone And I make it applicable for the "Sports gear" tax category And I specify its amount as 20% And I choose the default tax calculator And I try to add it Then I should be notified that tax rate with this code already exists - And there should still be only one tax rate with code "EUROPEAN_UNION_SALES_TAX" + And there should still be only one tax rate with code "UNITED_STATES_SALES_TAX" diff --git a/features/taxation/managing_tax_rates/tax_rate_validation.feature b/features/taxation/managing_tax_rates/tax_rate_validation.feature index ffb7c3b3b3..479d548ee6 100644 --- a/features/taxation/managing_tax_rates/tax_rate_validation.feature +++ b/features/taxation/managing_tax_rates/tax_rate_validation.feature @@ -5,9 +5,9 @@ Feature: Tax rate validation I want to be prevented from adding it without specifying required fields Background: - Given there is a zone "EU" containing all members of the European Union + Given the store operates on a single channel in "United States" And the store has a tax category "Food and Beverage" - Given I am logged in as an administrator + And I am logged in as an administrator @ui Scenario: Trying to add a new tax rate without specifying its code @@ -30,11 +30,11 @@ Feature: Tax rate validation @ui Scenario: Trying to add a new tax rate without specifying its name Given I want to create a new tax rate - When I specify its code as "EUROPEAN_UNION_SALES_TAX" + When I specify its code as "UNITED_STATES_SALES_TAX" But I do not name it And I try to add it Then I should be notified that name is required - And tax rate with code "EUROPEAN_UNION_SALES_TAX" should not be added + And tax rate with code "UNITED_STATES_SALES_TAX" should not be added @ui Scenario: Trying to add a new tax rate without specifying its zone @@ -58,7 +58,7 @@ Feature: Tax rate validation @ui Scenario: Trying to remove amount from existing tax rate - Given the store has "European Union Sales Tax" tax rate of 20% for "Sports gear" within "EU" zone + Given the store has "United States Sales Tax" tax rate of 20% for "Sports gear" within "US" zone And I want to modify this tax rate When I remove its amount And I try to save my changes @@ -67,9 +67,9 @@ Feature: Tax rate validation @ui Scenario: Trying to remove name from existing tax rate - Given the store has "European Union Sales Tax" tax rate of 20% for "Sports gear" within "EU" zone + Given the store has "United States Sales Tax" tax rate of 20% for "Sports gear" within "US" zone And I want to modify this tax rate When I remove its name And I try to save my changes Then I should be notified that name is required - And this tax rate should still be named "European Union Sales Tax" + And this tax rate should still be named "United States Sales Tax" diff --git a/src/Sylius/Behat/Context/Setup/ZoneContext.php b/src/Sylius/Behat/Context/Setup/ZoneContext.php index ee63963d32..b71e4e7007 100644 --- a/src/Sylius/Behat/Context/Setup/ZoneContext.php +++ b/src/Sylius/Behat/Context/Setup/ZoneContext.php @@ -30,15 +30,6 @@ use Symfony\Component\Intl\Intl; */ final class ZoneContext implements Context { - /** - * @var array - */ - private $euMembers = [ - 'BE', 'BG', 'CZ', 'DK', 'DE', 'EE', 'IE', 'GR', 'ES', - 'FR', 'IT', 'CY', 'LV', 'LT', 'LU', 'HU', 'MT', 'NL', - 'AT', 'PL', 'PT', 'RO', 'SI', 'SK', 'FI', 'SE', 'GB', - ]; - /** * @var SharedStorageInterface */ @@ -85,31 +76,15 @@ final class ZoneContext implements Context $this->zoneMemberFactory = $zoneMemberFactory; } - /** - * @Given /^there is a zone "EU" containing all members of the European Union$/ - */ - public function thereIsAZoneEUContainingAllMembersOfEuropeanUnion() - { - $zone = $this->zoneFactory->createWithMembers($this->euMembers); - $zone->setType(ZoneInterface::TYPE_COUNTRY); - $zone->setCode('EU'); - $zone->setName('European Union'); - - $this->zoneRepository->add($zone); - $this->sharedStorage->set('zone', $zone); - } - /** * @Given /^there is a zone "The Rest of the World" containing all other countries$/ */ public function thereIsAZoneTheRestOfTheWorldContainingAllOtherCountries() { - $restOfWorldCountries = array_diff( - array_keys(Intl::getRegionBundle()->getCountryNames('en')), - $this->euMembers - ); + $restOfWorldCountries = Intl::getRegionBundle()->getCountryNames('en'); + unset($restOfWorldCountries['US']); - $zone = $this->zoneFactory->createWithMembers($restOfWorldCountries); + $zone = $this->zoneFactory->createWithMembers(array_keys($restOfWorldCountries)); $zone->setType(ZoneInterface::TYPE_COUNTRY); $zone->setCode('RoW'); $zone->setName('The Rest of the World'); diff --git a/src/Sylius/Behat/Resources/config/suites/ui/taxation/managing_tax_rates.yml b/src/Sylius/Behat/Resources/config/suites/ui/taxation/managing_tax_rates.yml index 73965056d5..cccc0384e5 100644 --- a/src/Sylius/Behat/Resources/config/suites/ui/taxation/managing_tax_rates.yml +++ b/src/Sylius/Behat/Resources/config/suites/ui/taxation/managing_tax_rates.yml @@ -12,6 +12,7 @@ default: - sylius.behat.context.transform.tax_rate - sylius.behat.context.transform.zone + - sylius.behat.context.setup.channel - sylius.behat.context.setup.admin_security - sylius.behat.context.setup.taxation - sylius.behat.context.setup.zone diff --git a/src/Sylius/Component/Core/Test/Services/DefaultUnitedStatesChannelFactory.php b/src/Sylius/Component/Core/Test/Services/DefaultUnitedStatesChannelFactory.php index 98fb119815..6b795b7f7c 100644 --- a/src/Sylius/Component/Core/Test/Services/DefaultUnitedStatesChannelFactory.php +++ b/src/Sylius/Component/Core/Test/Services/DefaultUnitedStatesChannelFactory.php @@ -30,6 +30,7 @@ final class DefaultUnitedStatesChannelFactory implements DefaultChannelFactoryIn const DEFAULT_COUNTRY_CODE = 'US'; const DEFAULT_ZONE_CODE = 'US'; const DEFAULT_ZONE_NAME = 'United States'; + const DEFAULT_CHANNEL_NAME = 'United States'; /** * @var RepositoryInterface @@ -157,7 +158,7 @@ final class DefaultUnitedStatesChannelFactory implements DefaultChannelFactoryIn $currency = $this->provideCurrency(); $locale = $this->provideLocale(); - $channel = $this->createChannel($code ?: self::DEFAULT_CHANNEL_CODE, $name ?: self::DEFAULT_ZONE_NAME); + $channel = $this->createChannel($code ?: self::DEFAULT_CHANNEL_CODE, $name ?: self::DEFAULT_CHANNEL_NAME); $channel->addCurrency($currency); $channel->setDefaultCurrency($currency); $channel->addLocale($locale);