Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.0] Further ui tests #1347

Merged
merged 12 commits into from
Apr 14, 2020
Merged
4 changes: 2 additions & 2 deletions features/domain/cart/cart_units.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Feature: Create a new cart
And the site has a product-unit "Carton"
And the site has a product-unit "Palette"
And the product has the default unit "Pieces"
And the product has and additional unit "Carton" with conversion rate "24"
And the product has and additional unit "Palette" with conversion rate "200"
And the product has an additional unit "Carton" with conversion rate "24"
And the product has an additional unit "Palette" with conversion rate "200"

Scenario: Create a new cart and add a product
Given I add the product "T-Shirt" with unit "Pieces" to my cart
Expand Down
4 changes: 2 additions & 2 deletions features/domain/cart/cart_units_precision.feature
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Feature: Create a new cart
And the site has a product "Shoes" priced at 1000
And the product has the tax rule group "AT"
And the product has the default unit "Pieces"
And the product has and additional unit "Carton" with conversion rate "24" and price 2000 and precision 2
And the product has and additional unit "Palette" with conversion rate "200" and price 150000 and precision 4
And the product has an additional unit "Carton" with conversion rate "24" and price 2000 and precision 2
And the product has an additional unit "Palette" with conversion rate "200" and price 150000 and precision 4

Scenario: Create a new cart and add a product and calculate totals
Given I add the product "Shoes" with unit "Carton" in quantity 1.5 to my cart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Feature: Create a new cart
And the site has a product "Shoes" priced at 1000
And the product has the tax rule group "AT"
And the product has the default unit "Pieces"
And the product has and additional unit "Carton" with conversion rate "24" and price 2000 and precision 2
And the product has and additional unit "Palette" with conversion rate "200" and price 150000 and precision 4
And the product has an additional unit "Carton" with conversion rate "24" and price 2000 and precision 2
And the product has an additional unit "Palette" with conversion rate "200" and price 150000 and precision 4
And adding a cart price rule named "discount"
And the cart rule is active
And the cart rule is a voucher rule with code "asdf"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Feature: Create a new cart
And the site has a product "Shoes" priced at 1000
And the product has the tax rule group "AT"
And the product has the default unit "Pieces"
And the product has and additional unit "Carton" with conversion rate "24" and price 2000 and precision 2
And the product has and additional unit "Palette" with conversion rate "200" and price 150000 and precision 4
And the product has an additional unit "Carton" with conversion rate "24" and price 2000 and precision 2
And the product has an additional unit "Palette" with conversion rate "200" and price 150000 and precision 4
And adding a cart price rule named "discount"
And the cart rule is active
And the cart rule is a voucher rule with code "asdf"
Expand Down
16 changes: 8 additions & 8 deletions features/domain/cart/cart_units_taxation_gross.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ Feature: Create a new cart where store uses gross values
And the site has a product "Shoes" priced at 1000
And the product has the tax rule group "AT"
And the product has the default unit "Pieces"
And the product has and additional unit "Carton" with conversion rate "24" and price 2000
And the product has and additional unit "Palette" with conversion rate "200" and price 150000
And the product has an additional unit "Carton" with conversion rate "24" and price 2000
And the product has an additional unit "Palette" with conversion rate "200" and price 150000
And the site has a product "T-Shirt" priced at 2000
And the product has the tax rule group "AT"
And the product has the default unit "Pieces"
And the product has and additional unit "Carton" with conversion rate "24" and price 4000
And the product has and additional unit "Palette" with conversion rate "200" and price 300000
And the product has an additional unit "Carton" with conversion rate "24" and price 4000
And the product has an additional unit "Palette" with conversion rate "200" and price 300000
And the site has a product "Shorts" priced at 3000
And the product has the tax rule group "AT"
And the product has the default unit "Pieces"
And the product has and additional unit "Carton" with conversion rate "24" and price 3000
And the product has and additional unit "Palette" with conversion rate "200" and price 450000
And the product has an additional unit "Carton" with conversion rate "24" and price 3000
And the product has an additional unit "Palette" with conversion rate "200" and price 450000
And the site has a product "CH T-Shirt" priced at 1590
And the product has the tax rule group "CH"
And the product has the default unit "Pieces"
And the product has and additional unit "Carton" with conversion rate "24" and price 35000
And the product has and additional unit "Palette" with conversion rate "200" and price 250000
And the product has an additional unit "Carton" with conversion rate "24" and price 35000
And the product has an additional unit "Palette" with conversion rate "200" and price 250000

