-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #273 Refunding multiple shipments (GSadee)
This PR was merged into the 1.0-dev branch. Discussion ---------- Fixes #110 Commits ------- 33e16be [Behat] Add scenarios for refunding multiple shipments a841673 [Taxation] Fix applying shipment taxes for multiple shipments 85b7959 Refunding multiple shipments 5092357 [Behat] Duplicate some steps from Sylius due to support for Sylius 1.8 a77277b [Taxation] Add spec for applying taxes when one of the multiple shipments has 0 tax amount
- Loading branch information
Showing
12 changed files
with
430 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,31 +6,30 @@ Feature: Refunding an order shipping cost | |
|
||
Background: | ||
Given the store operates on a single green channel in "United States" | ||
And the store has "VAT" tax rate of 23% for "Pidgeons Services" within the "US" zone | ||
And the store has "VAT" tax rate of 23% for "Shipping Services" within the "US" zone | ||
And the store has a product "Mr. Meeseeks T-Shirt" priced at "$10.00" | ||
And the store has "Galaxy Post" shipping method with "$20.00" fee | ||
And the store has "Space Pidgeons Post" shipping method with "$10.00" fee within the "US" zone | ||
And shipping method "Space Pidgeons Post" belongs to "Pidgeons Services" tax category | ||
And shipping method "Space Pidgeons Post" belongs to "Shipping Services" tax category | ||
And the store allows paying with "Space money" | ||
And there is a customer "[email protected]" that placed an order "#00000022" | ||
And the customer bought 2 "Mr. Meeseeks T-Shirt" products | ||
And the customer chose "Galaxy Post" shipping method to "United States" with "Space money" payment | ||
And the order "#00000022" is already paid | ||
And there is a customer "[email protected]" that placed an order "#00000023" | ||
And the customer bought a single "Mr. Meeseeks T-Shirt" | ||
And the customer chose "Space Pidgeons Post" shipping method to "United States" with "Space money" payment | ||
And the order "#00000023" is already paid | ||
And I am logged in as an administrator | ||
|
||
@ui @application | ||
Scenario: Refunding an order shipment | ||
Given the customer bought 2 "Mr. Meeseeks T-Shirt" products | ||
And the customer chose "Galaxy Post" shipping method to "United States" with "Space money" payment | ||
And the order "#00000022" is already paid | ||
When I want to refund some units of order "#00000022" | ||
And I decide to refund order shipment with "Space money" payment | ||
Then this order refunded total should be "$20.00" | ||
And I should not be able to refund order shipment | ||
|
||
@ui @application | ||
Scenario: Refunding an order shipment along with order unit | ||
Given the customer bought 2 "Mr. Meeseeks T-Shirt" products | ||
And the customer chose "Galaxy Post" shipping method to "United States" with "Space money" payment | ||
And the order "#00000022" is already paid | ||
When I want to refund some units of order "#00000022" | ||
And I decide to refund order shipment and 1st "Mr. Meeseeks T-Shirt" product with "Space money" payment | ||
Then I should be notified that selected order units have been successfully refunded | ||
|
@@ -40,7 +39,23 @@ Feature: Refunding an order shipping cost | |
|
||
@ui @application | ||
Scenario: Refunding an order shipment with its tax | ||
When I want to refund some units of order "#00000023" | ||
Given the customer bought a single "Mr. Meeseeks T-Shirt" | ||
And the customer chose "Space Pidgeons Post" shipping method to "United States" with "Space money" payment | ||
And the order "#00000022" is already paid | ||
When I want to refund some units of order "#00000022" | ||
And I decide to refund order shipment with "Space money" payment | ||
Then this order refunded total should be "$12.30" | ||
And I should not be able to refund order shipment | ||
|
||
@ui @application | ||
Scenario: Refunding multiple order shipments | ||
Given the customer bought a single "Mr. Meeseeks T-Shirt" | ||
And the customer chose "Galaxy Post" shipping method to "United States" | ||
And the customer bought another "Mr. Meeseeks T-Shirt" with separate "Space Pidgeons Post" shipment | ||
And the customer chose "Space money" payment | ||
And the order "#00000022" is already paid | ||
When I want to refund some units of order "#00000022" | ||
And I decide to refund "Galaxy Post" order shipment with "Space money" payment | ||
And I decide to refund "Space Pidgeons Post" order shipment with "Space money" payment | ||
Then this order refunded total should be "$32.30" | ||
And I should not be able to refund order shipment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,22 @@ Feature: Refunding an order shipping cost | |
Then this order refunded total should be "$6.15" | ||
And I should not be able to refund order shipment | ||
|
||
@ui @application | ||
Scenario: Refunding multiple order shipments with taxes and a promotion applied | ||
Given there is a promotion "50% shipping discount" | ||
And it gives "50%" discount on shipping to every order | ||
And there is a customer "[email protected]" that placed an order "#00000022" | ||
And the customer bought a single "Mr. Meeseeks T-Shirt" | ||
And the customer chose "Galaxy Post" shipping method to "United States" | ||
And the customer bought another "Mr. Meeseeks T-Shirt" with separate "Space Pidgeons Post" shipment | ||
And the customer chose "Space money" payment | ||
And the order "#00000022" is already paid | ||
When I want to refund some units of order "#00000022" | ||
And I decide to refund "Galaxy Post" order shipment with "Space money" payment | ||
And I decide to refund "Space Pidgeons Post" order shipment with "Space money" payment | ||
Then this order refunded total should be "$16.15" | ||
And I should not be able to refund order shipment | ||
|
||
@ui @application | ||
Scenario: Being unable to refund an order shipping cost with 100% shipping discount applied | ||
Given there is a promotion "100% shipping discount" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.