From e5958c34b3094ff55731db143a5e1709bcb3aaf3 Mon Sep 17 00:00:00 2001 From: PoulainMaxime Date: Thu, 5 Sep 2024 16:32:13 +0200 Subject: [PATCH] chore: fixing behat test --- .../Restrictions/cart_rule_carrier_restriction.feature | 1 + .../Restrictions/cart_rule_country_restriction.feature | 1 + .../Scenario/Cart/CartRule/FrontOffice/carrier.feature | 1 + .../Cart/CartRule/FrontOffice/cart_rule_validation.feature | 1 + .../Behaviour/Features/Scenario/Cart/carrier.feature | 3 ++- .../Behaviour/Features/Scenario/Cart/cart_to_order.feature | 7 +++++++ .../Features/Scenario/Cart/delivery_options.feature | 1 + .../Scenario/CartRule/set_carrier_restrictions.feature | 5 +++++ .../CartRule/set_mixed_cart_rule_restrictions.feature | 5 +++++ .../Features/Scenario/Order/order_cart_rules.feature | 2 ++ .../Product/Shop/duplicate_product_multishop.feature | 5 +++++ .../Product/Shop/update_shipping_multishop.feature | 5 +++++ .../Scenario/Product/bulk_duplicate_product.feature | 5 +++++ .../Features/Scenario/Product/duplicate_product.feature | 5 +++++ .../Features/Scenario/Product/update_shipping.feature | 5 +++++ 15 files changed, 51 insertions(+), 1 deletion(-) diff --git a/tests/Integration/Behaviour/Features/Scenario/Cart/CartRule/FrontOffice/Restrictions/cart_rule_carrier_restriction.feature b/tests/Integration/Behaviour/Features/Scenario/Cart/CartRule/FrontOffice/Restrictions/cart_rule_carrier_restriction.feature index b263c246fc334..d3a17e87b8d0a 100644 --- a/tests/Integration/Behaviour/Features/Scenario/Cart/CartRule/FrontOffice/Restrictions/cart_rule_carrier_restriction.feature +++ b/tests/Integration/Behaviour/Features/Scenario/Cart/CartRule/FrontOffice/Restrictions/cart_rule_carrier_restriction.feature @@ -25,6 +25,7 @@ Feature: Cart calculation with carrier specific cart rules And there is an address named "address2" with postcode "1" in state "state2" And I create carrier "carrier1" with specified properties: | name | Carrier 1 | + | zones | zone1, zone2 | Then I set ranges for carrier "carrier1" with specified properties for all shops: | id_zone | range_from | range_to | range_price | | zone1 | 0 | 10000 | 3.1 | diff --git a/tests/Integration/Behaviour/Features/Scenario/Cart/CartRule/FrontOffice/Restrictions/cart_rule_country_restriction.feature b/tests/Integration/Behaviour/Features/Scenario/Cart/CartRule/FrontOffice/Restrictions/cart_rule_country_restriction.feature index c7e1b5232136b..aefa8059b6f1d 100644 --- a/tests/Integration/Behaviour/Features/Scenario/Cart/CartRule/FrontOffice/Restrictions/cart_rule_country_restriction.feature +++ b/tests/Integration/Behaviour/Features/Scenario/Cart/CartRule/FrontOffice/Restrictions/cart_rule_country_restriction.feature @@ -24,6 +24,7 @@ Feature: Cart calculation with country specific cart rules And there is an address named "address-us" with postcode "1" in state "state-us" And I create carrier "carrier1" with specified properties: | name | Carrier 1 | + | zones | zone1, zone2 | Then I set ranges for carrier "carrier1" with specified properties for all shops: | id_zone | range_from | range_to | range_price | | zone1 | 0 | 10000 | 12.3 | diff --git a/tests/Integration/Behaviour/Features/Scenario/Cart/CartRule/FrontOffice/carrier.feature b/tests/Integration/Behaviour/Features/Scenario/Cart/CartRule/FrontOffice/carrier.feature index 92590a4583177..2de1aa197cdf4 100644 --- a/tests/Integration/Behaviour/Features/Scenario/Cart/CartRule/FrontOffice/carrier.feature +++ b/tests/Integration/Behaviour/Features/Scenario/Cart/CartRule/FrontOffice/carrier.feature @@ -25,6 +25,7 @@ Feature: Cart calculation with cart rules and different carriers And there is an address named "address2" with postcode "2" in state "state2" And I create carrier "carrier1" with specified properties: | name | carrier 1 | + | zones | zone1, zone2 | And I set ranges for carrier "carrier1" with specified properties for all shops: | id_zone | range_from | range_to | range_price | | zone1 | 0 | 1000 | 3.1 | diff --git a/tests/Integration/Behaviour/Features/Scenario/Cart/CartRule/FrontOffice/cart_rule_validation.feature b/tests/Integration/Behaviour/Features/Scenario/Cart/CartRule/FrontOffice/cart_rule_validation.feature index a7ae20d451e08..c13c47e04531d 100644 --- a/tests/Integration/Behaviour/Features/Scenario/Cart/CartRule/FrontOffice/cart_rule_validation.feature +++ b/tests/Integration/Behaviour/Features/Scenario/Cart/CartRule/FrontOffice/cart_rule_validation.feature @@ -68,6 +68,7 @@ Feature: Cart rule application is validated before it is applied to cart | discount_percentage | 50 | And I create carrier "carrier1" with specified properties: | name | Carrier 1 | + | zones| zone1 | And I restrict following carriers for cart rule cart_rule_4: | restricted carriers | carrier1 | And I save all the restrictions for cart rule cart_rule_4 diff --git a/tests/Integration/Behaviour/Features/Scenario/Cart/carrier.feature b/tests/Integration/Behaviour/Features/Scenario/Cart/carrier.feature index 897a41720228b..c1ac147931ba3 100644 --- a/tests/Integration/Behaviour/Features/Scenario/Cart/carrier.feature +++ b/tests/Integration/Behaviour/Features/Scenario/Cart/carrier.feature @@ -13,7 +13,8 @@ Feature: Cart calculation with carriers | name | zone2 | | enabled | true | Given I create carrier "carrier1" with specified properties: - | name | carrier 1 | + | name | carrier 1 | + | zones | zone1, zone2 | Given I set ranges for carrier "carrier1" with specified properties for all shops: | id_zone | range_from | range_to | range_price | | zone1 | 0 | 10000 | 3.1 | diff --git a/tests/Integration/Behaviour/Features/Scenario/Cart/cart_to_order.feature b/tests/Integration/Behaviour/Features/Scenario/Cart/cart_to_order.feature index c9fc8c522a4d2..098808c77d9e9 100644 --- a/tests/Integration/Behaviour/Features/Scenario/Cart/cart_to_order.feature +++ b/tests/Integration/Behaviour/Features/Scenario/Cart/cart_to_order.feature @@ -35,6 +35,7 @@ Feature: Check cart to order data copy Given address "address1" is associated to customer "customer1" And I create carrier "carrier1" with specified properties: | name | carrier 1 | + | zones| zone1 | Then I set ranges for carrier "carrier1" with specified properties for all shops: | id_zone | range_from | range_to | range_price | | zone1 | 0 | 10000 | 5.0 | @@ -74,6 +75,7 @@ Feature: Check cart to order data copy Given address "address1" is associated to customer "customer1" And I create carrier "carrier1" with specified properties: | name | carrier 1 | + | zones| zone1 | Then I set ranges for carrier "carrier1" with specified properties for all shops: | id_zone | range_from | range_to | range_price | | zone1 | 0 | 10000 | 5.0 | @@ -110,6 +112,7 @@ Feature: Check cart to order data copy Given address "address1" is associated to customer "customer1" And I create carrier "carrier1" with specified properties: | name | carrier 1 | + | zones | zone1 | Then I set ranges for carrier "carrier1" with specified properties for all shops: | id_zone | range_from | range_to | range_price | | zone1 | 0 | 10000 | 5.0 | @@ -152,6 +155,7 @@ Feature: Check cart to order data copy Given address "address1" is associated to customer "customer1" And I create carrier "carrier1" with specified properties: | name | carrier 1 | + | zones | zone1 | Then I set ranges for carrier "carrier1" with specified properties for all shops: | id_zone | range_from | range_to | range_price | | zone1 | 0 | 10000 | 5.0 | @@ -195,6 +199,7 @@ Feature: Check cart to order data copy Given address "address1" is associated to customer "customer1" And I create carrier "carrier1" with specified properties: | name | carrier 1 | + | zones | zone1 | Then I set ranges for carrier "carrier1" with specified properties for all shops: | id_zone | range_from | range_to | range_price | | zone1 | 0 | 10000 | 5.0 | @@ -236,6 +241,7 @@ Feature: Check cart to order data copy Given address "address1" is associated to customer "customer1" And I create carrier "carrier1" with specified properties: | name | carrier 1 | + | zones | zone1 | Then I set ranges for carrier "carrier1" with specified properties for all shops: | id_zone | range_from | range_to | range_price | | zone1 | 0 | 10000 | 5.0 | @@ -275,6 +281,7 @@ Feature: Check cart to order data copy Given address "address1" is associated to customer "customer1" And I create carrier "carrier1" with specified properties: | name | carrier 1 | + | zones | zone1 | And I set ranges for carrier "carrier1" with specified properties for all shops: | id_zone | range_from | range_to | range_price | | zone1 | 0 | 10000 | 5.0 | diff --git a/tests/Integration/Behaviour/Features/Scenario/Cart/delivery_options.feature b/tests/Integration/Behaviour/Features/Scenario/Cart/delivery_options.feature index 71070515d2f60..6e6d2b1a703dc 100644 --- a/tests/Integration/Behaviour/Features/Scenario/Cart/delivery_options.feature +++ b/tests/Integration/Behaviour/Features/Scenario/Cart/delivery_options.feature @@ -41,6 +41,7 @@ Feature: Compute correct delivery options # One standard carrier And I create carrier "carrier1" with specified properties: | name | Carrier 1 | + | zones | zone1 | Then I set ranges for carrier "carrier1" with specified properties for all shops: | id_zone | range_from | range_to | range_price | | zone1 | 0 | 10000 | 5.0 | diff --git a/tests/Integration/Behaviour/Features/Scenario/CartRule/set_carrier_restrictions.feature b/tests/Integration/Behaviour/Features/Scenario/CartRule/set_carrier_restrictions.feature index 5bb7588e7a88e..ec4eaec14759a 100644 --- a/tests/Integration/Behaviour/Features/Scenario/CartRule/set_carrier_restrictions.feature +++ b/tests/Integration/Behaviour/Features/Scenario/CartRule/set_carrier_restrictions.feature @@ -7,6 +7,9 @@ Feature: Set cart rule carrier restrictions in BO Background: Given shop "shop1" with name "test_shop" exists + Given I add new zone "zone1" with following properties: + | name | zone1 | + | enabled | true | And there is a currency named "usd" with iso code "USD" and exchange rate of 0.92 And there is a currency named "chf" with iso code "CHF" and exchange rate of 1.25 And currency "usd" is the default one @@ -14,8 +17,10 @@ Feature: Set cart rule carrier restrictions in BO And language with iso code "en" is the default one And I create carrier "carrier1" with specified properties: | name | Carrier 1 | + | zones | zone1 | And I create carrier "carrier2" with specified properties: | name | Carrier 2 | + | zones | zone1 | And I add product "product1" with following information: | name[en-US] | bottle of beer | | type | virtual | diff --git a/tests/Integration/Behaviour/Features/Scenario/CartRule/set_mixed_cart_rule_restrictions.feature b/tests/Integration/Behaviour/Features/Scenario/CartRule/set_mixed_cart_rule_restrictions.feature index 2ee9e082b1524..45231d9837479 100644 --- a/tests/Integration/Behaviour/Features/Scenario/CartRule/set_mixed_cart_rule_restrictions.feature +++ b/tests/Integration/Behaviour/Features/Scenario/CartRule/set_mixed_cart_rule_restrictions.feature @@ -7,6 +7,9 @@ Feature: Set cart rule restrictions in BO Background: Given shop "shop1" with name "test_shop" exists + Given I add new zone "zone1" with following properties: + | name | zone1 | + | enabled | true | And there is a currency named "usd" with iso code "USD" and exchange rate of 0.92 And there is a currency named "chf" with iso code "CHF" and exchange rate of 1.25 And currency "usd" is the default one @@ -28,8 +31,10 @@ Feature: Set cart rule restrictions in BO And supplier accessoriesSupplier named "Accessories supplier" exists And I create carrier "carrier1" with specified properties: | name | carrier 1 | + | zones | zone1 | And I create carrier "carrier2" with specified properties: | name | carrier 2 | + | zones | zone1 | And I add new country "France" with following properties: | name[en-US] | France | | iso_code | FR | diff --git a/tests/Integration/Behaviour/Features/Scenario/Order/order_cart_rules.feature b/tests/Integration/Behaviour/Features/Scenario/Order/order_cart_rules.feature index 8998319d5ea2c..b274a42d508f7 100644 --- a/tests/Integration/Behaviour/Features/Scenario/Order/order_cart_rules.feature +++ b/tests/Integration/Behaviour/Features/Scenario/Order/order_cart_rules.feature @@ -724,8 +724,10 @@ Feature: Order from Back Office (BO) And there is a country named "country1" and iso code "FR" in zone "zone1" And I create carrier "carrier1" with specified properties: | name | carrier 1 | + | zones | zone1 | And I create carrier "carrier2" with specified properties: | name | carrier 2 | + | zones | zone1 | Then I set ranges for carrier "carrier1" with specified properties for all shops: | id_zone | range_from | range_to | range_price | | zone1 | 0 | 10000 | 0.0 | diff --git a/tests/Integration/Behaviour/Features/Scenario/Product/Shop/duplicate_product_multishop.feature b/tests/Integration/Behaviour/Features/Scenario/Product/Shop/duplicate_product_multishop.feature index 5c4abac59ecc9..b55bfa7af51a0 100644 --- a/tests/Integration/Behaviour/Features/Scenario/Product/Shop/duplicate_product_multishop.feature +++ b/tests/Integration/Behaviour/Features/Scenario/Product/Shop/duplicate_product_multishop.feature @@ -14,6 +14,9 @@ Feature: Copy product from shop to shop. Scenario: This are pre-requisite steps but it is only done once, that is why we don't use Background here Given I enable multishop feature + Given I add new zone "zone1" with following properties: + | name | zone1 | + | enabled | true | # Prepare languages And language "english" with locale "en-US" exists And language "french" with locale "fr-FR" exists @@ -55,8 +58,10 @@ Feature: Copy product from shop to shop. And manufacturer studioDesign named "Studio Design" exists And I create carrier "carrier1" with specified properties: | name | ecoCarrier | + | zones | zone1 | And I create carrier "carrier2" with specified properties: | name | Fast carry | + | zones | zone1 | # Prepare a few data And I add new tax "us-tax-state-1" with following properties: | name | US Tax (6%) | diff --git a/tests/Integration/Behaviour/Features/Scenario/Product/Shop/update_shipping_multishop.feature b/tests/Integration/Behaviour/Features/Scenario/Product/Shop/update_shipping_multishop.feature index 6d1c41249de89..031aaae876d0c 100644 --- a/tests/Integration/Behaviour/Features/Scenario/Product/Shop/update_shipping_multishop.feature +++ b/tests/Integration/Behaviour/Features/Scenario/Product/Shop/update_shipping_multishop.feature @@ -11,6 +11,9 @@ Feature: Update product shipping information from Back Office (BO) for multiple Background: Given shop "shop1" with name "test_shop" exists + Given I add new zone "zone1" with following properties: + | name | zone1 | + | enabled | true | And language "english" with locale "en-US" exists And language with iso code "en" is the default one And language "french" with locale "fr-FR" exists @@ -37,8 +40,10 @@ Feature: Update product shipping information from Back Office (BO) for multiple | carriers | [] | And I create carrier "carrier1" with specified properties: | name | ecoCarrier | + | zones | zone1 | And I create carrier "carrier2" with specified properties: | name | Fast carry | + | zones | zone1 | When I update product "product1" with following values: | width | 10.5 | | height | 6 | diff --git a/tests/Integration/Behaviour/Features/Scenario/Product/bulk_duplicate_product.feature b/tests/Integration/Behaviour/Features/Scenario/Product/bulk_duplicate_product.feature index 75bd02482ecc6..127d688c6d06b 100644 --- a/tests/Integration/Behaviour/Features/Scenario/Product/bulk_duplicate_product.feature +++ b/tests/Integration/Behaviour/Features/Scenario/Product/bulk_duplicate_product.feature @@ -10,6 +10,9 @@ Feature: Duplicate product from Back Office (BO). Background: Given category "home" in default language named "Home" exists + Given I add new zone "zone1" with following properties: + | name | zone1 | + | enabled | true | And category "home" is the default one And shop "shop1" with name "test_shop" exists And single shop shop1 context is loaded @@ -22,8 +25,10 @@ Feature: Duplicate product from Back Office (BO). And language "language2" with locale "fr-FR" exists And I create carrier "carrier1" with specified properties: | name | ecoCarrier | + | zones | zone1 | And I create carrier "carrier2" with specified properties: | name | Fast carry | + | zones | zone1 | And I add new supplier supplier1 with the following properties: | name | my supplier 1 | | address | Donelaicio st. 1 | diff --git a/tests/Integration/Behaviour/Features/Scenario/Product/duplicate_product.feature b/tests/Integration/Behaviour/Features/Scenario/Product/duplicate_product.feature index 70e9a5295f727..7965e50f2ec11 100644 --- a/tests/Integration/Behaviour/Features/Scenario/Product/duplicate_product.feature +++ b/tests/Integration/Behaviour/Features/Scenario/Product/duplicate_product.feature @@ -11,13 +11,18 @@ Feature: Duplicate product from Back Office (BO). Background: Given manufacturer studioDesign named "Studio Design" exists + Given I add new zone "zone1" with following properties: + | name | zone1 | + | enabled | true | And language "language1" with locale "en-US" exists And language with iso code "en" is the default one And language "language2" with locale "fr-FR" exists And I create carrier "carrier1" with specified properties: | name | ecoCarrier | + | zones | zone1 | And I create carrier "carrier2" with specified properties: | name | Fast carry | + | zones | zone1 | And attribute group "Color" named "Color" in en language exists And attribute "Red" named "Red" in en language exists And attribute "Blue" named "Blue" in en language exists diff --git a/tests/Integration/Behaviour/Features/Scenario/Product/update_shipping.feature b/tests/Integration/Behaviour/Features/Scenario/Product/update_shipping.feature index cd1815c6ccb92..8b2f5af7c33f5 100644 --- a/tests/Integration/Behaviour/Features/Scenario/Product/update_shipping.feature +++ b/tests/Integration/Behaviour/Features/Scenario/Product/update_shipping.feature @@ -6,6 +6,9 @@ Feature: Update product shipping options from Back Office (BO) As a BO user I must be able to update product shipping options from BO Scenario: I update product shipping + Given I add new zone "zone1" with following properties: + | name | zone1 | + | enabled | true | Given I add product "product1" with following information: | name[en-US] | Last samurai dvd | | type | standard | @@ -21,8 +24,10 @@ Feature: Update product shipping options from Back Office (BO) | carriers | [] | And I create carrier "carrier1" with specified properties: | name | ecoCarrier | + | zones | zone1 | And I create carrier "carrier2" with specified properties: | name | Fast carry | + | zones | zone1 | When I update product "product1" with following values: | width | 10.5 | | height | 6 |