Scenario: Create a new cart and add a product and calculate totals
Given I add the product "T-Shirt" with unit "Carton" to my cart
Expand Down
16 changes: 8 additions & 8 deletions features/domain/cart/cart_units_taxation_net.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ Feature: Create a new cart where store uses gross values
And the site has a product "Shoes" priced at 1000
And the product has the tax rule group "AT"
And the product has the default unit "Pieces"
And the product has and additional unit "Carton" with conversion rate "24" and price 2000
And the product has and additional unit "Palette" with conversion rate "200" and price 150000
And the product has an additional unit "Carton" with conversion rate "24" and price 2000
And the product has an additional unit "Palette" with conversion rate "200" and price 150000
And the site has a product "T-Shirt" priced at 2000
And the product has the tax rule group "AT"
And the product has the default unit "Pieces"
And the product has and additional unit "Carton" with conversion rate "24" and price 4000
And the product has and additional unit "Palette" with conversion rate "200" and price 300000
And the product has an additional unit "Carton" with conversion rate "24" and price 4000
And the product has an additional unit "Palette" with conversion rate "200" and price 300000
And the site has a product "Shorts" priced at 3000
And the product has the tax rule group "AT"
And the product has the default unit "Pieces"
And the product has and additional unit "Carton" with conversion rate "24" and price 3000
And the product has and additional unit "Palette" with conversion rate "200" and price 450000
And the product has an additional unit "Carton" with conversion rate "24" and price 3000
And the product has an additional unit "Palette" with conversion rate "200" and price 450000
And the site has a product "CH T-Shirt" priced at 1590
And the product has the tax rule group "CH"
And the product has the default unit "Pieces"
And the product has and additional unit "Carton" with conversion rate "24" and price 35000
And the product has and additional unit "Palette" with conversion rate "200" and price 250000
And the product has an additional unit "Carton" with conversion rate "24" and price 35000
And the product has an additional unit "Palette" with conversion rate "200" and price 250000

Scenario: Create a new cart and add a product and calculate totals
Given I add the product "T-Shirt" with unit "Carton" to my cart
Expand Down
4 changes: 2 additions & 2 deletions features/domain/product/product_unit.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Feature: Adding a new Product
And the site has a product-unit "Palette"
And the site has a product "Shoe 2" priced at 200
And the product has the default unit "Pieces"
And the product has and additional unit "Carton" with conversion rate "24"
And the product has and additional unit "Palette" with conversion rate "200"
And the product has an additional unit "Carton" with conversion rate "24"
And the product has an additional unit "Palette" with conversion rate "200"
Then the product should have and additional unit "Carton" with conversion rate "24"
Then the product should have and additional unit "Palette" with conversion rate "200"
31 changes: 31 additions & 0 deletions features/ui/cart/adding_product_to_cart_with_maximum_qty.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
@ui @cart @wip
Feature: Adding a product to the cart with maximum Quantity to Order

Background:
Given the site operates on a store in "Austria"
And the store "Austria" is the default store
And the site has a product "TShirt" priced at 10000
And the product is active and published and available for store "Austria"

Scenario: Adding product to cart with minimum quantity to order
Given the product "TShirt" has a maximum order quantity of "100"
When I add 99 of this product to the cart
Then I should be on the cart summary page
And I should be notified that the product has been successfully added
And there should be one item in my cart
And this item should have name "TSHIRT"
And I should see "TShirt" with unit price "€100.00" in my cart

Scenario: Adding product to cart with less than minimum quantity to order
Given the product "TShirt" has a maximum order quantity of "100"
When I add 101 of this product to the cart
Then I should be on the cart summary page
And I should be notified that I can only order a maximum of 100 of TSHIRT


Scenario: Adding product to cart with less than minimum quantity to order with smaller quantities
Given the product "TShirt" has a maximum order quantity of "2"
When I add 3 of this product to the cart
Then I should be on the cart summary page
And I should be notified that I can only order a maximum of 2 of TSHIRT

31 changes: 31 additions & 0 deletions features/ui/cart/adding_product_to_cart_with_minimum_qty.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
@ui @cart @wip
Feature: Adding a product to the cart with minimum Quantity to Order

Background:
Given the site operates on a store in "Austria"
And the store "Austria" is the default store
And the site has a product "TShirt" priced at 10000
And the product is active and published and available for store "Austria"

Scenario: Adding product to cart with minimum quantity to order
Given the product "TShirt" has a minimum order quantity of "100"
When I add 100 of this product to the cart
Then I should be on the cart summary page
And I should be notified that the product has been successfully added
And there should be one item in my cart
And this item should have name "TSHIRT"
And I should see "TShirt" with unit price "€100.00" in my cart

Scenario: Adding product to cart with less than minimum quantity to order
Given the product "TShirt" has a minimum order quantity of "100"
When I add 99 of this product to the cart
Then I should be on the cart summary page
And I should be notified that I need to order at least 100 of TSHIRT


Scenario: Adding product to cart with less than minimum quantity to order with smaller quantities
Given the product "TShirt" has a minimum order quantity of "2"
When I add 1 of this product to the cart
Then I should be on the cart summary page
And I should be notified that I need to order at least 2 of TSHIRT

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ui @cart @wip
Feature: Adding a product to the cart with a Product that is tracked and out-of-stock

Background:
Given the site operates on a store in "Austria"
And the store "Austria" is the default store
And the site has a product "TShirt" priced at 10000
And the product is active and published and available for store "Austria"
And the product is stock tracked
And the product has 2 on hand
And the product has 0 on hold

Scenario: Adding product to cart with enough quantity left
When I add 2 of this product to the cart
Then I should be on the cart summary page
And I should be notified that the product has been successfully added
And there should be one item in my cart
And this item should have name "TSHIRT"
And I should see "TShirt" with unit price "€100.00" in my cart

Scenario: Adding product to cart with more than stocked quantity
When I add 3 of this product to the cart
Then I should be on the cart summary page
And I should be notified that TSHIRT does not have sufficient stock

Scenario: Adding product, with on-hold stock, to cart with more than stocked quantity
Given the product has 2 on hold
Then I should see that this product is out of stock

Scenario: Adding product, with on-hold stock, to cart with enough quantity
Given the product has 1 on hold
When I add 2 of this product to the cart
Then I should be on the cart summary page
And I should be notified that TSHIRT does not have sufficient stock

Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
@ui @cart @wip
Feature: Adding a product with a quantity price rule

Background:
Given the site operates on a store in "Austria"
And the store "Austria" is the default store
And the site has a product "TShirt" priced at 10000
And the product is active and published and available for store "Austria"

Scenario: Adding product with quantity price rule of type percentage-decrease in quantity 1 to cart
Given adding a quantity price rule to this product named "default-product-quantity-price-rule" with calculation-behaviour "volume"
And the quantity price rule is active
And the quantity price rule has a range starting from 5 with behaviour percentage-decrease of 10%
When I add this product to the cart
Then I should be on the cart summary page
And I should be notified that the product has been successfully added
And I should see "TShirt" with unit price "€100.00" in my cart

Scenario: Adding product with quantity price rule of type percentage-decrease in quantity 5 to cart
Given adding a quantity price rule to this product named "default-product-quantity-price-rule" with calculation-behaviour "volume"
And the quantity price rule is active
And the quantity price rule has a range starting from 5 with behaviour percentage-decrease of 10%
When I add 5 of this product to the cart
Then I should be on the cart summary page
And I should be notified that the product has been successfully added
And I should see "TShirt" with unit price "€90.00" in my cart
And I should see "TShirt" with total price "€450.00" in my cart

Scenario: Adding product with quantity price rule of type amount-decrease in quantity 1 to cart
Given adding a quantity price rule to this product named "default-product-quantity-price-rule" with calculation-behaviour "volume"
And the quantity price rule is active
And the quantity price rule has a range starting from 5 with behaviour amount-decrease of 2000 in currency "EUR"
When I add this product to the cart
Then I should be on the cart summary page
And I should be notified that the product has been successfully added
And I should see "TShirt" with unit price "€100.00" in my cart

Scenario: Adding product with quantity price rule of type percentage-decrease in quantity 5 to cart
Given adding a quantity price rule to this product named "default-product-quantity-price-rule" with calculation-behaviour "volume"
And the quantity price rule is active
And the quantity price rule has a range starting from 5 with behaviour amount-decrease of 2000 in currency "EUR"
When I add 5 of this product to the cart
Then I should be on the cart summary page
And I should be notified that the product has been successfully added
And I should see "TShirt" with unit price "€80.00" in my cart
And I should see "TShirt" with total price "€400.00" in my cart

Scenario: Adding product with quantity price rule of type fixed price in quantity 1 to cart
Given adding a quantity price rule to this product named "default-product-quantity-price-rule" with calculation-behaviour "volume"
And the quantity price rule is active
And the quantity price rule has a range starting from 5 with behaviour fixed of 7000 in currency "EUR"
When I add this product to the cart
Then I should be on the cart summary page
And I should be notified that the product has been successfully added
And I should see "TShirt" with unit price "€100.00" in my cart

Scenario: Adding product with quantity price rule of type fixed price in quantity 5 to cart
Given adding a quantity price rule to this product named "default-product-quantity-price-rule" with calculation-behaviour "volume"
And the quantity price rule is active
And the quantity price rule has a range starting from 5 with behaviour fixed of 7000 in currency "EUR"
When I add 5 of this product to the cart
Then I should be on the cart summary page
And I should be notified that the product has been successfully added
And I should see "TShirt" with unit price "€70.00" in my cart
And I should see "TShirt" with total price "€350.00" in my cart
Loading