Skip to content

Commit

Permalink
chore: fixing behat test
Browse files Browse the repository at this point in the history
  • Loading branch information
PoulainMaxime committed Sep 5, 2024
1 parent 7ffc961 commit e5958c3
Show file tree
Hide file tree
Showing 15 changed files with 51 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down Expand Up @@ -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 |
Expand Down Expand Up @@ -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 |
Expand Down Expand Up @@ -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 |
Expand Down Expand Up @@ -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 |
Expand Down Expand Up @@ -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 |
Expand Down Expand Up @@ -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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,20 @@ 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
And language "language1" with locale "en-US" exists
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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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%) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -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 |
Expand Down

0 comments on commit e5958c3

Please sign in to comment.