forked from vendo/vendo
-
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.
updating cart bdd tests to be more robust
- Loading branch information
Showing
2 changed files
with
52 additions
and
6 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,26 +1,32 @@ | ||
Feature: Shopping cart management | ||
Users can add, modify and delete things in their shopping cart | ||
|
||
Scenario: Create Test item | ||
Given I create a test product | ||
|
||
Scenario: Add item to cart | ||
Given I am on /product/view/195 | ||
Given I am on the test product page | ||
When I click the "Add to cart" link | ||
Then I should see the "Shopping Cart" page | ||
And there should be 1 item in my shopping cart | ||
|
||
Scenario: Remove item to cart | ||
Given I am on /product/view/195 | ||
Given I am on the test product page | ||
When I click the "Add to cart" link | ||
Then I should see the "Shopping Cart" page | ||
And there should be 1 item in my shopping cart | ||
When I check "delete[195]" | ||
When I check the delete checkbox for "Test Product" | ||
And I press "Delete Selected / Update Quantities" | ||
Then there should be 0 items in my shopping cart | ||
|
||
Scenario: Change quantity of item to cart | ||
Given I am on /product/view/195 | ||
Given I am on the test product page | ||
When I click the "Add to cart" link | ||
Then I should see the "Shopping Cart" page | ||
And there should be 1 item in my shopping cart | ||
When I fill in "new_quantity[195]" with "2" | ||
When I update the quantity of "Test Product" to "2" | ||
And I press "Delete Selected / Update Quantities" | ||
Then there should be 2 items in my shopping cart | ||
Then there should be 2 items in my shopping cart | ||
|
||
Scenario: Delete Test item | ||
Given I delete the test product |
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