forked from Sylius/Sylius
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Behat] Scenarios for customer's orders' statistics
- Loading branch information
1 parent
ccfdb3f
commit e469adf
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
features/user/managing_customers/seeing_orders_statistics_on_customer_details_page.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,43 @@ | ||
@customer_statistics | ||
Feature: Seeing customer's orders' statistics | ||
In order to know how many orders a customer has placed, and what's their total value | ||
As an Administrator | ||
I want to be able to see orders statistics of customer on their details page | ||
|
||
Background: | ||
Given the store operates on a channel named "Web-US" in "USD" currency | ||
And the store also operates on another channel named "Web-UK" in "GBP" currency | ||
And the store has a product "Onion" priced at "$200" in "Web-US" channel | ||
And this product is also priced at "£100" in "Web-UK" channel | ||
And the store has customer "lirael.clayr@abhorsen.ok" | ||
And I am logged in as an administrator | ||
|
||
@ui | ||
Scenario: Seeing no statistics if a customer has not placed any orders | ||
When I view details of the customer "b.baggins@shire.me" | ||
Then I should see the customer has not placed any orders yet | ||
|
||
@ui | ||
Scenario: Seeing customer's all placed orders count | ||
Given customer "lirael.clayr@abhorsen.ok" has placed 5 orders on the "Web-US" channel in each buying 3 "Onion" products | ||
And this customer has also placed 12 orders on the "Web-UK" channel in each buying 20 "Onion" products | ||
When I view their details | ||
Then I should see that they have placed 17 orders across all channels | ||
|
||
@ui | ||
Scenario: Seeing how many orders the customer has placed in specific channel | ||
Given customer "lirael.clayr@abhorsen.ok" has placed 12 orders on the "Web-UK" channel in each buying 2 "Onion" products | ||
When I view their details | ||
Then I should see that they have placed 12 orders in the "Web-UK" channel | ||
|
||
@ui | ||
Scenario: Seeing the total value of customer's orders' in given channel in its base currency | ||
Given customer "lirael.clayr@abhorsen.ok" has placed 5 orders on the "Web-US" channel in each buying 5 "Onion" products | ||
When I view their details | ||
Then I should see that the overall total value of all their orders in the "Web-US" channel is "$5,000.00" | ||
|
||
@ui | ||
Scenario: Seeing the average total of customer's order in given channel in its base currency | ||
Given customer "lirael.clayr@abhorsen.ok" has placed 12 orders on the "Web-UK" channel in each buying 2 "Onion" products | ||
When I view their details | ||
Then I should see that the average total value of their order in the "Web-UK" channel is "£2,400.00" |