Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View gist:3989171
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
Feature: Manage Product Categories
In order to group products by categories
As an admin of the site
I want to be able to manage categories in the system
 
Background:
Given I am an admin user and I have logged in
And I have navigated to the manage categories screen
 
@UI
Scenario: adding an enabled category
Given I click the "Add category" link
And I enter "category1" into the "CategoryName" textbox
And I ensure the "Enabled" checkbox is "true"
When I click the "Save" button
Then I should see "category1" show up in the list of existing categories
And it should be enabled
 
Scenario: adding an disabled category
Given I click the "Add category" link
And I enter "category1" into the "CategoryName" textbox
And I ensure the "Enabled" checkbox is "false"
When I click the "Save" button
Then I should see "category1" show up in the list of existing categories
And it should be disabled
 
Scenario: adding a category with no name
Given I click the "Add category" link
And I enter "" into the "CategoryName" textbox
And I ensure the "Enabled" checkbox is "true"
When I click the "Save" button
Then I should be notified that the "CategoryName" field is required
And the category should not be saved
And I should stay on the edit category screen
 
Scenario: adding a category with a name that already exists
Given there is already a category with a name of "category1"
And I click the "Add category" link
And I enter "category1" into the "CategoryName" textbox
And I ensure the "Enabled" checkbox is "true"
When I click the "Save" button
Then I should be told that there is already a category with that name in the system
And the category should not be saved
And I should stay on the edit category screen
 
Scenario: Editing an existing category edit form should be pre-populated with selected category data
Given there are already 3 categories in the system
When I click the "Edit" link for the first category in the list
Then I should be see the edit category form
And it should be pre-populated with the categories data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.