Skip to content

Instantly share code, notes, and snippets.

@pjedrzejewski
Created March 7, 2015 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pjedrzejewski/3fe7c2e7b8016f86f8ee to your computer and use it in GitHub Desktop.
Save pjedrzejewski/3fe7c2e7b8016f86f8ee to your computer and use it in GitHub Desktop.
Behat
Feature: Custom text printing
In order to sell more customized products
As a Customer
I want to customize my product
Background:
Given there is default currency configured
Scenario: Entering custom text when adding product to the cart
Given there is a product "Nike T-Shirt", which cost is 10 EUR
And customization price for "Nike T-Shirt" is 2 EUR per letter
When I add 1 "Nike T-Shirt" to the cart, with custom text "Behat Rocks"
Then I should be redirected to the cart summary page
And the cart total price should be 32.00 EUR
Scenario: It takes into account the quantity of the item
Given there is a product "Banana", which cost is 20 EUR
And customization price for "Banana" is 5 EUR per letter
When I add 4 "Banana" to the cart, with custom text "Emagma"
Then I should be redirected to the cart summary page
And the cart total price should be 200.00 EUR
2 scenarios (2 passed)
12 steps (12 passed)
0m3.26s (92.54Mb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment