Skip to content

Instantly share code, notes, and snippets.

@elnur
Created May 14, 2014 13:14
Show Gist options
  • Select an option

  • Save elnur/555aa3dda2a7ff6c5f3c to your computer and use it in GitHub Desktop.

Select an option

Save elnur/555aa3dda2a7ff6c5f3c to your computer and use it in GitHub Desktop.
Feature: Discounts for customers
In order to be more motivated to buy more stuff in this shop
As a customer
I want to get discounts when I buy lots of stuff
Scenario: Provide a $10 discount when buying goods for more than $100
Given I'm a customer
And category "Pure Awesomeness" exists
And product "Super Awesome Stuff" exists
And product "Super Awesome Stuff" is in the "Pure Awesomeness" category
And product "Super Awesome Stuff" costs $30
And I'm on the homepage
When I go to the "Pure Awesomeness" category page
And I click "Super Awesome Stuff"
And I click "Add to Cart"
And I fill "Amount" with 10
And I click "OK"
Then I should see "Subtotal" is "$300"
And I should see "Discount" is "$10"
And I should see "Total" is "$290"
Scenario: Provide a $10 discount when buying goods for more than $100
Given I'm a customer
And category "Pure Awesomeness" exists
And product "Super Awesome Stuff" exists
And product "Super Awesome Stuff" is in the "Pure Awesomeness" category
And product "Super Awesome Stuff" costs $30
When I add 10 units of "Super Awesome Stuff" to the cart
Then the subtotal should be $300
And the discount should be $10
And the total should be $290
Scenario: Provide a $10 discount when buying goods for more than $100
Given I'm a customer
And product "Super Awesome Stuff" exists
And product "Super Awesome Stuff" costs $30
When I add 10 units of "Super Awesome Stuff" to the cart
Then the subtotal should be $300
And the discount should be $10
And the total should be $290
Scenario: Provide a $10 discount when buying goods for more than $100
Given I'm a customer
When I add $300 worth of products to the cart
Then the subtotal should be $300
And the discount should be $10
And the total should be $290
Scenario: Provide a $10 discount when buying goods for more than $100
Given I'm a customer
When I add $300 worth of products to the cart
Then the total should be $290
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment