-
-
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
[Admin][Order] Modifying a customer's shipping address on an order #6062
Merged
michalmarcinkowski
merged 7 commits into
Sylius:master
from
GSadee:modifying-shipping-address
Sep 15, 2016
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8aeae3a
[Admin][Order] Add scenarios for changing a customer's shipping addre…
GSadee ab8ce2c
[Admin][Order] Add possibility to edit a customer's shipping address …
GSadee a983aec
[Admin][Order] Fix scenarios for changing a customer's shipping addre…
GSadee db25374
[Admin][Order] Implement scenarios for modifying a customer's shippin…
GSadee c039537
[Cart][Behat] Change a name of a duplicated step
GSadee 8d0b37b
[Behat] Minor step name fixes
GSadee fd8eb16
[Behat] Fixes in behat
GSadee 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
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
74 changes: 74 additions & 0 deletions
74
features/order/managing_orders/modifying_shipping_address/modifying_shipping_address.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,74 @@ | ||
@modifying_shipping_address | ||
Feature: Modifying a customer shipping address after an order has been placed | ||
In order to ship an order to a correct place | ||
As an Administrator | ||
I want to be able to modify a customer's shipping address after an order has been placed | ||
|
||
Background: | ||
Given the store operates on a single channel in the "United States" named "Web" | ||
And the store ships everywhere for free | ||
And the store allows paying with "Cash on Delivery" | ||
And the store has a product "Suit" priced at "$400.00" | ||
And there is a customer "mike@ross.com" that placed an order "#00000001" | ||
And the customer bought a single "Suit" | ||
And the customer "Mike Ross" addressed it to "350 5th Ave", "10118" "New York" in the "United States" with identical billing address | ||
And the customer chose "Free" shipping method with "Cash on Delivery" payment | ||
And I am logged in as an administrator | ||
|
||
@ui | ||
Scenario: Modifying a customer's shipping address | ||
When I view the summary of the order "#00000001" | ||
And I want to modify a customer's shipping address of this order | ||
And I specify the first name as "Lucifer" | ||
And I specify the last name as "Morningstar" | ||
And I specify the street as "Seaside Fwy" | ||
And I choose "United States" as the country | ||
And I specify the city as "Los Angeles" | ||
And I specify the postcode as "90802" | ||
And I save my changes | ||
Then I should be notified that it has been successfully edited | ||
And this order should be shipped to "Lucifer Morningstar", "Seaside Fwy", "90802", "Los Angeles", "United States" | ||
|
||
@ui | ||
Scenario: Modifying a customer's shipping address when a product's price has been changed | ||
Given the product "Suit" changed its price to "$300.00" | ||
When I view the summary of the order "#00000001" | ||
And I want to modify a customer's shipping address of this order | ||
And I specify their shipping address as "Los Angeles", "Seaside Fwy", "90802", "United States" for "Lucifer Morningstar" | ||
And I save my changes | ||
Then I should be notified that it has been successfully edited | ||
And this order should be shipped to "Lucifer Morningstar", "Seaside Fwy", "90802", "Los Angeles", "United States" | ||
And the order's total should still be "$400.00" | ||
|
||
@ui | ||
Scenario: Modifying a customer's shipping address when a channel has been disabled | ||
Given the channel "Web" has been disabled | ||
When I view the summary of the order "#00000001" | ||
And I want to modify a customer's shipping address of this order | ||
And I specify their shipping address as "Los Angeles", "Seaside Fwy", "90802", "United States" for "Lucifer Morningstar" | ||
And I save my changes | ||
Then I should be notified that it has been successfully edited | ||
And this order should be shipped to "Lucifer Morningstar", "Seaside Fwy", "90802", "Los Angeles", "United States" | ||
And the order's total should still be "$400.00" | ||
|
||
@ui | ||
Scenario: Modifying a customer's shipping address when the currency has been disabled | ||
Given the currency "USD" has been disabled | ||
When I view the summary of the order "#00000001" | ||
And I want to modify a customer's shipping address of this order | ||
And I specify their shipping address as "Los Angeles", "Seaside Fwy", "90802", "United States" for "Lucifer Morningstar" | ||
And I save my changes | ||
Then I should be notified that it has been successfully edited | ||
And this order should be shipped to "Lucifer Morningstar", "Seaside Fwy", "90802", "Los Angeles", "United States" | ||
And the order's total should still be "$400.00" | ||
|
||
@ui | ||
Scenario: Modifying a customer's shipping address when the product is out of stock | ||
Given the product "Suit" is out of stock | ||
When I view the summary of the order "#00000001" | ||
And I want to modify a customer's shipping address of this order | ||
And I specify their shipping address as "Los Angeles", "Seaside Fwy", "90802", "United States" for "Lucifer Morningstar" | ||
And I save my changes | ||
Then I should be notified that it has been successfully edited | ||
And this order should be shipped to "Lucifer Morningstar", "Seaside Fwy", "90802", "Los Angeles", "United States" | ||
And the order's total should still be "$400.00" |
32 changes: 32 additions & 0 deletions
32
...orders/modifying_shipping_address/modifying_shipping_address_on_order_with_coupon.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,32 @@ | ||
@modifying_shipping_address | ||
Feature: Modifying a customer's shipping address on an order with an applied coupon | ||
In order to ship an order to a correct place | ||
As an Administrator | ||
I want to be able to modify a customer's shipping address without changing an order's total | ||
|
||
Background: | ||
Given the store operates on a single channel in "United States" | ||
And the store ships everywhere for free | ||
And the store allows paying with "Cash on Delivery" | ||
And the store classifies its products as "Suits" | ||
And the store has a product "Suit" priced at "$400.00" | ||
And it belongs to "Suits" | ||
And the store has a promotion "Holiday promotion" with a coupon "HOLIDAY" that is limited to "10" usages | ||
And the promotion gives "$50.00" off if order contains products classified as "Suits" | ||
And there is a customer "mike@ross.com" that placed an order "#00000001" | ||
And the customer bought a single "Suit" using "HOLIDAY" coupon | ||
And the customer "Mike Ross" addressed it to "350 5th Ave", "10118" "New York" in the "United States" with identical billing address | ||
And the customer chose "Free" shipping method with "Cash on Delivery" payment | ||
And I am logged in as an administrator | ||
|
||
@ui | ||
Scenario: Modifying a customer's shipping address when the applied coupon is no longer valid | ||
Given the coupon "HOLIDAY" was used up to its usage limit | ||
When I view the summary of the order "#00000001" | ||
And I want to modify a customer's shipping address of this order | ||
And I specify their shipping address as "Los Angeles", "Seaside Fwy", "90802", "United States" for "Lucifer Morningstar" | ||
And I save my changes | ||
Then I should be notified that it has been successfully edited | ||
And this order should be shipped to "Lucifer Morningstar", "Seaside Fwy", "90802", "Los Angeles", "United States" | ||
And the order's total should still be "$350.00" | ||
And the order's promotion total should still be "-$50.00" |
34 changes: 34 additions & 0 deletions
34
...shipping_address/modifying_shipping_address_on_order_with_different_exchange_rate.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,34 @@ | ||
@modifying_shipping_address | ||
Feature: Modifying a customer's shipping address of an order with a different currency | ||
In order to ship an order to a correct place | ||
As an Administrator | ||
I want to be able to modify a customer's shipping address without changing an order's total | ||
|
||
Background: | ||
Given the store operates on a channel named "Web" | ||
And the store ships to "United States" | ||
And the store has a zone "English" with code "EN" | ||
And this zone has the "United States" country member | ||
And that channel allows to shop using the "USD" currency | ||
And that channel allows to shop using the "GBP" currency with exchange rate 3.0 | ||
And that channel uses the "USD" currency by default | ||
And the store allows paying with "Cash on Delivery" | ||
And the store has "DHL" shipping method with "$20.00" fee within the "EN" zone | ||
And the store has a product "Suit" priced at "$400.00" | ||
And there is a customer "mike@ross.com" that placed an order "#00000001" | ||
And the customer has chosen to order in the "GBP" currency | ||
And the customer bought a single "Suit" | ||
And the customer "Mike Ross" addressed it to "350 5th Ave", "10118" "New York" in the "United States" with identical billing address | ||
And the customer chose "DHL" shipping method with "Cash on Delivery" payment | ||
And I am logged in as an administrator | ||
|
||
@ui | ||
Scenario: Modifying a customer's shipping address when the exchange rate has been changed | ||
Given the exchange rate for currency "GBP" was changed to 2.00 | ||
When I view the summary of the order "#00000001" | ||
And I want to modify a customer's shipping address of this order | ||
And I specify their shipping address as "Los Angeles", "Seaside Fwy", "90802", "United States" for "Lucifer Morningstar" | ||
And I save my changes | ||
Then I should be notified that it has been successfully edited | ||
And this order should be shipped to "Lucifer Morningstar", "Seaside Fwy", "90802", "Los Angeles", "United States" | ||
And the order's total should still be "£1,260.00" |
32 changes: 32 additions & 0 deletions
32
...ers/modifying_shipping_address/modifying_shipping_address_on_order_with_promotion.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,32 @@ | ||
@modifying_shipping_address | ||
Feature: Modifying a customer's shipping address on an order with an applied promotion | ||
In order to ship an order to a correct place | ||
As an Administrator | ||
I want to be able to modify a customer's shipping address without changing an order's total | ||
|
||
Background: | ||
Given the store operates on a single channel in the "United States" named "Web" | ||
And the store ships everywhere for free | ||
And the store allows paying with "Cash on Delivery" | ||
And the store classifies its products as "Suits" | ||
And the store has a product "Suit" priced at "$400.00" | ||
And it belongs to "Suits" | ||
And there is a promotion "Holiday promotion" | ||
And the promotion gives "$50.00" off if order contains products classified as "Suits" | ||
And there is a customer "mike@ross.com" that placed an order "#00000001" | ||
And the customer bought a single "Suit" | ||
And the customer "Mike Ross" addressed it to "350 5th Ave", "10118" "New York" in the "United States" with identical billing address | ||
And the customer chose "Free" shipping method with "Cash on Delivery" payment | ||
And I am logged in as an administrator | ||
|
||
@ui | ||
Scenario: Modifying a customer's shipping address when the applied promotion is no longer valid | ||
Given the promotion was disabled for the channel "Web" | ||
When I view the summary of the order "#00000001" | ||
And I want to modify a customer's shipping address of this order | ||
And I specify their shipping address as "Los Angeles", "Seaside Fwy", "90802", "United States" for "Lucifer Morningstar" | ||
And I save my changes | ||
Then I should be notified that it has been successfully edited | ||
And this order should be shipped to "Lucifer Morningstar", "Seaside Fwy", "90802", "Los Angeles", "United States" | ||
And the order's total should still be "$350.00" | ||
And the order's promotion total should still be "-$50.00" |
30 changes: 30 additions & 0 deletions
30
..._orders/modifying_shipping_address/modifying_shipping_address_on_order_with_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,30 @@ | ||
@modifying_shipping_address | ||
Feature: Modifying a customer's shipping address on an order with taxes | ||
In order to ship an order to a correct place | ||
As an Administrator | ||
I want to be able to modify a customer's shipping address without changing the order's total | ||
|
||
Background: | ||
Given the store operates on a single channel in "United States" | ||
And the store ships everything for free within the "US" zone | ||
And the store allows paying offline | ||
And the store has "VAT" tax rate of 20% for "Suits" within the "US" zone | ||
And the store has a product "Suit" priced at "$400.00" | ||
And it belongs to "Suits" tax category | ||
And there is a customer "mike@ross.com" that placed an order "#00000001" | ||
And the customer bought a single "Suit" | ||
And the customer "Mike Ross" addressed it to "350 5th Ave", "10118" "New York" in the "United States" with identical billing address | ||
And the customer chose "Free" shipping method with "Offline" payment | ||
And I am logged in as an administrator | ||
|
||
@ui | ||
Scenario: Modifying a customer's shipping address when the applied promotion is no longer valid | ||
Given the "VAT" tax rate has changed to 10% | ||
When I view the summary of the order "#00000001" | ||
And I want to modify a customer's shipping address of this order | ||
And I specify their shipping address as "Los Angeles", "Seaside Fwy", "90802", "United States" for "Lucifer Morningstar" | ||
And I save my changes | ||
Then I should be notified that it has been successfully edited | ||
And this order should be shipped to "Lucifer Morningstar", "Seaside Fwy", "90802", "Los Angeles", "United States" | ||
And the order's total should still be "$480.00" | ||
And the order's tax total should still be "$80.00" |
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.
why is it relevant to disable the promotion from the channel if the purchase was made - and the cart became an order?
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.
Because we want to be sure, that changing a shipping address on a placed order won't affect the order totals.
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.
so changing something on an order should not trigger the promotion calculator and get the totals changed, right? if so, then the promotion should still be active to testify that promotion calculator is not triggered on a shipping address change from admin.
maybe I'm missing something here.
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.
For 1.0 we deliver simple shipping address edit feature which will only modify the shipping address and leave the rest of the order untouched. That means the order will not be recalculated and this scenario covers situation when the promotion that was applied to an order is disabled after order was placed. It ensures the promotion is still applied to an order after shipping address modification and the totals are unchanged.