diff --git a/features/chat.feature b/features/chat.feature deleted file mode 100644 index e6ee44e..0000000 --- a/features/chat.feature +++ /dev/null @@ -1,145 +0,0 @@ -Feature: chat - As a Noosfero user - I want to chat with my friends - - Background: - Given the following users - | login | name | - | tame | Tame | - | mariasilva | Maria Silva | - | josesilva | Jose Silva | - And "tame" is online in chat - And "mariasilva" is online in chat - And "josesilva" is online in chat - And "tame" is friend of "mariasilva" - And "tame" is friend of "josesilva" - - @selenium - Scenario: provide link to open chat - Given feature "xmpp_chat" is enabled on environment - And I am logged in as "tame" - Then I should see "Open chat" within "#user" - - @selenium - Scenario: provide the chat online users content - Given feature "xmpp_chat" is enabled on environment - And I am logged in as "tame" - Then I should see "Friends in chat " - - @selenium - Scenario: provide the chat online users list - Given the profile "tame" has no blocks - And feature "xmpp_chat" is enabled on environment - And I am logged in as "tame" - And I go to tame's profile - When I follow "chat-online-users-title" - Then I should see "Maria Silva" - And I should see "Jose Silva" - - Scenario: not provide link to chat when environment not support that - Given I am logged in as "tame" - Then I should not see "Open chat" within "#user" - - Scenario: not provide link to chat when the user is logged out - Given I am on tame's homepage - Then I should not see "Open chat" within "#user" - - @selenium - Scenario: not provide the chat online users list when environment not support that - Given I am logged in as "tame" - Then I should not see "Friends in chat " - - Scenario: block access to chat when environment not support that - Given I am logged in as "tame" - When I go to chat - Then I should see "There is no such page" - - Scenario: block access to chat for guest users - Given feature "xmpp_chat" is enabled on environment - When I go to chat - Then I should be on login page - - @selenium - Scenario: open chat in a new window - Given feature "xmpp_chat" is enabled on environment - And I am logged in as "tame" - When I follow "Open chat" - And I select window "noosfero_chat" - Then I should see "Chat - Colivre.net - Friends online (0)" - - @selenium - Scenario: open chat with an online user in a new window - Given the profile "tame" has no blocks - And feature "xmpp_chat" is enabled on environment - And I am logged in as "tame" - And I go to tame's profile - When I follow "chat-online-users-title" - And I follow "Maria Silva" - And I select window "noosfero_chat" - Then I should see "Chat - Colivre.net - Friends online (0)" - - @selenium - Scenario: chat starts disconnected by default - Given feature "xmpp_chat" is enabled on environment - And I am logged in as "tame" - When I follow "Open chat" - And I select window "noosfero_chat" - Then I should see "Offline" within "a" - - @selenium - Scenario: view options to change my chat status through menu - Given feature "xmpp_chat" is enabled on environment - And I am logged in as "tame" - And I follow "Open chat" - When I select window "noosfero_chat" - Then "Online" should not be visible within "#user-status" - And "Busy" should not be visible within "#user-status" - And "Sign out of chat" should not be visible within "#user-status" - When I follow "Offline" - Then "Online" should be visible within "#user-status" - And "Busy" should be visible within "#user-status" - And "Sign out of chat" should be visible within "#user-status" - - @selenium - Scenario: link to open chatroom of a community - Given the following communities - | identifier | name | - | autoramas | Autoramas | - And "Tame" is a member of "Autoramas" - And feature "xmpp_chat" is enabled on environment - And I am logged in as "tame" - When I go to autoramas's profile - Then I should see "Enter chat room" - - @selenium - Scenario: not see link to open chatroom of a community if not a member - Given the following communities - | identifier | name | - | autoramas | Autoramas | - And feature "xmpp_chat" is enabled on environment - And I am logged in as "tame" - When I go to autoramas's profile - Then I should not see "Enter chat room" within "a" - - @selenium - Scenario: not see link to open chatroom of a community if xmpp_chat disabled - Given the following communities - | identifier | name | - | autoramas | Autoramas | - And "Tame" is a member of "Autoramas" - And I am logged in as "tame" - When I go to autoramas's profile - Then I should not see "Enter chat room" within "a" - - @selenium - Scenario: open chatroom of a community in a new window - Given feature "xmpp_chat" is enabled on environment - And the following communities - | identifier | name | - | autoramas | Autoramas | - And "Tame" is a member of "Autoramas" - And I am logged in as "tame" - When I go to autoramas's profile - And I follow "Enter chat room" - And I select window "noosfero_chat" - Then I should see "Chat - Colivre.net - Friends online (0)" diff --git a/features/highlights_block.feature b/features/highlights_block.feature deleted file mode 100644 index 15ae21d..0000000 --- a/features/highlights_block.feature +++ /dev/null @@ -1,44 +0,0 @@ -Feature: Edit Highlight Block - As a user - I want to edit the highlight block - - Background: - Given I am on the homepage - And the following users - | login | name | - | jose | Jose Silva | - And I am logged in as "jose" - - @selenium - Scenario: Add new highlight - Given I follow "Control panel" - And I follow "Edit sideboxes" - And I follow "Add a block" - And I choose "Highlights" - And I press "Add" - And I follow "Edit" within ".highlights-block"#Need to hover the mouse on the box - And I follow "New highlight" - And I fill in "block_images__address" with "/" - And I fill in "block_images__position" with "0" - And I fill in "block_images__title" with "test highlights" - And I press "Save" - And I follow "Edit" within ".highlights-block" - Then I should see "Title" - - @selenium-fixme - Scenario: Remove one saved highlight - Given I follow "Control panel" - And I follow "Edit sideboxes" - And I follow "Add a block" - And I choose "Highlights" - And I press "Add" - And I follow "Edit" within ".highlights-block" - And I follow "New highlight" - And I fill in "block_images__address" with "/" - And I fill in "block_images__position" with "0" - And I fill in "block_images__title" with "test highlights"#Need to hover the mouse on the box - And I press "Save" - And I follow "Edit" within ".highlights-block" - And I follow "" within ".delete-highlight" - And I confirm the browser dialog - Then I should not see "Title" \ No newline at end of file diff --git a/features/manage_inputs.feature b/features/manage_inputs.feature deleted file mode 100644 index 3ae5a9a..0000000 --- a/features/manage_inputs.feature +++ /dev/null @@ -1,247 +0,0 @@ -Feature: manage inputs - As an enterprise owner - I want to manage my product's inputs - - Background: - Given the following users - | login | name | - | joaosilva | Joao Silva | - And the following enterprises - | identifier | owner | name | enabled | - | redemoinho | joaosilva | Rede Moinho | true | - Given the following product_category - | name | - | Music | - And the following product_categories - | name | parent | - | Rock | music | - | CD Player | music | - And the following product - | owner | category | name | - | redemoinho | rock | Abbey Road | - And feature "products_for_enterprises" is enabled on environment - And the following units - | singular | plural | - | Meter | Meters | - | Litre | Litres | - - @selenium - Scenario: add first input to a product - Given I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Abbey Road - And I follow "Inputs" - Then I should not see "Add new input or raw material" - And I follow "Add the inputs or raw material used by this product" - And I select "Music »" from "category_id" within "#categories_container_level0" - And I select "Rock" from "category_id" within "#categories_container_level1" - And I press "Save and continue" - Then I should see "Rock" - - @selenium - Scenario: add input to a product that already has inputs - Given the following input - | product | category | - | Abbey Road | music | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Abbey Road - And I follow "Inputs" - And I should not see "Add the inputs or raw material used by this product" - And I follow "Add new input or raw material" - And I select "Music »" from "category_id" within "#categories_container_level0" - And I select "Rock" from "category_id" within "#categories_container_level1" - And I press "Save and continue" - Then I should see "Rock" - - @selenium - Scenario: cancel addition of a product input - Given I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Abbey Road - And I follow "Inputs" - And I follow "Add the inputs or raw material used by this product" - And I should see "Cancel" within "#categories_selection_actionbar" - And I follow "Cancel" within "#categories_selection_actionbar" - Then I should see "Abbey Road" - And I should see "Add the inputs or raw material used by this product" - - Scenario: show input name and link to add details - Given the following input - | product | category | - | Abbey Road | music | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Abbey Road - And I follow "Inputs and raw material" - Then I should see "Music" within ".input-name" - And I should see "Click here to add price and the amount used" - - Scenario: Not show input edit button when dont have details yet - Given the following input - | product | category | - | Abbey Road | music | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Abbey Road - And I follow "Inputs and raw material" - Then I should not see "Edit" within ".input-item" - - Scenario: Show button to edit input - Given the following input - | product | category | price_per_unit | - | Abbey Road | music | 10.0 | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Abbey Road - And I follow "Inputs and raw material" - Then I should see "Edit" within ".input-item" - - @selenium-fixme - Scenario: Order inputs by position - Given the following product_categories - | name | - | Instrumental | - And the following inputs - | product | category | position | - | Abbey Road | Instrumental | 2 | - | Abbey Road | Rock | 1 | - | Abbey Road | CD Player | 3 | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Abbey Road - And I follow "Inputs" - Then I should see "Rock" above of "Instrumental" - And I should see "Instrumental" above of "CD Player" - - @selenium - Scenario: Save price of input - Given the following input - | product | category | - | Abbey Road | music | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Abbey Road - And I follow "Inputs" - Then I should see "Music" - When I follow "Click here to add price and the amount used" - And I should see "Price" - And I fill in "Price" with "10.50" - And I press "Save" - Then I should not see "Save" - - @selenium - Scenario: Update label of input price with selected unit - Given the following input - | product | category | - | Abbey Road | music | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Abbey Road - And I follow "Inputs" - And I follow "Click here to add price and the amount used" - And I should not see "Price by Meter ($)" - When I select "Meter" from "input_unit_id" within ".edit_input" - Then I should see "Price by Meter ($)" - - @selenium - Scenario: Save all price details of input - Given the following input - | product | category | - | Abbey Road | music | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Abbey Road - And I follow "Inputs" - And I follow "Click here to add price and the amount used" - And I fill in "Amount used" with "2.5" - And I fill in "Price" with "11.50" - And I select "Meter" from "input_unit_id" within ".edit_input" - And I press "Save" - Then I should see "2.5" - And I should see "Meter" - And I should not see "$ 11.50" - - @selenium - Scenario: Save and then edit price details of input - Given the following input - | product | category | - | Abbey Road | music | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Abbey Road - And I follow "Inputs" - And I follow "Click here to add price and the amount used" - And I fill in "Amount used" with "2.5" - And I fill in "Price" with "11.50" - And I select "Meter" from "input_unit_id" within ".edit_input" - And I press "Save" - Then I should see "2.5" - And I should see "Meter" - When I follow "Edit" within ".input-details" - And I fill in "Amount used" with "3.0" - And I fill in "Price" with "23.31" - And I select "Litre" from "input_unit_id" within ".edit_input" - And I press "Save" - Then I should see "3" - And I should see "Litre" - - @selenium - Scenario: Cancel edition of a input - Given the following input - | product | category | - | Abbey Road | music | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Abbey Road - And I follow "Inputs" - And I follow "Click here to add price and the amount used" - Then I should see "Cancel" - And I should see "Amount used" - And I should see "Price" - And I should see "This input or raw material inpact on the final price of the product?" - When I follow "Cancel" within ".edit_input" - Then I should see "Click here to add price and the amount used" - - @selenium - Scenario: Cancel edition of an input then edit again - Given the following input - | product | category | price_per_unit | unit | - | Abbey Road | music | 10.0 | Meter | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Abbey Road - And I follow "Inputs" - And I follow "Edit" within ".input-details" - And I should see "Cancel" within ".edit_input" - And I follow "Cancel" within ".edit_input" - And I follow "Edit" within ".input-details" - Then I should see "Amount used" - And I should see "Price by Meter" - - @selenium - Scenario: remove input - Given the following input - | product | category | - | Abbey Road | rock | - And I am logged in as "joaosilva" - And I go to Rede Moinho's page of product Abbey Road - And I follow "Inputs" - Then I should see "Rock" - And I should not see "Add the inputs or raw material used by this product" - When I follow "Remove" - And I confirm the browser dialog - Then I should see "Add the inputs or raw material used by this product" - - @selenium-fixme - Scenario: Order input list - Given the following product_category - | name | - | Movie | - And the following product - | owner | category | name | - | redemoinho | Movie | Ramones | - And the following inputs - | product | category | - | Ramones | Rock | - | Ramones | Music | - | Ramones | CD Player | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Ramones - And I follow "Inputs" - Then I should see "Rock" above of "Music" - And I should see "Music" above of "CD Player" - When I drag "Rock" to "Music" - Then I should see "Music" above of "Rock" - And I should see "Rock" above of "CD Player" - When I follow "Back to the product listing" - And I go to Rede Moinho's page of product Ramones - Then I should see "Music" above of "Rock" - And I should see "Rock" above of "CD Player" diff --git a/features/manage_product_price_details.feature b/features/manage_product_price_details.feature deleted file mode 100644 index 35a9f88..0000000 --- a/features/manage_product_price_details.feature +++ /dev/null @@ -1,179 +0,0 @@ -Feature: manage product price details - As an enterprise owner - I want to manage the details of product's price - - Background: - Given the following users - | login | name | - | joaosilva | Joao Silva | - And the following enterprises - | identifier | owner | name | enabled | - | redemoinho | joaosilva | Rede Moinho | true | - Given the following product_category - | name | - | Music | - And the following product_categories - | name | parent | - | Rock | music | - | CD Player | music | - And the following product - | owner | category | name | price | - | redemoinho | rock | Abbey Road | 80.0 | - And feature "products_for_enterprises" is enabled on environment - And the following inputs - | product | category | price_per_unit | amount_used | - | Abbey Road | Rock | 10.0 | 2 | - | Abbey Road | CD Player | 20.0 | 2 | - And the following production cost - | name | owner | - | Taxes | environment | - And I am logged in as "joaosilva" - - @selenium - Scenario: list total value of inputs as price details - Given I go to Rede Moinho's page of product Abbey Road - And I follow "Price composition" - And I follow "Describe here the cost of production" - Then I should see "Inputs" - And I should see "60.0" within ".inputs-cost" - - @selenium - Scenario: return to product after save - Given I go to Rede Moinho's page of product Abbey Road - And I follow "Price composition" - And I follow "Describe here the cost of production" - And I press "Save" - Then I should be on Rede Moinho's page of product Abbey Road - - @selenium - Scenario: add first item on price details - Given I go to Rede Moinho's page of product Abbey Road - And I follow "Price composition" - And I follow "Describe here the cost of production" - And I follow "New cost" - And I select "Taxes" from "price_details__production_cost_id" within "#display-product-price-details" - And I fill in "$" with "5.00" - And I leave the "#price_details__price" field - And I press "Save" - Then I should not see "Save" - And I should see "Describe here the cost of production" - - @selenium - Scenario: edit a production cost - Given the following production cost - | name | owner | - | Energy | environment | - When I go to Rede Moinho's page of product Abbey Road - And I follow "Price composition" - And I follow "Describe here the cost of production" - And I follow "New cost" - And I select "Taxes" from "price_details__production_cost_id" within "#display-product-price-details" - And I fill in "$" with "20.00" - And I leave the ".price-details-price" field - And I press "Save" - Then I should not see "Save" - And I should see "Taxes" within "#display-price-details" - When I follow "Describe here the cost of production" - And I select "Energy" from "price_details__production_cost_id" within "#display-product-price-details" - And I leave the "#price_details__price" field - And I press "Save" - And I should not see "Taxes" within "#display-price-details" - And I should see "Energy" within "#display-price-details" - - Scenario: not display price composition if product does not have input - Given the following product - | owner | category | name | - | redemoinho | rock | Yellow Submarine | - And the following user - | login | name | - | mariasouza | Maria Souza | - And I am logged in as "mariasouza" - When I go to Rede Moinho's page of product Yellow Submarine - Then I should not see "Price composition" - - Scenario: not display price composition if price is not fully described - Given I am not logged in - And I go to Rede Moinho's page of product Abbey Road - Then I should not see "Price composition" - - @selenium - Scenario: display price details if price is fully described - Given I go to Rede Moinho's page of product Abbey Road - And I follow "Price composition" - And I follow "Describe here the cost of production" - And I follow "New cost" - And I select "Taxes" from "price_details__production_cost_id" within "#display-product-price-details" - And I fill in "$" with "20.00" - And I press "Save" - And I go to Rede Moinho's page of product Abbey Road - Then I should see "Inputs" within ".price-detail-name" - And I should see "60.0" within ".price-detail-price" - - @selenium - Scenario: create a new cost clicking on select - Given I go to Rede Moinho's page of product Abbey Road - And I follow "Price composition" - And I follow "Describe here the cost of production" - And I follow "New cost" - And I select "Other cost" from "price_details__production_cost_id" within "#display-product-price-details" - And I want to add "Energy" as cost - And I fill in "$" with "10.00" - And I leave the "#price_details__price" field - And I press "Save" - When I follow "Describe here the cost of production" - Then I should see "Energy" within ".production-cost-selection" - - @selenium - Scenario: add created cost on new-cost-fields - Given I go to Rede Moinho's page of product Abbey Road - And I follow "Price composition" - And I follow "Describe here the cost of production" - And I follow "New cost" - And I select "Other cost" from "price_details__production_cost_id" within "#display-product-price-details" - And I want to add "Energy" as cost - Then I should see "Energy" within "#display-product-price-details" - - @selenium - Scenario: remove price detail - Given the following price detail - | product | production_cost | price | - | Abbey Road | Taxes | 20.0 | - And I go to Rede Moinho's page of product Abbey Road - And I follow "Price composition" - And I follow "Describe here the cost of production" - And I should see "Taxes" within "#manage-product-details-form" - When I follow "Remove" within "#manage-product-details-form" - And I confirm the browser dialog - And I press "Save" - And I follow "Describe here the cost of production" - Then I should not see "Taxes" within "#manage-product-details-form" - - Scenario: display progressbar - Given I go to Rede Moinho's page of product Abbey Road - And I follow "Price composition" - And I follow "Describe here the cost of production" - Then I should see "$ 60.00 of $ 80.00" within "#progressbar-text" - - @selenium - Scenario: update value on progressbar after addition of new cost - Given I go to Rede Moinho's page of product Abbey Road - And I follow "Price composition" - And I follow "Describe here the cost of production" - Then I should see "$ 60.00 of $ 80.00" within "#progressbar-text" - And I follow "New cost" - And I fill in "$" with "10.00" - And I leave the "#price_details__price" field - Then I should see "$ 70.00 of $ 80.00" within "#progressbar-text" - - @selenium - Scenario: update value on progressbar after editing an input - Given I go to Rede Moinho's page of product Abbey Road - And I follow "Price composition" - And I follow "Describe here the cost of production" - Then I should see "$ 60.00 of $ 80.00" within "#progressbar-text" - When I follow "Inputs" - And I follow "Edit" within ".input-details" - And I fill in "Price" with "23.31" - And I press "Save" - Then I follow "Price composition" - And I should see "$ 86.62 of $ 80.00" within "#progressbar-text" diff --git a/features/manage_products.feature b/features/manage_products.feature deleted file mode 100644 index d215401..0000000 --- a/features/manage_products.feature +++ /dev/null @@ -1,520 +0,0 @@ -Feature: manage products - As an enterprise owner - I want to manage my products - - Background: - Given the following users - | login | name | - | joaosilva | Joao Silva | - And the following enterprises - | identifier | owner | name | enabled | - | redemoinho | joaosilva | Rede Moinho | true | - And feature "products_for_enterprises" is enabled on environment - - Scenario: display "create new product" button - Given I am logged in as "joaosilva" - And I am on redemoinho's control panel - When I follow "Manage Products/Services" - Then I should see "New product or service" - - Scenario: paginate public listing products and services - Given the following product_category - | name | - | Bicycle | - And the following products - | owner | category | name | description | created_at | - | redemoinho | bicycle | Bike A | bicycle 1 | 2014-04-01 01:00:00 | - | redemoinho | bicycle | Bike B | bicycle 2 | 2014-04-01 02:00:00 | - | redemoinho | bicycle | Bike C | bicycle 3 | 2014-04-01 03:00:00 | - | redemoinho | bicycle | Bike D | bicycle 4 | 2014-04-01 04:00:00 | - | redemoinho | bicycle | Bike E | bicycle 5 | 2014-04-01 05:00:00 | - | redemoinho | bicycle | Bike F | bicycle 6 | 2014-04-01 06:00:00 | - | redemoinho | bicycle | Bike G | bicycle 7 | 2014-04-01 07:00:00 | - | redemoinho | bicycle | Bike H | bicycle 8 | 2014-04-01 08:00:00 | - | redemoinho | bicycle | Bike I | bicycle 9 | 2014-04-01 09:00:00 | - | redemoinho | bicycle | Bike J | bicycle 10 | 2014-04-01 10:00:00 | - | redemoinho | bicycle | Bike K | bicycle 11 | 2014-04-01 11:00:00 | - When I go to redemoinho's products page - Then I should see "Bike A" within "#product-list" - And I should see "Bike B" within "#product-list" - And I should see "Bike C" within "#product-list" - And I should see "Bike D" within "#product-list" - And I should see "Bike E" within "#product-list" - And I should see "Bike F" within "#product-list" - And I should not see "Bike G" within "#product-list" - And I should not see "Bike H" within "#product-list" - And I should not see "Bike I" within "#product-list" - And I should not see "Bike J" within "#product-list" - And I should not see "Bike K" within "#product-list" - When I follow "Next" - Then I should see "Bike G" within "#product-list" - Then I should see "Bike H" within "#product-list" - Then I should see "Bike I" within "#product-list" - Then I should see "Bike J" within "#product-list" - Then I should see "Bike K" within "#product-list" - - Scenario: listing products and services - Given I am logged in as "joaosilva" - And I am on redemoinho's control panel - And I follow "Manage Products/Services" - Then I should see "Listing products and services" - - Scenario: see button to back in categories hierarchy - Given I am logged in as "joaosilva" - And I am on redemoinho's control panel - And I follow "Manage Products/Services" - When I follow "New product or service" - Then I should see "Back to the product listing" link - - Scenario: see toplevel categories - Given the following product_categories - | name | - | Products | - | Services | - Given I am logged in as "joaosilva" - And I go to redemoinho's new product page - Then I should see "Products" - And I should see "Service" - - @selenium - Scenario: select a toplevel category and see subcategories - Given the following product_categories - | name | - | Products level0 | - And the following product_categories - | name | parent | - | Computers level1 | products-level0 | - | DVDs level1 | products-level0 | - Given I am logged in as "joaosilva" - And I go to redemoinho's new product page - And I select "Products level0 »" from "category_id" within "#categories_container_level0" - Then I should see "Computers level1" - And I should see "DVDs level1" - - @selenium - Scenario: hide subcategories when select other toplevel category - Given the following product_categories - | name | - | Products level0 | - | Services level0 | - And the following product_categories - | name | parent | - | Computers level1 | products-level0 | - | Software development level1 | services-level0 | - Given I am logged in as "joaosilva" - And I go to redemoinho's new product page - And I should not see /Computers level/ - And I select "Products level0 »" from "category_id" within "#categories_container_wrapper" - And I should see /Computers level/ - And I should not see /Software develop/ - And I select "Services level0 »" from "category_id" within "#categories_container_wrapper" - Then I should see /Software develop/ - And I should not see /Computers level/ - - @selenium - Scenario: show hierarchy of categories - Given the following product_categories - | name | - | Products | - And the following product_category - | name | parent | - | Computers | products | - Given I am logged in as "joaosilva" - And I go to redemoinho's new product page - And I select "Products »" from "category_id" within "#categories_container_level0" - And I select "Computers" from "category_id" within "#categories_container_level1" - Then I should see "Products → Computers" - - @selenium - Scenario: show links in hierarchy of categories and not link current category - Given the following product_category - | name | - | Toplevel Product Categories | - Given the following product_category - | name | parent | - | Category Level 1 | toplevel-product-categories | - Given I am logged in as "joaosilva" - And I go to redemoinho's new product page - And I select "Toplevel Product Categories »" from "category_id" within "#categories_container_level0" - And I select "Category Level 1" from "category_id" within "#categories_container_level1" - Then I should see "Toplevel Product Categories" link - And I should not see "Category Level 1" link - - @selenium - Scenario: save button come initialy disabled - Given the following product_category - | name | - | Only for test | - And I am logged in as "joaosilva" - When I go to redemoinho's new product page - Then the "#save_and_continue" button should be disabled - - @selenium - Scenario: enable save button when select one category - Given I am logged in as "joaosilva" - And the following product_category - | name | - | Browsers (accept categories) | - When I go to redemoinho's new product page - And I select "Browsers (accept categories)" from "category_id" within "#categories_container_wrapper" - Then the "#save_and_continue" button should be enabled - - @selenium - Scenario: dont enable save button when select category with not accept products - Given the following product_category - | name | accept_products | - | Browsers | false | - Given I am logged in as "joaosilva" - When I go to redemoinho's new product page - And I select "Browsers" from "category_id" within "#categories_container_wrapper" - Then the "#save_and_continue" button should be disabled - - @selenium - Scenario: save product - Given the following product_category - | name | - | Bicycle | - Given I am logged in as "joaosilva" - When I go to redemoinho's new product page - And I select "Bicycle" from "category_id" within "#categories_container_wrapper" - And I press "Save and continue" - When I go to redemoinho's products page - And I follow "Bicycle" within "#product-list" - Then I should see "Bicycle" within "#show_product" - And I should see "Change category" - - Scenario: a user with permission can see edit links - Given the following product_category - | name | - | Bicycle | - And the following products - | owner | category | name | description | - | redemoinho | bicycle | Bike | Red bicycle | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Bike - Then I should see "Change category" - And I should see "Edit name" - And I should see "Edit description" - And I should see "Change image" - - Scenario: an allowed user will see a different button when has no description - Given the following product_category - | name | - | Bicycle | - And the following products - | owner | category | name | - | redemoinho | bicycle | Bike | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Bike - Then I should see "Change category" - And I should see "Edit name" - And I should see "Add some description to your product" - And I should see "Add price and other basic information" - And I should see "Change image" - - Scenario: an allowed user will see a different button when has no basic info - Given the following product_category - | name | - | Bicycle | - And the following products - | owner | category | name | - | redemoinho | bicycle | Bike | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Bike - Then I should see "Change category" - And I should see "Edit name" - And I should see "Add price and other basic information" - And I should see "Change image" - - Scenario: a not logged user cannot see edit links - Given I am not logged in - And the following product_category - | name | - | Bicycle | - And the following products - | owner | category | name | description | - | redemoinho | bicycle | Bike | Red bicycle | - When I go to Rede Moinho's page of product Bike - Then I should not see "Change category" - And I should not see "Edit name" - And I should not see "Edit description" - And I should not see "Edit basic information" - And I should not see "Change image" - - Scenario: a not allowed user cannot see edit links - Given the following users - | login | name | - | mariasantos | Maria Santos | - And the following product_category - | name | - | Bicycle | - And the following products - | owner | category | name | description | - | redemoinho | bicycle | Bike | Red bicycle | - And I am logged in as "mariasantos" - When I go to Rede Moinho's page of product Bike - Then I should not see "Change category" - And I should not see "Edit name" - And I should not see "Edit description" - And I should not see "Edit basic information" - And I should not see "Change image" - - @selenium - Scenario: edit name of a product - Given the following product_category - | name | - | Bicycle | - And the following products - | owner | category | name | - | redemoinho | bicycle | Bike | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Bike - And I follow "Edit name" - And I fill in "Red bicycle" for "product_name" - And I press "Save" - Then I should see "Red bicycle" - And I should be on Rede Moinho's page of product Red bicycle - - @selenium - Scenario: cancel edition of a product name - Given the following product_category - | name | - | Bicycle | - And the following products - | owner | category | name | - | redemoinho | bicycle | Bike | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Bike - And I follow "Edit name" - When I follow "Cancel" - Then I should see "Bike" - - @selenium - Scenario: edit category of a product - Given the following product_category - | name | - | Eletronics | - And the following product_categories - | name | parent | - | Computers | eletronics | - | DVDs | eletronics | - And the following products - | owner | category | name | - | redemoinho | computers | Generic pc | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Generic pc - And I follow "Change category" - And I select "Eletronics »" from "category_id" within "#categories_container_level0" - Then I select "DVDs" from "category_id" within "#categories_container_level1" - And I press "Save and continue" - When I go to Rede Moinho's page of product Generic pc - Then I should see "Eletronics → DVDs" within ".hierarchy-category" - - @selenium - Scenario: cancel edition of a product category - Given the following product_category - | name | - | Eletronics | - And the following product_categories - | name | parent | - | Computers | eletronics | - | DVDs | eletronics | - And the following products - | owner | category | name | - | redemoinho | computers | Generic pc | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Generic pc - And I follow "Change category" - When I follow "Back to product" - Then I should see "Eletronics → Computers" - - - @selenium - Scenario: edit image of a product - Given the following product_category - | name | - | Eletronics | - And the following product_categories - | name | parent | - | Computers | eletronics | - | DVDs | eletronics | - And the following products - | owner | category | name | - | redemoinho | computers | Generic pc | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Generic pc - And I follow "Change image" - When I follow "Cancel" - Then I should be on Rede Moinho's page of product Generic pc - - # FIXME Not working because of tinyMCE plus selenium - # @selenium - # Scenario: edit description of a product - # Given the following product_category - # | name | - # | Bicycle | - # And the following products - # | owner | category | name | description | - # | redemoinho | bicycle | Bike | A new red bicycle | - # And I am logged in as "joaosilva" - # When I go to Rede Moinho's page of product Bike - # Then I should see "A new red bicycle" - # And I follow "Edit basic information" - # And I type in tinyMCE field "Description" the text "An used red bicycle" - # And I press "Save" - # Then I should not see "A new red bicycle" - # And I should see "An used red bicycle" - # And I should be on Rede Moinho's page of product Bike - - @selenium - Scenario: cancel edition of a product description - Given the following product_category - | name | - | Bicycle | - And the following products - | owner | category | name | description | - | redemoinho | bicycle | Bike | A new red bicycle | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Bike - Then I should see "A new red bicycle" - And I follow "Edit description" - When I follow "Cancel" - Then I should see "A new red bicycle" - And I should be on Rede Moinho's page of product Bike - - @selenium - Scenario: Edit product category and save without select any category - Given the following product_category - | name | - | Eletronics | - And the following product_category - | name | parent | - | Computers | eletronics | - And the following products - | owner | category | name | - | redemoinho | computers | Generic pc | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Generic pc - And I follow "Change category" - And I press "Save and continue" - Then I should not see "Product category can't be blank" - When I go to Rede Moinho's page of product Generic pc - Then I should see "Eletronics → Computers" within ".hierarchy-category" - - And I should see "Generic pc" - - @selenium - Scenario: Scroll categories selection to right when editing - Given the following product_category - | name | - | Eletronics | - And the following product_category - | name | parent | - | Quantum Computers | eletronics | - And the following product_category - | name | parent | - | Laptops from Mars | Quantum Computers | - And the following product_category - | name | parent | - | Netbook from Venus | Laptops from Mars | - And the following product_category - | name | parent | - | Nanonote nanotech with long name | Netbook from Venus | - And the following products - | owner | category | name | - | redemoinho | Nanonote nanotech with long name | Generic pc | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Generic pc - And I follow "Change category" - Then "Netbook from Venus" should be visible within "#categories_container_wrapper" - - @selenium - Scenario: Truncate long category name in selection of category - Given the following product_category - | name | - | Super Quantum Computers with teraflops | - | Nanonote nanotech with long long name | - And the following product_category - | name | parent | - | Netbook Quantum | Super Quantum Computers with teraflops | - And I am logged in as "joaosilva" - When I go to redemoinho's new product page - Then I should see "Nanonote nanotech with long lo..." - And I should see "Super Quantum Computers with t... »" - - @selenium - Scenario: Edit unit of a product together your name - Given the following product_category - | name | - | Bicycle | - And the following products - | owner | category | name | - | redemoinho | bicycle | Bike | - And the following units - | singular | plural | - | Kilo | Kilos | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Bike - And I follow "Edit name and unit" - And I fill in "Red bicycle" for "product_name" - And I select "Kilo" from "product_unit_id" within "#product-name-form" - And I press "Save" - Then I should see "Red bicycle - kilo" - - @selenium - Scenario: Show info about unavailable product - Given the following product_category - | name | - | Bicycle | - And the following products - | owner | category | name | - | redemoinho | bicycle | Bike | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Bike - And I follow "Add price and other basic information" - And I fill in "10" for "product_price" - And I choose "No" - And I press "Save" - Then I should see "Product not available!" - - @selenium - Scenario: Add and remove some qualifiers - Given the following product_category - | name | - | Bicycle | - And the following products - | owner | category | name | - | redemoinho | bicycle | Bike | - And the following qualifiers - | name | - | Organic | - And the following certifiers - | name | qualifiers | - | Colivre | Organic | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Bike - And I follow "Add price and other basic information" - And I follow "Add new qualifier" - And I select "Organic" from "selected_qualifier" within "#product-qualifiers-list" - And I press "Save" - And I go to Rede Moinho's page of product Bike - Then I should see "Organic (Self declared)" - When I follow "Edit basic information" - And I follow "Delete qualifier" - And I press "Save" - And I go to Rede Moinho's page of product Bike - Then I should not see "Organic (Self declared)" - - @selenium - Scenario: Show checkbox to mark product as highlight - Given the following product_category - | name | - | Bicycle | - And the following products - | owner | category | name | - | redemoinho | bicycle | Bike | - And I am logged in as "joaosilva" - When I go to Rede Moinho's page of product Bike - And I follow "Add price and other basic information" - Then I should see "Highlight this product?" - And I check "Highlight this product?" -- libgit2 0.21.2