-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Shipment] Applying discounts and taxes for each shipment #12282
Merged
lchrusciel
merged 1 commit into
Sylius:master
from
GSadee:promotions-with-multiple-shipments
Jan 29, 2021
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
30 changes: 0 additions & 30 deletions
30
features/order/managing_orders/order_details/seeing_order_shipping_total.feature
This file was deleted.
Oops, something went wrong.
48 changes: 48 additions & 0 deletions
48
...orders/order_details/seeing_order_shipping_total_with_applied_promotion_and_taxes.feature
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
@managing_orders | ||
Feature: Seeing shipping total with applied promotion and taxes | ||
In order to get to know the cost of shipping | ||
As an Administrator | ||
I want to be able to see shipping total | ||
|
||
Background: | ||
Given the store operates on a single channel in "United States" | ||
And the store has "VAT" tax rate of 23% for "Hogwart stuff" within the "US" zone | ||
And the store has "Shipping VAT" tax rate of 23% for "Shipping Services" within the "US" zone | ||
And the store has a product "Gryffindor scarf" priced at "$100.00" | ||
And it belongs to "Hogwart stuff" tax category | ||
And the store has "Owl post" shipping method with "$10.00" fee within the "US" zone | ||
And shipping method "Owl post" belongs to "Shipping Services" tax category | ||
And there is a promotion "50% shipping discount" | ||
And it gives "50%" discount on shipping to every order | ||
And the store allows paying offline | ||
And there is a customer "fleur@delacour.com" that placed an order "#00000777" | ||
And the customer bought a single "Gryffindor scarf" | ||
And I am logged in as an administrator | ||
|
||
@ui | ||
Scenario: Seeing taxes of order items and shipping with applied promotion | ||
Given the customer chose "Owl post" shipping method to "United States" with "Offline" payment | ||
When I view the summary of the order "#00000777" | ||
Then the order's items total should be "$123.00" | ||
And there should be a shipping charge "$10.00" for "Owl post" method | ||
And there should be a shipping tax "$1.15" for "Owl post" method | ||
And the order's shipping total should be "$6.15" | ||
And the order's tax total should be "$24.15" | ||
And the order's total should be "$129.15" | ||
|
||
@ui @domain | ||
Scenario: Seeing taxes of order items and multiple shipments with applied promotion | ||
Given the store has "Pigeon post" shipping method with "$16.00" fee within the "US" zone | ||
And shipping method "Pigeon post" belongs to "Shipping Services" tax category | ||
And the customer chose "Owl post" shipping method to "United States" | ||
And the customer bought another "Gryffindor scarf" with separate "Pigeon post" shipment | ||
And the customer chose "Offline" payment | ||
When I view the summary of the order "#00000777" | ||
Then the order's items total should be "$246.00" | ||
And there should be a shipping charge "$10.00" for "Owl post" method | ||
And there should be a shipping charge "$16.00" for "Pigeon post" method | ||
And there should be a shipping tax "$1.15" for "Owl post" method | ||
And there should be a shipping tax "$1.84" for "Pigeon post" method | ||
And the order's shipping total should be "$15.99" | ||
And the order's tax total should be "$48.99" | ||
And the order's total should be "$261.99" |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this scenario should have
@ui
tag, because multiple shipments in Sylius could be used in background and displayed in admin panel, but there is no possibility to create more than one shipment during our checkout for now.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Domain test is really nice, but I would leave it with UI test as well. One cannot create multiple shipments in pure Sylius, but it does not take much to change it.