From b0cd5d14cb89031a8e09f61555e69d6f75c1db2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pysiak?= Date: Tue, 10 Sep 2024 10:55:30 +0200 Subject: [PATCH] Enable scenarios, fix behat context --- ...lying_correct_taxes_based_on_customer_data.feature | 6 +++--- ...t_taxes_for_items_with_different_tax_rates.feature | 4 ++-- ...ect_taxes_for_items_with_the_same_tax_rate.feature | 10 +++++----- ...r_order_with_discount_for_an_item_in_order.feature | 8 ++++---- ...m_in_order_when_tax_rate_included_in_price.feature | 8 ++++---- ...taxes_for_order_with_discount_for_shipping.feature | 6 +++--- ...r_shipping_when_tax_rate_included_in_price.feature | 8 ++++---- ...es_for_order_with_discount_for_whole_order.feature | 10 +++++----- ...hole_order_when_tax_rate_included_in_price.feature | 10 +++++----- ...or_product_with_tax_rate_included_in_price.feature | 8 ++++---- ...th_different_tax_rates_for_different_zones.feature | 10 +++++----- .../applying_correct_taxes_for_shipping.feature | 4 ++-- ...r_shipping_with_tax_rate_included_in_price.feature | 4 ++-- .../applying_correct_taxes_on_visitor_cart.feature | 4 ++-- ...ct_taxes_on_visitor_cart_for_specific_date.feature | 4 ++-- ...s_for_variants_with_different_tax_category.feature | 2 +- ...ng_taxes_for_products_without_tax_category.feature | 6 +++--- .../rounding_taxes_on_order_item_level.feature | 6 +++--- ...es_for_item_units_with_different_tax_rates.feature | 4 ++-- ...axes_for_item_units_with_discount_for_item.feature | 8 ++++---- ...t_for_item_when_tax_rate_included_in_price.feature | 8 ++++---- ...r_item_units_with_discount_for_whole_order.feature | 6 +++--- ...hole_order_when_tax_rate_included_in_price.feature | 8 ++++---- ...item_units_with_tax_rate_included_in_price.feature | 10 +++++----- ...axes_for_item_units_with_the_same_tax_rate.feature | 10 +++++----- src/Sylius/Behat/Page/Shop/Cart/SummaryPage.php | 11 +++-------- 26 files changed, 89 insertions(+), 94 deletions(-) diff --git a/features/shop/taxation/applying_taxes/applying_correct_taxes_based_on_customer_data.feature b/features/shop/taxation/applying_taxes/applying_correct_taxes_based_on_customer_data.feature index ccb0620a23..3e2565a2ba 100644 --- a/features/shop/taxation/applying_taxes/applying_correct_taxes_based_on_customer_data.feature +++ b/features/shop/taxation/applying_taxes/applying_correct_taxes_based_on_customer_data.feature @@ -15,14 +15,14 @@ Feature: Apply correct taxes based on customer data And it belongs to "Clothes" tax category And there is user "john@example.com" with "Germany" as shipping country - @api @todo-ui + @api @ui @javascript Scenario: Proper taxes for logged in Customer Given I am logged in as "john@example.com" 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" - @api @todo-ui + @api @ui @javascript Scenario: Proper taxes after specifying shipping address Given I am a logged in customer When I add product "PHP T-Shirt" to the cart @@ -30,7 +30,7 @@ Feature: Apply correct taxes based on customer data Then my cart total should be "$123.00" And my cart taxes should be "$23.00" - @api @todo-ui + @api @ui @javascript Scenario: Proper taxes after specifying shipping address Given I am a logged in customer When I add product "PHP T-Shirt" to the cart diff --git a/features/shop/taxation/applying_taxes/applying_correct_taxes_for_items_with_different_tax_rates.feature b/features/shop/taxation/applying_taxes/applying_correct_taxes_for_items_with_different_tax_rates.feature index 435f757d5b..15cb8699b6 100644 --- a/features/shop/taxation/applying_taxes/applying_correct_taxes_for_items_with_different_tax_rates.feature +++ b/features/shop/taxation/applying_taxes/applying_correct_taxes_for_items_with_different_tax_rates.feature @@ -14,14 +14,14 @@ Feature: Apply correct taxes for items with different tax rates And the store has a product "Symfony Mug" priced at "$50.00" And it belongs to "Mugs" tax category - @api @todo-ui + @api @ui @javascript Scenario: Proper taxes for different taxed products When I add product "PHP T-Shirt" to the cart And I add product "Symfony Mug" to the cart Then my cart total should be "$175.50" And my cart taxes should be "$25.50" - @api @todo-ui + @api @ui @javascript Scenario: Proper taxes for multiple products with different tax rate When I add 3 products "PHP T-Shirt" to the cart And I add 4 products "Symfony Mug" to the cart diff --git a/features/shop/taxation/applying_taxes/applying_correct_taxes_for_items_with_the_same_tax_rate.feature b/features/shop/taxation/applying_taxes/applying_correct_taxes_for_items_with_the_same_tax_rate.feature index ebf84a8151..f157dbd2b2 100644 --- a/features/shop/taxation/applying_taxes/applying_correct_taxes_for_items_with_the_same_tax_rate.feature +++ b/features/shop/taxation/applying_taxes/applying_correct_taxes_for_items_with_the_same_tax_rate.feature @@ -13,26 +13,26 @@ Feature: Apply correct taxes for items with the same tax rate And the store has a product "Symfony Hat" priced at "$30.00" And it belongs to "Clothes" tax category - @api @todo-ui + @api @ui @javascript Scenario: Proper taxes for taxed product 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" - @api @todo-ui + @api @ui @javascript Scenario: Proper taxes for multiple same products with the same tax rate When I add 3 products "PHP T-Shirt" to the cart Then my cart total should be "$369.00" And my cart taxes should be "$69.00" - @api @todo-ui + @api @ui @javascript Scenario: Proper taxes for multiple different products with the same tax rate When I add 3 products "PHP T-Shirt" to the cart And I add 2 products "Symfony Hat" to the cart Then my cart total should be "$442.80" And my cart taxes should be "$82.80" - @api @todo-ui + @api @ui @javascript Scenario: Proper taxes after removing one of the item Given I have 3 products "PHP T-Shirt" in the cart And I have 2 products "Symfony Hat" in the cart @@ -40,7 +40,7 @@ Feature: Apply correct taxes for items with the same tax rate Then my cart total should be "$73.80" And my cart taxes should be "$13.80" - @api @todo-ui + @api @ui @javascript Scenario: Proper taxes after changing item quantity Given I have 3 products "PHP T-Shirt" in the cart And I have 2 products "Symfony Hat" in the cart diff --git a/features/shop/taxation/applying_taxes/applying_correct_taxes_for_order_with_discount_for_an_item_in_order.feature b/features/shop/taxation/applying_taxes/applying_correct_taxes_for_order_with_discount_for_an_item_in_order.feature index 83ed22bf70..cb8d4d2a5f 100644 --- a/features/shop/taxation/applying_taxes/applying_correct_taxes_for_order_with_discount_for_an_item_in_order.feature +++ b/features/shop/taxation/applying_taxes/applying_correct_taxes_for_order_with_discount_for_an_item_in_order.feature @@ -20,26 +20,26 @@ Feature: Apply correct taxes for an order with a discount for an item in it And there is a promotion "PHP promotion" And the promotion gives "$10.10" off on a "PHP Mug" product - @api @todo-ui + @api @ui @javascript Scenario: Properly rounded up tax for single product When I add product "Symfony Mug" to the cart Then my cart total should be "$50.55" And my cart taxes should be "$4.60" - @api @todo-ui + @api @ui @javascript Scenario: Properly rounded down tax for single product When I add product "PHP Mug" to the cart Then my cart total should be "$50.53" And my cart taxes should be "$4.59" - @api @todo-ui + @api @ui @javascript Scenario: Properly rounded taxes for order with multiple products without discount When I add 2 products "PHP T-Shirt" to the cart And I add product "Symfony Mug" to the cart Then my cart total should be "$75.15" And my cart taxes should be "$9.20" - @api @todo-ui + @api @ui @javascript Scenario: Properly rounded taxes for order with multiple products with discount When I add 2 products "PHP T-Shirt" to the cart And I add 2 products "Symfony Mug" to the cart diff --git a/features/shop/taxation/applying_taxes/applying_correct_taxes_for_order_with_discount_for_an_item_in_order_when_tax_rate_included_in_price.feature b/features/shop/taxation/applying_taxes/applying_correct_taxes_for_order_with_discount_for_an_item_in_order_when_tax_rate_included_in_price.feature index f7eb40def4..6517535288 100644 --- a/features/shop/taxation/applying_taxes/applying_correct_taxes_for_order_with_discount_for_an_item_in_order_when_tax_rate_included_in_price.feature +++ b/features/shop/taxation/applying_taxes/applying_correct_taxes_for_order_with_discount_for_an_item_in_order_when_tax_rate_included_in_price.feature @@ -20,26 +20,26 @@ Feature: Apply correct taxes for an order with a discount for an item in it when And there is a promotion "PHP promotion" And the promotion gives "$10.00" off on a "PHP Mug" product - @api @todo-ui + @api @ui @javascript Scenario: Properly rounded up tax for single product When I add product "Symfony Mug" to the cart Then my cart total should be "$46.95" And my included in price taxes should be "$4.27" - @api @todo-ui + @api @ui @javascript Scenario: Properly rounded down tax for single product When I add product "PHP Mug" to the cart Then my cart total should be "$46.90" And my included in price taxes should be "$4.26" - @api @todo-ui + @api @ui @javascript Scenario: Properly rounded taxes for order with multiple products without discount When I add 2 products "PHP T-Shirt" to the cart And I add product "Symfony Mug" to the cart Then my cart total should be "$66.95" And my included in price taxes should be "$8.01" - @api @todo-ui + @api @ui @javascript Scenario: Properly rounded taxes for order with multiple products with discount When I add 2 products "PHP T-Shirt" to the cart And I add 2 products "Symfony Mug" to the cart diff --git a/features/shop/taxation/applying_taxes/applying_correct_taxes_for_order_with_discount_for_shipping.feature b/features/shop/taxation/applying_taxes/applying_correct_taxes_for_order_with_discount_for_shipping.feature index 00b61de04a..30d7a6ca7c 100644 --- a/features/shop/taxation/applying_taxes/applying_correct_taxes_for_order_with_discount_for_shipping.feature +++ b/features/shop/taxation/applying_taxes/applying_correct_taxes_for_order_with_discount_for_shipping.feature @@ -13,7 +13,7 @@ Feature: Apply correct taxes for an order with a discount for a shipping And the promotion gives "10%" discount on shipping to every order And I am a logged in customer - @api @todo-ui + @api @ui @javascript Scenario: Properly rounded up tax Given the store has "DHL" shipping method with "$51.06" fee And shipping method "DHL" belongs to "Shipping" tax category @@ -22,7 +22,7 @@ Feature: Apply correct taxes for an order with a discount for a shipping Then my cart total should be "$60.55" And my cart taxes should be "$4.60" - @api @todo-ui + @api @ui @javascript Scenario: Properly rounded down tax Given the store has "DHL" shipping method with "$51.04" fee And shipping method "DHL" belongs to "Shipping" tax category @@ -31,7 +31,7 @@ Feature: Apply correct taxes for an order with a discount for a shipping Then my cart total should be "$60.53" And my cart taxes should be "$4.59" - @api @todo-ui + @api @ui @javascript Scenario: Properly calculated taxes when item belongs to different tax category Given the store has "Standard VAT" tax rate of 23% for "Mugs" within the "US" zone And the store has a product "Sonata Mug" priced at "$10.00" diff --git a/features/shop/taxation/applying_taxes/applying_correct_taxes_for_order_with_discount_for_shipping_when_tax_rate_included_in_price.feature b/features/shop/taxation/applying_taxes/applying_correct_taxes_for_order_with_discount_for_shipping_when_tax_rate_included_in_price.feature index 5c7721cfb9..c029196ccf 100644 --- a/features/shop/taxation/applying_taxes/applying_correct_taxes_for_order_with_discount_for_shipping_when_tax_rate_included_in_price.feature +++ b/features/shop/taxation/applying_taxes/applying_correct_taxes_for_order_with_discount_for_shipping_when_tax_rate_included_in_price.feature @@ -13,7 +13,7 @@ Feature: Apply correct taxes for an order with a discount for a shipping when ta And the promotion gives "10%" discount on shipping to every order And I am a logged in customer - @api @todo-ui + @api @ui @javascript Scenario: Properly rounded up tax Given the store has "DHL" shipping method with "$56.95" fee And shipping method "DHL" belongs to "Shipping" tax category @@ -22,7 +22,7 @@ Feature: Apply correct taxes for an order with a discount for a shipping when ta Then my cart total should be "$61.25" And my included in price taxes should be "$4.66" - @api @todo-ui + @api @ui @javascript Scenario: Properly rounded down tax Given the store has "DHL" shipping method with "$56.85" fee And shipping method "DHL" belongs to "Shipping" tax category @@ -31,7 +31,7 @@ Feature: Apply correct taxes for an order with a discount for a shipping when ta Then my cart total should be "$61.16" And my included in price taxes should be "$4.65" - @api @todo-ui + @api @ui @javascript Scenario: Properly calculated taxes when item belongs to different tax category and has tax included in price Given the store has included in price "Standard VAT" tax rate of 23% for "Mugs" within the "US" zone And the store has a product "Sonata Mug" priced at "$10.00" @@ -43,7 +43,7 @@ Feature: Apply correct taxes for an order with a discount for a shipping when ta Then my cart total should be "$55.00" And my included in price taxes should be "$5.96" - @api @todo-ui + @api @ui @javascript Scenario: Properly calculated taxes when item belongs to different tax category and not has tax included in price Given the store has "Standard VAT" tax rate of 23% for "Mugs" within the "US" zone And the store has a product "Sonata Mug" priced at "$10.00" diff --git a/features/shop/taxation/applying_taxes/applying_correct_taxes_for_order_with_discount_for_whole_order.feature b/features/shop/taxation/applying_taxes/applying_correct_taxes_for_order_with_discount_for_whole_order.feature index 14aa01450c..1e0b65b6c0 100644 --- a/features/shop/taxation/applying_taxes/applying_correct_taxes_for_order_with_discount_for_whole_order.feature +++ b/features/shop/taxation/applying_taxes/applying_correct_taxes_for_order_with_discount_for_whole_order.feature @@ -20,33 +20,33 @@ Feature: Apply correct taxes for an order with a discount applied for all items And there is a promotion "PHP promotion" And the promotion gives "$10.10" off if order contains a "PHP Mug" product - @api @todo-ui + @api @ui @javascript Scenario: Properly rounded up tax for a single product When I add product "Symfony Mug" to the cart Then my cart total should be "$50.55" And my cart taxes should be "$4.60" - @api @todo-ui + @api @ui @javascript Scenario: Properly rounded down tax for a single product When I add product "PHP Mug" to the cart Then my cart total should be "$50.53" And my cart taxes should be "$4.59" - @api @todo-ui + @api @ui @javascript Scenario: Properly rounded taxes for multiple products with different tax rate When I add 2 products "PHP T-Shirt" to the cart And I add product "PHP Mug" to the cart Then my cart total should be "$74.79" And my cart taxes should be "$8.85" - @api @todo-ui + @api @ui @javascript Scenario: Properly rounded taxes for multiple products with the same tax rate When I add 2 products "Symfony Mug" to the cart And I add product "PHP Mug" to the cart Then my cart total should be "$162.73" And my cart taxes should be "$14.79" - @api @todo-ui + @api @ui @javascript Scenario: Properly rounded taxes for order with multiple promotions and multiple products with different tax rate And there is a promotion "Clothing promotion" And the promotion gives "$5.00" off if order contains a "PHP T-Shirt" product diff --git a/features/shop/taxation/applying_taxes/applying_correct_taxes_for_order_with_discount_for_whole_order_when_tax_rate_included_in_price.feature b/features/shop/taxation/applying_taxes/applying_correct_taxes_for_order_with_discount_for_whole_order_when_tax_rate_included_in_price.feature index 50663065fb..fed27c2953 100644 --- a/features/shop/taxation/applying_taxes/applying_correct_taxes_for_order_with_discount_for_whole_order_when_tax_rate_included_in_price.feature +++ b/features/shop/taxation/applying_taxes/applying_correct_taxes_for_order_with_discount_for_whole_order_when_tax_rate_included_in_price.feature @@ -20,33 +20,33 @@ Feature: Apply correct taxes for an order with a discount applied for all items And there is a promotion "PHP promotion" And the promotion gives "$10.00" off if order contains a "PHP Mug" product - @api @todo-ui + @api @ui @javascript Scenario: Properly rounded up tax for single product When I add product "Symfony Mug" to the cart Then my cart total should be "$46.95" And my included in price taxes should be "$4.27" - @api @todo-ui + @api @ui @javascript Scenario: Properly rounded down tax for single product When I add product "PHP Mug" to the cart Then my cart total should be "$46.90" And my included in price taxes should be "$4.26" - @api @todo-ui + @api @ui @javascript Scenario: Properly rounded taxes for multiple products with different tax rate When I add 2 products "PHP T-Shirt" to the cart And I add product "PHP Mug" to the cart Then my cart total should be "$66.90" And my included in price taxes should be "$7.75" - @api @todo-ui + @api @ui @javascript Scenario: Properly rounded taxes for multiple products with the same tax rate When I add 2 products "PHP Mug" to the cart And I add product "Symfony Mug" to the cart Then my cart total should be "$150.75" And my included in price taxes should be "$13.70" - @api @todo-ui + @api @ui @javascript Scenario: Properly rounded taxes for order with multiple promotions and multiple products with different tax rate And there is a promotion "Clothing promotion" And the promotion gives "$5.00" off if order contains a "PHP T-Shirt" product diff --git a/features/shop/taxation/applying_taxes/applying_correct_taxes_for_product_with_tax_rate_included_in_price.feature b/features/shop/taxation/applying_taxes/applying_correct_taxes_for_product_with_tax_rate_included_in_price.feature index 5a8bb20a8f..1cb0eceacc 100644 --- a/features/shop/taxation/applying_taxes/applying_correct_taxes_for_product_with_tax_rate_included_in_price.feature +++ b/features/shop/taxation/applying_taxes/applying_correct_taxes_for_product_with_tax_rate_included_in_price.feature @@ -13,7 +13,7 @@ Feature: Applying correct taxes for items with tax rate included in price And the store has a product "Symfony T-Shirt" priced at "$19.70" And it belongs to "Clothes" tax category - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for a single item with tax rate included in price When I add product "PHP T-Shirt" to the cart Then my cart total should be "$19.70" @@ -21,20 +21,20 @@ Feature: Applying correct taxes for items with tax rate included in price And there should be one item in my cart And total price of "PHP T-Shirt" item should be "$19.70" - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for a single item with multiple units with tax rate included in price When I add 2 products "PHP T-Shirt" to the cart Then my cart total should be "$39.40" And my included in price taxes should be "$6.57" And total price of "PHP T-Shirt" item should be "$39.40" - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for multiple items with tax rate included in price and default calculator When I add products "PHP T-Shirt" and "Symfony T-Shirt" to the cart Then my cart total should be "$39.40" And my included in price taxes should be "$6.56" - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for multiple items with tax rate included in price and decimal calculator Given the "VAT" tax rate has decimal calculator configured When I add products "PHP T-Shirt" and "Symfony T-Shirt" to the cart diff --git a/features/shop/taxation/applying_taxes/applying_correct_taxes_for_products_with_different_tax_rates_for_different_zones.feature b/features/shop/taxation/applying_taxes/applying_correct_taxes_for_products_with_different_tax_rates_for_different_zones.feature index 7d056fd185..b6a51b61ca 100644 --- a/features/shop/taxation/applying_taxes/applying_correct_taxes_for_products_with_different_tax_rates_for_different_zones.feature +++ b/features/shop/taxation/applying_taxes/applying_correct_taxes_for_products_with_different_tax_rates_for_different_zones.feature @@ -19,34 +19,34 @@ Feature: Apply correct taxes for products with different tax rates for different And it belongs to "Mugs" tax category And I am a logged in customer - @api @todo-ui + @api @ui @javascript Scenario: Displaying correct tax before specifying shipping address When I add product "PHP T-Shirt" to the cart Then my cart total should be "$100.00" And there should be no taxes charged - @api @todo-ui + @api @ui @javascript Scenario: Displaying correct tax after specifying billing address Given I have product "PHP T-Shirt" in the cart When I proceed with selecting "Germany" as billing country Then my cart total should be "$123.00" And my cart taxes should be "$23.00" - @api @todo-ui + @api @ui @javascript Scenario: Displaying correct taxes for multiple products after specifying billing address Given I have 3 products "PHP T-Shirt" in the cart When I proceed with selecting "Germany" as billing country Then my cart total should be "$369.00" And my cart taxes should be "$69.00" - @api @todo-ui + @api @ui @javascript 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 "$205.00" And my cart taxes should be "$5.00" - @api @todo-ui + @api @ui @javascript Scenario: Displaying correct taxes for multiple products from different zones after specifying billing address Given I have product "PHP T-Shirt" in the cart And I have 2 products "Symfony Mug" in the cart diff --git a/features/shop/taxation/applying_taxes/applying_correct_taxes_for_shipping.feature b/features/shop/taxation/applying_taxes/applying_correct_taxes_for_shipping.feature index c4ecb6cdae..0129a90dfe 100644 --- a/features/shop/taxation/applying_taxes/applying_correct_taxes_for_shipping.feature +++ b/features/shop/taxation/applying_taxes/applying_correct_taxes_for_shipping.feature @@ -17,7 +17,7 @@ Feature: Applying correct taxes for shipping And the store has "DHL" shipping method with "$10.00" fee within the "US" zone And shipping method "DHL" belongs to "Shipping Services" tax category - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for shipping When I add product "PHP T-Shirt" to the cart Then my cart items total should be "$10.00" @@ -25,7 +25,7 @@ Feature: Applying correct taxes for shipping And my cart taxes should be "$1.50" And my cart total should be "$21.50" - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for shipping When I add product "PHP Mug" to the cart Then my cart items total should be "$10.00" diff --git a/features/shop/taxation/applying_taxes/applying_correct_taxes_for_shipping_with_tax_rate_included_in_price.feature b/features/shop/taxation/applying_taxes/applying_correct_taxes_for_shipping_with_tax_rate_included_in_price.feature index 8044bcd92d..3e48ced3a2 100644 --- a/features/shop/taxation/applying_taxes/applying_correct_taxes_for_shipping_with_tax_rate_included_in_price.feature +++ b/features/shop/taxation/applying_taxes/applying_correct_taxes_for_shipping_with_tax_rate_included_in_price.feature @@ -17,7 +17,7 @@ Feature: Applying correct taxes for shipping with tax rate included in price And the store has "DHL" shipping method with "$10.00" fee within the "US" zone And shipping method "DHL" belongs to "Shipping Services" tax category - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for shipping with tax rate included in price When I add product "PHP T-Shirt" to the cart Then my cart items total should be "$10.00" @@ -26,7 +26,7 @@ Feature: Applying correct taxes for shipping with tax rate included in price And my cart included in price taxes should be "$0.91" And my cart total should be "$20.50" - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for shipping with tax rate included in price When I add product "PHP Mug" to the cart Then my cart items total should be "$10.00" diff --git a/features/shop/taxation/applying_taxes/applying_correct_taxes_on_visitor_cart.feature b/features/shop/taxation/applying_taxes/applying_correct_taxes_on_visitor_cart.feature index 34721241b8..9a917be0dd 100644 --- a/features/shop/taxation/applying_taxes/applying_correct_taxes_on_visitor_cart.feature +++ b/features/shop/taxation/applying_taxes/applying_correct_taxes_on_visitor_cart.feature @@ -15,13 +15,13 @@ Feature: Apply correct taxes on visitor cart And the store has a product "PHP T-Shirt" priced at "$100.00" And it belongs to "Clothes" tax category - @api @todo-ui + @api @ui @javascript Scenario: Proper taxes for taxed product 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" - @api @todo-ui + @api @ui @javascript Scenario: Proper taxes after specifying billing address Given I have product "PHP T-Shirt" in the cart When I proceed as guest "john@example.com" with "Austria" as billing country diff --git a/features/shop/taxation/applying_taxes/applying_correct_taxes_on_visitor_cart_for_specific_date.feature b/features/shop/taxation/applying_taxes/applying_correct_taxes_on_visitor_cart_for_specific_date.feature index 1f920676a8..7e86fbb406 100644 --- a/features/shop/taxation/applying_taxes/applying_correct_taxes_on_visitor_cart_for_specific_date.feature +++ b/features/shop/taxation/applying_taxes/applying_correct_taxes_on_visitor_cart_for_specific_date.feature @@ -16,14 +16,14 @@ Feature: Applying correct taxes on visitor cart for a specific date And the store has a product "PHP T-Shirt" priced at "$100.00" And it belongs to "Clothes" tax category - @api @todo-ui + @api @ui @javascript Scenario: Applying proper taxes for product Given it is "01-11-2022" now 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" - @api @todo-ui + @api @ui @javascript Scenario: Applying proper taxes for product Given it is "02-02-2023" now When I add product "PHP T-Shirt" to the cart diff --git a/features/shop/taxation/applying_taxes/applying_different_taxes_for_variants_with_different_tax_category.feature b/features/shop/taxation/applying_taxes/applying_different_taxes_for_variants_with_different_tax_category.feature index 840bdeab9d..6485383fb1 100644 --- a/features/shop/taxation/applying_taxes/applying_different_taxes_for_variants_with_different_tax_category.feature +++ b/features/shop/taxation/applying_taxes/applying_different_taxes_for_variants_with_different_tax_category.feature @@ -15,7 +15,7 @@ Feature: Apply different taxes for variants with different tax category And "Medium Mug" variant of product "PHP Mug" belongs to "Cheap Mugs" tax category And "Large Mug" variant of product "PHP Mug" belongs to "Mugs" tax category - @api @todo-ui + @api @ui @javascript Scenario: Proper taxes for different taxed variants When I add "Medium Mug" variant of product "PHP Mug" to the cart And I add "Large Mug" variant of product "PHP Mug" to the cart diff --git a/features/shop/taxation/applying_taxes/not_applying_taxes_for_products_without_tax_category.feature b/features/shop/taxation/applying_taxes/not_applying_taxes_for_products_without_tax_category.feature index 2ad23a0dc1..b75512b163 100644 --- a/features/shop/taxation/applying_taxes/not_applying_taxes_for_products_without_tax_category.feature +++ b/features/shop/taxation/applying_taxes/not_applying_taxes_for_products_without_tax_category.feature @@ -9,19 +9,19 @@ Feature: Not applying taxes for products without tax category And the store has a product "PHP T-Shirt" priced at "$100.00" And the store has a product "Symfony Mug" priced at "$30.00" - @api @todo-ui + @api @ui @javascript Scenario: Proper taxes for untaxed product When I add product "PHP T-Shirt" to the cart Then my cart total should be "$100.00" And there should be no taxes charged - @api @todo-ui + @api @ui @javascript Scenario: Proper taxes for untaxed product with quantity specified When I add 3 products "PHP T-Shirt" to the cart Then my cart total should be "$300.00" And there should be no taxes charged - @api @todo-ui + @api @ui @javascript Scenario: Proper taxes for multiple untaxed products When I add product "PHP T-Shirt" to the cart And I add product "Symfony Mug" to the cart diff --git a/features/shop/taxation/applying_taxes/rounding_taxes_on_order_item_level.feature b/features/shop/taxation/applying_taxes/rounding_taxes_on_order_item_level.feature index e9c829799f..a3521a77a8 100644 --- a/features/shop/taxation/applying_taxes/rounding_taxes_on_order_item_level.feature +++ b/features/shop/taxation/applying_taxes/rounding_taxes_on_order_item_level.feature @@ -16,19 +16,19 @@ Feature: Round taxes on order item level And the store has a product "PHP Mug" priced at "$45.94" And it belongs to "Mugs" tax category - @api @todo-ui + @api @ui @javascript Scenario: Properly rounded up tax for single product When I add product "Symfony Mug" to the cart Then my cart total should be "$50.55" And my cart taxes should be "$4.60" - @api @todo-ui + @api @ui @javascript Scenario: Properly rounded down tax for single product When I add product "PHP Mug" to the cart Then my cart total should be "$50.53" And my cart taxes should be "$4.59" - @api @todo-ui + @api @ui @javascript Scenario: Properly rounded taxes for multiple products When I add 10 products "PHP T-Shirt" to the cart Then my cart total should be "$124.23" diff --git a/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_different_tax_rates.feature b/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_different_tax_rates.feature index 8e25365c5f..7ebcc3d07b 100644 --- a/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_different_tax_rates.feature +++ b/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_different_tax_rates.feature @@ -15,14 +15,14 @@ Feature: Applying correct taxes for item units with different tax rates And the store has a product "Symfony Mug" priced at "$50.00" And it belongs to "Mugs" tax category - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for units of different products When I add product "PHP T-Shirt" to the cart And I add product "Symfony Mug" to the cart Then my cart total should be "$175.50" And my cart taxes should be "$25.50" - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for multiple units of different products When I add 3 products "PHP T-Shirt" to the cart And I add 4 products "Symfony Mug" to the cart diff --git a/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_discount_for_item.feature b/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_discount_for_item.feature index f2b31a9155..c06e0bc4d5 100644 --- a/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_discount_for_item.feature +++ b/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_discount_for_item.feature @@ -21,26 +21,26 @@ Feature: Applying correct taxes for item units with a discount And there is a promotion "PHP promotion" And the promotion gives "$10.10" off on a "PHP Mug" product - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for a single item unit with discount When I add product "Symfony Mug" to the cart Then my cart total should be "$50.55" And my cart taxes should be "$4.60" - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for a single item unit with discount When I add product "PHP Mug" to the cart Then my cart total should be "$50.53" And my cart taxes should be "$4.59" - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for multiple units of different products with discount and default calculator When I add 2 products "PHP T-Shirt" to the cart And I add 2 products "Symfony Mug" to the cart Then my cart total should be "$125.70" And my cart taxes should be "$13.80" - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for multiple units of different products with discount and decimal calculator Given the "US VAT" tax rate has decimal calculator configured And the "Low VAT" tax rate has decimal calculator configured diff --git a/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_discount_for_item_when_tax_rate_included_in_price.feature b/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_discount_for_item_when_tax_rate_included_in_price.feature index 6a5cc97583..8736f0bfbb 100644 --- a/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_discount_for_item_when_tax_rate_included_in_price.feature +++ b/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_discount_for_item_when_tax_rate_included_in_price.feature @@ -21,26 +21,26 @@ Feature: Applying correct taxes for item units with a discount when tax rates ar And there is a promotion "PHP promotion" And the promotion gives "$10.00" off on a "PHP Mug" product - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for a single item unit with discount When I add product "Symfony Mug" to the cart Then my cart total should be "$46.95" And my included in price taxes should be "$4.27" - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for a single item unit with discount When I add product "PHP Mug" to the cart Then my cart total should be "$46.90" And my included in price taxes should be "$4.26" - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for multiple units of different products with discount and default calculator When I add 2 products "PHP T-Shirt" to the cart And I add 2 products "PHP Mug" to the cart Then my cart total should be "$113.80" And my included in price taxes should be "$12.26" - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for multiple units of different products with discount and decimal calculator Given the "US VAT" tax rate has decimal calculator configured And the "Low VAT" tax rate has decimal calculator configured diff --git a/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_discount_for_whole_order.feature b/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_discount_for_whole_order.feature index f0a1756cff..b7b70fe530 100644 --- a/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_discount_for_whole_order.feature +++ b/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_discount_for_whole_order.feature @@ -21,19 +21,19 @@ Feature: Applying correct taxes for item units with a discount applied for all i And there is a promotion "PHP promotion" And the promotion gives "$10.10" off if order contains a "PHP Mug" product - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for a single item unit with order discount When I add product "Symfony Mug" to the cart Then my cart total should be "$50.55" And my cart taxes should be "$4.60" - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for a single item unit with order discount When I add product "PHP Mug" to the cart Then my cart total should be "$50.53" And my cart taxes should be "$4.59" - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for multiple units of different products with order discount When I add 2 products "Symfony Mug" to the cart And I add product "PHP Mug" to the cart diff --git a/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_discount_for_whole_order_when_tax_rate_included_in_price.feature b/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_discount_for_whole_order_when_tax_rate_included_in_price.feature index 30d6bbaa99..e4e863b888 100644 --- a/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_discount_for_whole_order_when_tax_rate_included_in_price.feature +++ b/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_discount_for_whole_order_when_tax_rate_included_in_price.feature @@ -21,26 +21,26 @@ Feature: Applying correct taxes for item units with a discount applied for all i And there is a promotion "PHP promotion" And the promotion gives "$10.00" off if order contains a "PHP Mug" product - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for a single item unit with order discount When I add product "Symfony Mug" to the cart Then my cart total should be "$46.95" And my included in price taxes should be "$4.27" - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for a single item unit with order discount When I add product "PHP Mug" to the cart Then my cart total should be "$46.90" And my included in price taxes should be "$4.26" - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for multiple units of different products with order discount and default calculator When I add 2 products "PHP Mug" to the cart And I add product "Symfony Mug" to the cart Then my cart total should be "$150.75" And my included in price taxes should be "$13.71" - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for multiple units of different products with order discount and decimal calculator Given the "US VAT" tax rate has decimal calculator configured And the "Low VAT" tax rate has decimal calculator configured diff --git a/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_tax_rate_included_in_price.feature b/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_tax_rate_included_in_price.feature index f3d9df75d7..3501fac3bd 100644 --- a/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_tax_rate_included_in_price.feature +++ b/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_tax_rate_included_in_price.feature @@ -14,7 +14,7 @@ Feature: Applying correct taxes for item units with tax rate included in price And the store has a product "Symfony T-Shirt" priced at "$19.70" And it belongs to "Clothes" tax category - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for a single item unit with tax rate included in price When I add product "PHP T-Shirt" to the cart Then my cart total should be "$19.70" @@ -22,14 +22,14 @@ Feature: Applying correct taxes for item units with tax rate included in price And there should be one item in my cart And total price of "PHP T-Shirt" item should be "$19.70" - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for a single item with multiple units with tax rate included in price and default calculator When I add 2 products "PHP T-Shirt" to the cart Then my cart total should be "$39.40" And my included in price taxes should be "$6.56" And total price of "PHP T-Shirt" item should be "$39.40" - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for a single item with multiple units with tax rate included in price and decimal calculator Given the "VAT" tax rate has decimal calculator configured When I add 2 products "PHP T-Shirt" to the cart @@ -37,13 +37,13 @@ Feature: Applying correct taxes for item units with tax rate included in price And my included in price taxes should be "$6.57" And total price of "PHP T-Shirt" item should be "$39.40" - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for multiple items with tax rate included in price and default calculator When I add products "PHP T-Shirt" and "Symfony T-Shirt" to the cart Then my cart total should be "$39.40" And my included in price taxes should be "$6.56" - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for multiple items with tax rate included in price and decimal calculator Given the "VAT" tax rate has decimal calculator configured When I add products "PHP T-Shirt" and "Symfony T-Shirt" to the cart diff --git a/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_the_same_tax_rate.feature b/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_the_same_tax_rate.feature index 972966893b..8f3aea8a7a 100644 --- a/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_the_same_tax_rate.feature +++ b/features/shop/taxation/applying_taxes_based_on_order_item_units_calculation_strategy/applying_correct_taxes_for_item_units_with_the_same_tax_rate.feature @@ -14,26 +14,26 @@ Feature: Applying correct taxes for item units with the same tax rate And the store has a product "Symfony Hat" priced at "$30.00" And it belongs to "Clothes" tax category - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for a single unit 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" - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for multiple units of the same product When I add 3 products "PHP T-Shirt" to the cart Then my cart total should be "$369.00" And my cart taxes should be "$69.00" - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes for multiple units of different products When I add 3 products "PHP T-Shirt" to the cart And I add 2 products "Symfony Hat" to the cart Then my cart total should be "$442.80" And my cart taxes should be "$82.80" - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes after removing one of the item Given I have 3 products "PHP T-Shirt" in the cart And I have 2 products "Symfony Hat" in the cart @@ -41,7 +41,7 @@ Feature: Applying correct taxes for item units with the same tax rate Then my cart total should be "$73.80" And my cart taxes should be "$13.80" - @api @todo-ui + @api @ui @javascript Scenario: Applying correct taxes after changing item quantity Given I have 3 products "PHP T-Shirt" in the cart And I have 2 products "Symfony Hat" in the cart diff --git a/src/Sylius/Behat/Page/Shop/Cart/SummaryPage.php b/src/Sylius/Behat/Page/Shop/Cart/SummaryPage.php index 1cb9aeb234..60a4a39c50 100644 --- a/src/Sylius/Behat/Page/Shop/Cart/SummaryPage.php +++ b/src/Sylius/Behat/Page/Shop/Cart/SummaryPage.php @@ -36,10 +36,7 @@ class SummaryPage extends ShopPage implements SummaryPageInterface public function getIncludedTaxTotal(): string { - Assert::true(false); - $includedTaxTotalElement = $this->getElement('tax_included'); - - return $includedTaxTotalElement->getText(); + return $this->getElement('tax_included')->getText(); } public function getExcludedTaxTotal(): string @@ -49,8 +46,6 @@ class SummaryPage extends ShopPage implements SummaryPageInterface public function areTaxesCharged(): bool { - Assert::true(false); - try { $this->getElement('no_taxes'); } catch (ElementNotFoundException) { @@ -246,7 +241,7 @@ class SummaryPage extends ShopPage implements SummaryPageInterface 'item_unit_price' => '[data-test-cart-items] [data-test-cart-item-product-row="%name%"] [data-test-cart-item-unit-price]', 'item_unit_regular_price' => '[data-test-cart-items] [data-test-cart-item-product-row="%name%"] [data-test-cart-item-unit-regular-price]', 'items_total' => '[data-test-cart-items-total]', -// 'no_taxes' => '[data-test-cart-no-tax]', + 'no_taxes' => '[data-test-cart-no-tax]', // 'product_row' => '[data-test-cart-product-row="%name%"]', 'product_total' => '[data-test-cart-item-product-row="%name%"] [data-test-cart-product-subtotal]', 'promotion_coupon' => '[data-test-cart-promotion-coupon]', @@ -255,7 +250,7 @@ class SummaryPage extends ShopPage implements SummaryPageInterface // 'save_button' => '[data-test-apply-coupon-button]', 'shipping_total' => '[data-test-cart-shipping-total]', 'tax_excluded' => '[data-test-cart-tax-excluded]', -// 'tax_included' => '[data-test-cart-tax-included]', + 'tax_included' => '[data-test-cart-tax-included]', // 'update_button' => '[data-test-cart-update-button]', ]); }