Skip to content

Commit

Permalink
Receiving no discount if coupon promotion rules are not fulfilled
Browse files Browse the repository at this point in the history
  • Loading branch information
Zales0123 committed Jun 9, 2021
1 parent 274554c commit 4fbf939
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Feature: Applying promotion coupon with an expiration date
And my cart total should be "$100.00"
And there should be no discount

@ui @api
@ui
Scenario: Receiving no discount from valid coupon from expired promotion
Given this promotion has already expired
When I add product "PHP T-Shirt" to the cart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,52 @@ Feature: Receiving no discount if coupon promotion is not eligible
Given the store operates on a single channel in "United States"
And the store has a product "PHP T-Shirt" priced at "$100.00"
And the store has promotion "Christmas sale" with coupon "SANTA2016"
And this promotion gives "$10.00" discount to every order
And this promotion gives "$10.00" discount to every order with quantity at least 2
And the store ships everywhere for free
And the store allows paying "Cash on Delivery"
And I am a logged in customer

@api
Scenario: Receiving no discount if promotion for the applied coupon is not enabled in the current channel
Given this promotion is not available in any channel
When I add product "PHP T-Shirt" to the cart
When I add 2 products "PHP T-Shirt" to the cart
And I use coupon with code "SANTA2016"
Then I should be notified that the promotion is invalid
And my cart total should be "$100.00"
And my cart total should be "$200.00"
And there should be no discount

@api
Scenario: Receiving no discount if promotion for the applied coupon has not started yet
Given this promotion starts tomorrow
When I add product "PHP T-Shirt" to the cart
When I add 2 products "PHP T-Shirt" to the cart
And I use coupon with code "SANTA2016"
Then I should be notified that the promotion is invalid
And my cart total should be "$100.00"
And my cart total should be "$200.00"
And there should be no discount

@api
Scenario: Receiving no discount if promotion for the applied coupon has already expired
Given this promotion has already expired
When I add product "PHP T-Shirt" to the cart
When I add 2 products "PHP T-Shirt" to the cart
And I use coupon with code "SANTA2016"
Then I should be notified that the promotion is invalid
And my cart total should be "$100.00"
And my cart total should be "$200.00"
And there should be no discount

@api
Scenario: Receiving no discount if promotion's usage for the applied coupon is already exceeded
Given this promotion has usage limit equal to 100
And this promotion usage limit is already reached
When I add 2 products "PHP T-Shirt" to the cart
And I use coupon with code "SANTA2016"
Then I should be notified that the promotion is invalid
And my cart total should be "$200.00"
And there should be no discount

@api
Scenario: Receiving no discount if promotion's rules for the applied coupon are not fulfilled
When I add product "PHP T-Shirt" to the cart
And I use coupon with code "SANTA2016"
Then I should be notified that the promotion is invalid
And my cart total should be "$100.00"
And there should be no discount

0 comments on commit 4fbf939

Please sign in to comment.