Enable scenarios, fix behat context

This commit is contained in:
Michał Pysiak 2024-09-10 10:55:30 +02:00 committed by Karol
parent 39546771f3
commit b0cd5d14cb
26 changed files with 89 additions and 94 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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]',
]);
}