Skip to content
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
merged 7 commits into from
Sep 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Feature: Viewing details of an order
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 "EN" zone
And the store has "DHL" shipping method with "$20.00" fee within the "EN" zone
And the store has a product "Angel T-Shirt" priced at "$20.00"
And I am a logged in customer
And I placed an order "#00000666"
Expand Down
2 changes: 1 addition & 1 deletion features/addressing/managing_zones/deleting_zone.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Feature: Deleting a zone
Given the store has a zone "North America" with code "NA"
And the store also has a zone "South America" with code "SA"
And the store has a tax category "Sports gear"
And the store has "Sales Tax" tax rate of 20% for "Sports gear" within "SA" zone
And the store has "Sales Tax" tax rate of 20% for "Sports gear" within the "SA" zone
And I am logged in as an administrator

@ui
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Feature: All of my cart's values get updated to the currency of my choosing
And that channel allows to shop using the "GBP" currency with exchange rate 2.00
And default tax zone is "US"
And the store has "Pigeon Mail" shipping method with "$5.00" fee
And the store has "Pugs" tax rate of 10% for "Mugs" within "US" zone
And the store has "Pugs" tax rate of 10% for "Mugs" within the "US" zone
And the store has a product "The Pug Mug" priced at "$10.00"
And it belongs to "Mugs" tax category

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Feature: Seeing prices recalculated by exchange rate on order summary
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 has a product "Lannister Coat" priced at "$100.00"
And the store has "DHL" shipping method with "$20.00" fee within "EN" zone
And the store has "DHL" shipping method with "$20.00" fee within the "EN" zone
And the store allows paying offline
And I am a logged in customer

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Feature: Seeing tax total on order summary page

Background:
Given the store operates on a single channel in "United States"
And the store has "VAT" tax rate of 23% for "Clothes" within "US" zone
And the store has "VAT" tax rate of 23% for "Clothes" within the "US" zone
And the store has a product "The Sorting Hat" priced at "$100.00"
And it belongs to "Clothes" tax category
And the store ships everywhere for free
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Feature: Preventing not available shipping method selection
Scenario: Not being able to select shipping method not available for my shipping address
Given there is a zone "The Rest of the World" containing all other countries
And the store has "Dragon Post" shipping method with "$30.00" fee for the rest of the world
And the store has "Raven Post" shipping method with "$10.00" fee within "US" zone
And the store has "Raven Post" shipping method with "$10.00" fee within the "US" zone
And I have product "Targaryen T-Shirt" in the cart
When I am at the checkout addressing step
And I specify the shipping address as "Ankh Morpork", "Frost Alley", "90210", "United States" for "Jon Snow"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ Feature: Verifying inventory quantity on cart summary
Scenario: Being unable to save a cart with product that is out of stock
Given I have added 3 products "Iron Maiden T-Shirt" in the cart
When I change "Iron Maiden T-Shirt" quantity to 6
And I save my changes
And I update my cart
Then I should be notified that this product cannot be updated

@ui
Scenario: Placing an order with products that have sufficient quantity
Given I have added 3 products "Iron Maiden T-Shirt" in the cart
When I change "Iron Maiden T-Shirt" quantity to 5
And I save my changes
And I update my cart
Then I should not be notified that this product cannot be updated
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"
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"
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"
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"
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

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.

Copy link
Contributor

@michalmarcinkowski michalmarcinkowski Sep 13, 2016

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.

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"
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"
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ Feature: Seeing aggregated taxes of an order

Background:
Given the store operates on a single channel in "United States"
And the store has "VAT" tax rate of 23% for "Standard US services" within "US" zone
And the store has "Low VAT" tax rate of 10% for "Lowered US services" within "US" zone
And the store has "VAT" tax rate of 23% for "Standard US services" within the "US" zone
And the store has "Low VAT" tax rate of 10% for "Lowered US services" within the "US" zone
And the store has a product "Composite bow" priced at "$100.00"
And it belongs to "Standard US services" tax category
And the store has a product "Claymore" priced at "$50.00"
And it belongs to "Lowered US services" tax category
And the store has a product "Bastard sword" priced at "$150.00"
And it belongs to "Lowered US services" tax category
And the store has "DHL" shipping method with "$10.00" fee within "US" zone
And the store has "DHL" shipping method with "$10.00" fee within the "US" zone
And shipping method "DHL" belongs to "Standard US services" tax category
And the store allows paying offline
And there is a customer "charles.the.great@medieval.com" that placed an order "#00000001"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Feature: Seeing the currency an order has been placed in on it's details page
And the store operates on a channel named "Web"
And that channel allows to shop using "USD" and "GBP" currencies
And that channel uses the "USD" currency by default
And the store has "Low VAT" tax rate of 10% for "Lowered EN services" within "EN" zone
And the store has "Low VAT" tax rate of 10% for "Lowered EN services" within the "EN" zone
And the store allows paying with "Cash on Delivery"
And the store has "DHL" shipping method with "$20.00" fee within "EN" zone
And the store has "DHL" shipping method with "$20.00" fee within the "EN" zone
And the store has a product "Angel T-Shirt" priced at "$20.00"
And it belongs to "Lowered EN services" tax category
And there is a promotion "Order's Extravaganza"
Expand Down Expand Up @@ -47,7 +47,7 @@ Feature: Seeing the currency an order has been placed in on it's details page
@ui
Scenario: All prices are in the currency of customer's chosing at the time of placing the order
Given there is a customer "satin@teamlucifer.com" that placed an order "#00000666"
And the customer have chosen to order in the "GBP" currency
And the customer has chosen to order in the "GBP" currency
And the customer bought a single "Angel T-Shirt"
And the customer "No Face" addressed it to "Lucifer Morningstar", "Seaside Fwy" "90802" in the "British Virgin Islands"
And for the billing address of "Mazikeen Lilim" in the "Pacific Coast Hwy", "90806" "Los Angeles", "British Virgin Islands"
Expand Down
Loading