Commit f612a617c0eef2a1d46c2a16bd6d63d94be4fc92

Authored by Antonio Terceiro
1 parent 7c8b7da7

Remove broken tests that are beyond repair

features/chat.feature
@@ -1,145 +0,0 @@ @@ -1,145 +0,0 @@
1 -Feature: chat  
2 - As a Noosfero user  
3 - I want to chat with my friends  
4 -  
5 - Background:  
6 - Given the following users  
7 - | login | name |  
8 - | tame | Tame |  
9 - | mariasilva | Maria Silva |  
10 - | josesilva | Jose Silva |  
11 - And "tame" is online in chat  
12 - And "mariasilva" is online in chat  
13 - And "josesilva" is online in chat  
14 - And "tame" is friend of "mariasilva"  
15 - And "tame" is friend of "josesilva"  
16 -  
17 - @selenium  
18 - Scenario: provide link to open chat  
19 - Given feature "xmpp_chat" is enabled on environment  
20 - And I am logged in as "tame"  
21 - Then I should see "Open chat" within "#user"  
22 -  
23 - @selenium  
24 - Scenario: provide the chat online users content  
25 - Given feature "xmpp_chat" is enabled on environment  
26 - And I am logged in as "tame"  
27 - Then I should see "Friends in chat "  
28 -  
29 - @selenium  
30 - Scenario: provide the chat online users list  
31 - Given the profile "tame" has no blocks  
32 - And feature "xmpp_chat" is enabled on environment  
33 - And I am logged in as "tame"  
34 - And I go to tame's profile  
35 - When I follow "chat-online-users-title"  
36 - Then I should see "Maria Silva"  
37 - And I should see "Jose Silva"  
38 -  
39 - Scenario: not provide link to chat when environment not support that  
40 - Given I am logged in as "tame"  
41 - Then I should not see "Open chat" within "#user"  
42 -  
43 - Scenario: not provide link to chat when the user is logged out  
44 - Given I am on tame's homepage  
45 - Then I should not see "Open chat" within "#user"  
46 -  
47 - @selenium  
48 - Scenario: not provide the chat online users list when environment not support that  
49 - Given I am logged in as "tame"  
50 - Then I should not see "Friends in chat "  
51 -  
52 - Scenario: block access to chat when environment not support that  
53 - Given I am logged in as "tame"  
54 - When I go to chat  
55 - Then I should see "There is no such page"  
56 -  
57 - Scenario: block access to chat for guest users  
58 - Given feature "xmpp_chat" is enabled on environment  
59 - When I go to chat  
60 - Then I should be on login page  
61 -  
62 - @selenium  
63 - Scenario: open chat in a new window  
64 - Given feature "xmpp_chat" is enabled on environment  
65 - And I am logged in as "tame"  
66 - When I follow "Open chat"  
67 - And I select window "noosfero_chat"  
68 - Then I should see "Chat - Colivre.net - Friends online (0)"  
69 -  
70 - @selenium  
71 - Scenario: open chat with an online user in a new window  
72 - Given the profile "tame" has no blocks  
73 - And feature "xmpp_chat" is enabled on environment  
74 - And I am logged in as "tame"  
75 - And I go to tame's profile  
76 - When I follow "chat-online-users-title"  
77 - And I follow "Maria Silva"  
78 - And I select window "noosfero_chat"  
79 - Then I should see "Chat - Colivre.net - Friends online (0)"  
80 -  
81 - @selenium  
82 - Scenario: chat starts disconnected by default  
83 - Given feature "xmpp_chat" is enabled on environment  
84 - And I am logged in as "tame"  
85 - When I follow "Open chat"  
86 - And I select window "noosfero_chat"  
87 - Then I should see "Offline" within "a"  
88 -  
89 - @selenium  
90 - Scenario: view options to change my chat status through menu  
91 - Given feature "xmpp_chat" is enabled on environment  
92 - And I am logged in as "tame"  
93 - And I follow "Open chat"  
94 - When I select window "noosfero_chat"  
95 - Then "Online" should not be visible within "#user-status"  
96 - And "Busy" should not be visible within "#user-status"  
97 - And "Sign out of chat" should not be visible within "#user-status"  
98 - When I follow "Offline"  
99 - Then "Online" should be visible within "#user-status"  
100 - And "Busy" should be visible within "#user-status"  
101 - And "Sign out of chat" should be visible within "#user-status"  
102 -  
103 - @selenium  
104 - Scenario: link to open chatroom of a community  
105 - Given the following communities  
106 - | identifier | name |  
107 - | autoramas | Autoramas |  
108 - And "Tame" is a member of "Autoramas"  
109 - And feature "xmpp_chat" is enabled on environment  
110 - And I am logged in as "tame"  
111 - When I go to autoramas's profile  
112 - Then I should see "Enter chat room"  
113 -  
114 - @selenium  
115 - Scenario: not see link to open chatroom of a community if not a member  
116 - Given the following communities  
117 - | identifier | name |  
118 - | autoramas | Autoramas |  
119 - And feature "xmpp_chat" is enabled on environment  
120 - And I am logged in as "tame"  
121 - When I go to autoramas's profile  
122 - Then I should not see "Enter chat room" within "a"  
123 -  
124 - @selenium  
125 - Scenario: not see link to open chatroom of a community if xmpp_chat disabled  
126 - Given the following communities  
127 - | identifier | name |  
128 - | autoramas | Autoramas |  
129 - And "Tame" is a member of "Autoramas"  
130 - And I am logged in as "tame"  
131 - When I go to autoramas's profile  
132 - Then I should not see "Enter chat room" within "a"  
133 -  
134 - @selenium  
135 - Scenario: open chatroom of a community in a new window  
136 - Given feature "xmpp_chat" is enabled on environment  
137 - And the following communities  
138 - | identifier | name |  
139 - | autoramas | Autoramas |  
140 - And "Tame" is a member of "Autoramas"  
141 - And I am logged in as "tame"  
142 - When I go to autoramas's profile  
143 - And I follow "Enter chat room"  
144 - And I select window "noosfero_chat"  
145 - Then I should see "Chat - Colivre.net - Friends online (0)"  
features/highlights_block.feature
@@ -1,44 +0,0 @@ @@ -1,44 +0,0 @@
1 -Feature: Edit Highlight Block  
2 - As a user  
3 - I want to edit the highlight block  
4 -  
5 - Background:  
6 - Given I am on the homepage  
7 - And the following users  
8 - | login | name |  
9 - | jose | Jose Silva |  
10 - And I am logged in as "jose"  
11 -  
12 - @selenium  
13 - Scenario: Add new highlight  
14 - Given I follow "Control panel"  
15 - And I follow "Edit sideboxes"  
16 - And I follow "Add a block"  
17 - And I choose "Highlights"  
18 - And I press "Add"  
19 - And I follow "Edit" within ".highlights-block"#Need to hover the mouse on the box  
20 - And I follow "New highlight"  
21 - And I fill in "block_images__address" with "/"  
22 - And I fill in "block_images__position" with "0"  
23 - And I fill in "block_images__title" with "test highlights"  
24 - And I press "Save"  
25 - And I follow "Edit" within ".highlights-block"  
26 - Then I should see "Title"  
27 -  
28 - @selenium-fixme  
29 - Scenario: Remove one saved highlight  
30 - Given I follow "Control panel"  
31 - And I follow "Edit sideboxes"  
32 - And I follow "Add a block"  
33 - And I choose "Highlights"  
34 - And I press "Add"  
35 - And I follow "Edit" within ".highlights-block"  
36 - And I follow "New highlight"  
37 - And I fill in "block_images__address" with "/"  
38 - And I fill in "block_images__position" with "0"  
39 - And I fill in "block_images__title" with "test highlights"#Need to hover the mouse on the box  
40 - And I press "Save"  
41 - And I follow "Edit" within ".highlights-block"  
42 - And I follow "" within ".delete-highlight"  
43 - And I confirm the browser dialog  
44 - Then I should not see "Title"  
45 \ No newline at end of file 0 \ No newline at end of file
features/manage_inputs.feature
@@ -1,247 +0,0 @@ @@ -1,247 +0,0 @@
1 -Feature: manage inputs  
2 - As an enterprise owner  
3 - I want to manage my product's inputs  
4 -  
5 - Background:  
6 - Given the following users  
7 - | login | name |  
8 - | joaosilva | Joao Silva |  
9 - And the following enterprises  
10 - | identifier | owner | name | enabled |  
11 - | redemoinho | joaosilva | Rede Moinho | true |  
12 - Given the following product_category  
13 - | name |  
14 - | Music |  
15 - And the following product_categories  
16 - | name | parent |  
17 - | Rock | music |  
18 - | CD Player | music |  
19 - And the following product  
20 - | owner | category | name |  
21 - | redemoinho | rock | Abbey Road |  
22 - And feature "products_for_enterprises" is enabled on environment  
23 - And the following units  
24 - | singular | plural |  
25 - | Meter | Meters |  
26 - | Litre | Litres |  
27 -  
28 - @selenium  
29 - Scenario: add first input to a product  
30 - Given I am logged in as "joaosilva"  
31 - When I go to Rede Moinho's page of product Abbey Road  
32 - And I follow "Inputs"  
33 - Then I should not see "Add new input or raw material"  
34 - And I follow "Add the inputs or raw material used by this product"  
35 - And I select "Music »" from "category_id" within "#categories_container_level0"  
36 - And I select "Rock" from "category_id" within "#categories_container_level1"  
37 - And I press "Save and continue"  
38 - Then I should see "Rock"  
39 -  
40 - @selenium  
41 - Scenario: add input to a product that already has inputs  
42 - Given the following input  
43 - | product | category |  
44 - | Abbey Road | music |  
45 - And I am logged in as "joaosilva"  
46 - When I go to Rede Moinho's page of product Abbey Road  
47 - And I follow "Inputs"  
48 - And I should not see "Add the inputs or raw material used by this product"  
49 - And I follow "Add new input or raw material"  
50 - And I select "Music »" from "category_id" within "#categories_container_level0"  
51 - And I select "Rock" from "category_id" within "#categories_container_level1"  
52 - And I press "Save and continue"  
53 - Then I should see "Rock"  
54 -  
55 - @selenium  
56 - Scenario: cancel addition of a product input  
57 - Given I am logged in as "joaosilva"  
58 - When I go to Rede Moinho's page of product Abbey Road  
59 - And I follow "Inputs"  
60 - And I follow "Add the inputs or raw material used by this product"  
61 - And I should see "Cancel" within "#categories_selection_actionbar"  
62 - And I follow "Cancel" within "#categories_selection_actionbar"  
63 - Then I should see "Abbey Road"  
64 - And I should see "Add the inputs or raw material used by this product"  
65 -  
66 - Scenario: show input name and link to add details  
67 - Given the following input  
68 - | product | category |  
69 - | Abbey Road | music |  
70 - And I am logged in as "joaosilva"  
71 - When I go to Rede Moinho's page of product Abbey Road  
72 - And I follow "Inputs and raw material"  
73 - Then I should see "Music" within ".input-name"  
74 - And I should see "Click here to add price and the amount used"  
75 -  
76 - Scenario: Not show input edit button when dont have details yet  
77 - Given the following input  
78 - | product | category |  
79 - | Abbey Road | music |  
80 - And I am logged in as "joaosilva"  
81 - When I go to Rede Moinho's page of product Abbey Road  
82 - And I follow "Inputs and raw material"  
83 - Then I should not see "Edit" within ".input-item"  
84 -  
85 - Scenario: Show button to edit input  
86 - Given the following input  
87 - | product | category | price_per_unit |  
88 - | Abbey Road | music | 10.0 |  
89 - And I am logged in as "joaosilva"  
90 - When I go to Rede Moinho's page of product Abbey Road  
91 - And I follow "Inputs and raw material"  
92 - Then I should see "Edit" within ".input-item"  
93 -  
94 - @selenium-fixme  
95 - Scenario: Order inputs by position  
96 - Given the following product_categories  
97 - | name |  
98 - | Instrumental |  
99 - And the following inputs  
100 - | product | category | position |  
101 - | Abbey Road | Instrumental | 2 |  
102 - | Abbey Road | Rock | 1 |  
103 - | Abbey Road | CD Player | 3 |  
104 - And I am logged in as "joaosilva"  
105 - When I go to Rede Moinho's page of product Abbey Road  
106 - And I follow "Inputs"  
107 - Then I should see "Rock" above of "Instrumental"  
108 - And I should see "Instrumental" above of "CD Player"  
109 -  
110 - @selenium  
111 - Scenario: Save price of input  
112 - Given the following input  
113 - | product | category |  
114 - | Abbey Road | music |  
115 - And I am logged in as "joaosilva"  
116 - When I go to Rede Moinho's page of product Abbey Road  
117 - And I follow "Inputs"  
118 - Then I should see "Music"  
119 - When I follow "Click here to add price and the amount used"  
120 - And I should see "Price"  
121 - And I fill in "Price" with "10.50"  
122 - And I press "Save"  
123 - Then I should not see "Save"  
124 -  
125 - @selenium  
126 - Scenario: Update label of input price with selected unit  
127 - Given the following input  
128 - | product | category |  
129 - | Abbey Road | music |  
130 - And I am logged in as "joaosilva"  
131 - When I go to Rede Moinho's page of product Abbey Road  
132 - And I follow "Inputs"  
133 - And I follow "Click here to add price and the amount used"  
134 - And I should not see "Price by Meter ($)"  
135 - When I select "Meter" from "input_unit_id" within ".edit_input"  
136 - Then I should see "Price by Meter ($)"  
137 -  
138 - @selenium  
139 - Scenario: Save all price details of input  
140 - Given the following input  
141 - | product | category |  
142 - | Abbey Road | music |  
143 - And I am logged in as "joaosilva"  
144 - When I go to Rede Moinho's page of product Abbey Road  
145 - And I follow "Inputs"  
146 - And I follow "Click here to add price and the amount used"  
147 - And I fill in "Amount used" with "2.5"  
148 - And I fill in "Price" with "11.50"  
149 - And I select "Meter" from "input_unit_id" within ".edit_input"  
150 - And I press "Save"  
151 - Then I should see "2.5"  
152 - And I should see "Meter"  
153 - And I should not see "$ 11.50"  
154 -  
155 - @selenium  
156 - Scenario: Save and then edit price details of input  
157 - Given the following input  
158 - | product | category |  
159 - | Abbey Road | music |  
160 - And I am logged in as "joaosilva"  
161 - When I go to Rede Moinho's page of product Abbey Road  
162 - And I follow "Inputs"  
163 - And I follow "Click here to add price and the amount used"  
164 - And I fill in "Amount used" with "2.5"  
165 - And I fill in "Price" with "11.50"  
166 - And I select "Meter" from "input_unit_id" within ".edit_input"  
167 - And I press "Save"  
168 - Then I should see "2.5"  
169 - And I should see "Meter"  
170 - When I follow "Edit" within ".input-details"  
171 - And I fill in "Amount used" with "3.0"  
172 - And I fill in "Price" with "23.31"  
173 - And I select "Litre" from "input_unit_id" within ".edit_input"  
174 - And I press "Save"  
175 - Then I should see "3"  
176 - And I should see "Litre"  
177 -  
178 - @selenium  
179 - Scenario: Cancel edition of a input  
180 - Given the following input  
181 - | product | category |  
182 - | Abbey Road | music |  
183 - And I am logged in as "joaosilva"  
184 - When I go to Rede Moinho's page of product Abbey Road  
185 - And I follow "Inputs"  
186 - And I follow "Click here to add price and the amount used"  
187 - Then I should see "Cancel"  
188 - And I should see "Amount used"  
189 - And I should see "Price"  
190 - And I should see "This input or raw material inpact on the final price of the product?"  
191 - When I follow "Cancel" within ".edit_input"  
192 - Then I should see "Click here to add price and the amount used"  
193 -  
194 - @selenium  
195 - Scenario: Cancel edition of an input then edit again  
196 - Given the following input  
197 - | product | category | price_per_unit | unit |  
198 - | Abbey Road | music | 10.0 | Meter |  
199 - And I am logged in as "joaosilva"  
200 - When I go to Rede Moinho's page of product Abbey Road  
201 - And I follow "Inputs"  
202 - And I follow "Edit" within ".input-details"  
203 - And I should see "Cancel" within ".edit_input"  
204 - And I follow "Cancel" within ".edit_input"  
205 - And I follow "Edit" within ".input-details"  
206 - Then I should see "Amount used"  
207 - And I should see "Price by Meter"  
208 -  
209 - @selenium  
210 - Scenario: remove input  
211 - Given the following input  
212 - | product | category |  
213 - | Abbey Road | rock |  
214 - And I am logged in as "joaosilva"  
215 - And I go to Rede Moinho's page of product Abbey Road  
216 - And I follow "Inputs"  
217 - Then I should see "Rock"  
218 - And I should not see "Add the inputs or raw material used by this product"  
219 - When I follow "Remove"  
220 - And I confirm the browser dialog  
221 - Then I should see "Add the inputs or raw material used by this product"  
222 -  
223 - @selenium-fixme  
224 - Scenario: Order input list  
225 - Given the following product_category  
226 - | name |  
227 - | Movie |  
228 - And the following product  
229 - | owner | category | name |  
230 - | redemoinho | Movie | Ramones |  
231 - And the following inputs  
232 - | product | category |  
233 - | Ramones | Rock |  
234 - | Ramones | Music |  
235 - | Ramones | CD Player |  
236 - And I am logged in as "joaosilva"  
237 - When I go to Rede Moinho's page of product Ramones  
238 - And I follow "Inputs"  
239 - Then I should see "Rock" above of "Music"  
240 - And I should see "Music" above of "CD Player"  
241 - When I drag "Rock" to "Music"  
242 - Then I should see "Music" above of "Rock"  
243 - And I should see "Rock" above of "CD Player"  
244 - When I follow "Back to the product listing"  
245 - And I go to Rede Moinho's page of product Ramones  
246 - Then I should see "Music" above of "Rock"  
247 - And I should see "Rock" above of "CD Player"  
features/manage_product_price_details.feature
@@ -1,179 +0,0 @@ @@ -1,179 +0,0 @@
1 -Feature: manage product price details  
2 - As an enterprise owner  
3 - I want to manage the details of product's price  
4 -  
5 - Background:  
6 - Given the following users  
7 - | login | name |  
8 - | joaosilva | Joao Silva |  
9 - And the following enterprises  
10 - | identifier | owner | name | enabled |  
11 - | redemoinho | joaosilva | Rede Moinho | true |  
12 - Given the following product_category  
13 - | name |  
14 - | Music |  
15 - And the following product_categories  
16 - | name | parent |  
17 - | Rock | music |  
18 - | CD Player | music |  
19 - And the following product  
20 - | owner | category | name | price |  
21 - | redemoinho | rock | Abbey Road | 80.0 |  
22 - And feature "products_for_enterprises" is enabled on environment  
23 - And the following inputs  
24 - | product | category | price_per_unit | amount_used |  
25 - | Abbey Road | Rock | 10.0 | 2 |  
26 - | Abbey Road | CD Player | 20.0 | 2 |  
27 - And the following production cost  
28 - | name | owner |  
29 - | Taxes | environment |  
30 - And I am logged in as "joaosilva"  
31 -  
32 - @selenium  
33 - Scenario: list total value of inputs as price details  
34 - Given I go to Rede Moinho's page of product Abbey Road  
35 - And I follow "Price composition"  
36 - And I follow "Describe here the cost of production"  
37 - Then I should see "Inputs"  
38 - And I should see "60.0" within ".inputs-cost"  
39 -  
40 - @selenium  
41 - Scenario: return to product after save  
42 - Given I go to Rede Moinho's page of product Abbey Road  
43 - And I follow "Price composition"  
44 - And I follow "Describe here the cost of production"  
45 - And I press "Save"  
46 - Then I should be on Rede Moinho's page of product Abbey Road  
47 -  
48 - @selenium  
49 - Scenario: add first item on price details  
50 - Given I go to Rede Moinho's page of product Abbey Road  
51 - And I follow "Price composition"  
52 - And I follow "Describe here the cost of production"  
53 - And I follow "New cost"  
54 - And I select "Taxes" from "price_details__production_cost_id" within "#display-product-price-details"  
55 - And I fill in "$" with "5.00"  
56 - And I leave the "#price_details__price" field  
57 - And I press "Save"  
58 - Then I should not see "Save"  
59 - And I should see "Describe here the cost of production"  
60 -  
61 - @selenium  
62 - Scenario: edit a production cost  
63 - Given the following production cost  
64 - | name | owner |  
65 - | Energy | environment |  
66 - When I go to Rede Moinho's page of product Abbey Road  
67 - And I follow "Price composition"  
68 - And I follow "Describe here the cost of production"  
69 - And I follow "New cost"  
70 - And I select "Taxes" from "price_details__production_cost_id" within "#display-product-price-details"  
71 - And I fill in "$" with "20.00"  
72 - And I leave the ".price-details-price" field  
73 - And I press "Save"  
74 - Then I should not see "Save"  
75 - And I should see "Taxes" within "#display-price-details"  
76 - When I follow "Describe here the cost of production"  
77 - And I select "Energy" from "price_details__production_cost_id" within "#display-product-price-details"  
78 - And I leave the "#price_details__price" field  
79 - And I press "Save"  
80 - And I should not see "Taxes" within "#display-price-details"  
81 - And I should see "Energy" within "#display-price-details"  
82 -  
83 - Scenario: not display price composition if product does not have input  
84 - Given the following product  
85 - | owner | category | name |  
86 - | redemoinho | rock | Yellow Submarine |  
87 - And the following user  
88 - | login | name |  
89 - | mariasouza | Maria Souza |  
90 - And I am logged in as "mariasouza"  
91 - When I go to Rede Moinho's page of product Yellow Submarine  
92 - Then I should not see "Price composition"  
93 -  
94 - Scenario: not display price composition if price is not fully described  
95 - Given I am not logged in  
96 - And I go to Rede Moinho's page of product Abbey Road  
97 - Then I should not see "Price composition"  
98 -  
99 - @selenium  
100 - Scenario: display price details if price is fully described  
101 - Given I go to Rede Moinho's page of product Abbey Road  
102 - And I follow "Price composition"  
103 - And I follow "Describe here the cost of production"  
104 - And I follow "New cost"  
105 - And I select "Taxes" from "price_details__production_cost_id" within "#display-product-price-details"  
106 - And I fill in "$" with "20.00"  
107 - And I press "Save"  
108 - And I go to Rede Moinho's page of product Abbey Road  
109 - Then I should see "Inputs" within ".price-detail-name"  
110 - And I should see "60.0" within ".price-detail-price"  
111 -  
112 - @selenium  
113 - Scenario: create a new cost clicking on select  
114 - Given I go to Rede Moinho's page of product Abbey Road  
115 - And I follow "Price composition"  
116 - And I follow "Describe here the cost of production"  
117 - And I follow "New cost"  
118 - And I select "Other cost" from "price_details__production_cost_id" within "#display-product-price-details"  
119 - And I want to add "Energy" as cost  
120 - And I fill in "$" with "10.00"  
121 - And I leave the "#price_details__price" field  
122 - And I press "Save"  
123 - When I follow "Describe here the cost of production"  
124 - Then I should see "Energy" within ".production-cost-selection"  
125 -  
126 - @selenium  
127 - Scenario: add created cost on new-cost-fields  
128 - Given I go to Rede Moinho's page of product Abbey Road  
129 - And I follow "Price composition"  
130 - And I follow "Describe here the cost of production"  
131 - And I follow "New cost"  
132 - And I select "Other cost" from "price_details__production_cost_id" within "#display-product-price-details"  
133 - And I want to add "Energy" as cost  
134 - Then I should see "Energy" within "#display-product-price-details"  
135 -  
136 - @selenium  
137 - Scenario: remove price detail  
138 - Given the following price detail  
139 - | product | production_cost | price |  
140 - | Abbey Road | Taxes | 20.0 |  
141 - And I go to Rede Moinho's page of product Abbey Road  
142 - And I follow "Price composition"  
143 - And I follow "Describe here the cost of production"  
144 - And I should see "Taxes" within "#manage-product-details-form"  
145 - When I follow "Remove" within "#manage-product-details-form"  
146 - And I confirm the browser dialog  
147 - And I press "Save"  
148 - And I follow "Describe here the cost of production"  
149 - Then I should not see "Taxes" within "#manage-product-details-form"  
150 -  
151 - Scenario: display progressbar  
152 - Given I go to Rede Moinho's page of product Abbey Road  
153 - And I follow "Price composition"  
154 - And I follow "Describe here the cost of production"  
155 - Then I should see "$ 60.00 of $ 80.00" within "#progressbar-text"  
156 -  
157 - @selenium  
158 - Scenario: update value on progressbar after addition of new cost  
159 - Given I go to Rede Moinho's page of product Abbey Road  
160 - And I follow "Price composition"  
161 - And I follow "Describe here the cost of production"  
162 - Then I should see "$ 60.00 of $ 80.00" within "#progressbar-text"  
163 - And I follow "New cost"  
164 - And I fill in "$" with "10.00"  
165 - And I leave the "#price_details__price" field  
166 - Then I should see "$ 70.00 of $ 80.00" within "#progressbar-text"  
167 -  
168 - @selenium  
169 - Scenario: update value on progressbar after editing an input  
170 - Given I go to Rede Moinho's page of product Abbey Road  
171 - And I follow "Price composition"  
172 - And I follow "Describe here the cost of production"  
173 - Then I should see "$ 60.00 of $ 80.00" within "#progressbar-text"  
174 - When I follow "Inputs"  
175 - And I follow "Edit" within ".input-details"  
176 - And I fill in "Price" with "23.31"  
177 - And I press "Save"  
178 - Then I follow "Price composition"  
179 - And I should see "$ 86.62 of $ 80.00" within "#progressbar-text"  
features/manage_products.feature
@@ -1,520 +0,0 @@ @@ -1,520 +0,0 @@
1 -Feature: manage products  
2 - As an enterprise owner  
3 - I want to manage my products  
4 -  
5 - Background:  
6 - Given the following users  
7 - | login | name |  
8 - | joaosilva | Joao Silva |  
9 - And the following enterprises  
10 - | identifier | owner | name | enabled |  
11 - | redemoinho | joaosilva | Rede Moinho | true |  
12 - And feature "products_for_enterprises" is enabled on environment  
13 -  
14 - Scenario: display "create new product" button  
15 - Given I am logged in as "joaosilva"  
16 - And I am on redemoinho's control panel  
17 - When I follow "Manage Products/Services"  
18 - Then I should see "New product or service"  
19 -  
20 - Scenario: paginate public listing products and services  
21 - Given the following product_category  
22 - | name |  
23 - | Bicycle |  
24 - And the following products  
25 - | owner | category | name | description | created_at |  
26 - | redemoinho | bicycle | Bike A | bicycle 1 | 2014-04-01 01:00:00 |  
27 - | redemoinho | bicycle | Bike B | bicycle 2 | 2014-04-01 02:00:00 |  
28 - | redemoinho | bicycle | Bike C | bicycle 3 | 2014-04-01 03:00:00 |  
29 - | redemoinho | bicycle | Bike D | bicycle 4 | 2014-04-01 04:00:00 |  
30 - | redemoinho | bicycle | Bike E | bicycle 5 | 2014-04-01 05:00:00 |  
31 - | redemoinho | bicycle | Bike F | bicycle 6 | 2014-04-01 06:00:00 |  
32 - | redemoinho | bicycle | Bike G | bicycle 7 | 2014-04-01 07:00:00 |  
33 - | redemoinho | bicycle | Bike H | bicycle 8 | 2014-04-01 08:00:00 |  
34 - | redemoinho | bicycle | Bike I | bicycle 9 | 2014-04-01 09:00:00 |  
35 - | redemoinho | bicycle | Bike J | bicycle 10 | 2014-04-01 10:00:00 |  
36 - | redemoinho | bicycle | Bike K | bicycle 11 | 2014-04-01 11:00:00 |  
37 - When I go to redemoinho's products page  
38 - Then I should see "Bike A" within "#product-list"  
39 - And I should see "Bike B" within "#product-list"  
40 - And I should see "Bike C" within "#product-list"  
41 - And I should see "Bike D" within "#product-list"  
42 - And I should see "Bike E" within "#product-list"  
43 - And I should see "Bike F" within "#product-list"  
44 - And I should not see "Bike G" within "#product-list"  
45 - And I should not see "Bike H" within "#product-list"  
46 - And I should not see "Bike I" within "#product-list"  
47 - And I should not see "Bike J" within "#product-list"  
48 - And I should not see "Bike K" within "#product-list"  
49 - When I follow "Next"  
50 - Then I should see "Bike G" within "#product-list"  
51 - Then I should see "Bike H" within "#product-list"  
52 - Then I should see "Bike I" within "#product-list"  
53 - Then I should see "Bike J" within "#product-list"  
54 - Then I should see "Bike K" within "#product-list"  
55 -  
56 - Scenario: listing products and services  
57 - Given I am logged in as "joaosilva"  
58 - And I am on redemoinho's control panel  
59 - And I follow "Manage Products/Services"  
60 - Then I should see "Listing products and services"  
61 -  
62 - Scenario: see button to back in categories hierarchy  
63 - Given I am logged in as "joaosilva"  
64 - And I am on redemoinho's control panel  
65 - And I follow "Manage Products/Services"  
66 - When I follow "New product or service"  
67 - Then I should see "Back to the product listing" link  
68 -  
69 - Scenario: see toplevel categories  
70 - Given the following product_categories  
71 - | name |  
72 - | Products |  
73 - | Services |  
74 - Given I am logged in as "joaosilva"  
75 - And I go to redemoinho's new product page  
76 - Then I should see "Products"  
77 - And I should see "Service"  
78 -  
79 - @selenium  
80 - Scenario: select a toplevel category and see subcategories  
81 - Given the following product_categories  
82 - | name |  
83 - | Products level0 |  
84 - And the following product_categories  
85 - | name | parent |  
86 - | Computers level1 | products-level0 |  
87 - | DVDs level1 | products-level0 |  
88 - Given I am logged in as "joaosilva"  
89 - And I go to redemoinho's new product page  
90 - And I select "Products level0 »" from "category_id" within "#categories_container_level0"  
91 - Then I should see "Computers level1"  
92 - And I should see "DVDs level1"  
93 -  
94 - @selenium  
95 - Scenario: hide subcategories when select other toplevel category  
96 - Given the following product_categories  
97 - | name |  
98 - | Products level0 |  
99 - | Services level0 |  
100 - And the following product_categories  
101 - | name | parent |  
102 - | Computers level1 | products-level0 |  
103 - | Software development level1 | services-level0 |  
104 - Given I am logged in as "joaosilva"  
105 - And I go to redemoinho's new product page  
106 - And I should not see /Computers level/  
107 - And I select "Products level0 »" from "category_id" within "#categories_container_wrapper"  
108 - And I should see /Computers level/  
109 - And I should not see /Software develop/  
110 - And I select "Services level0 »" from "category_id" within "#categories_container_wrapper"  
111 - Then I should see /Software develop/  
112 - And I should not see /Computers level/  
113 -  
114 - @selenium  
115 - Scenario: show hierarchy of categories  
116 - Given the following product_categories  
117 - | name |  
118 - | Products |  
119 - And the following product_category  
120 - | name | parent |  
121 - | Computers | products |  
122 - Given I am logged in as "joaosilva"  
123 - And I go to redemoinho's new product page  
124 - And I select "Products »" from "category_id" within "#categories_container_level0"  
125 - And I select "Computers" from "category_id" within "#categories_container_level1"  
126 - Then I should see "Products → Computers"  
127 -  
128 - @selenium  
129 - Scenario: show links in hierarchy of categories and not link current category  
130 - Given the following product_category  
131 - | name |  
132 - | Toplevel Product Categories |  
133 - Given the following product_category  
134 - | name | parent |  
135 - | Category Level 1 | toplevel-product-categories |  
136 - Given I am logged in as "joaosilva"  
137 - And I go to redemoinho's new product page  
138 - And I select "Toplevel Product Categories »" from "category_id" within "#categories_container_level0"  
139 - And I select "Category Level 1" from "category_id" within "#categories_container_level1"  
140 - Then I should see "Toplevel Product Categories" link  
141 - And I should not see "Category Level 1" link  
142 -  
143 - @selenium  
144 - Scenario: save button come initialy disabled  
145 - Given the following product_category  
146 - | name |  
147 - | Only for test |  
148 - And I am logged in as "joaosilva"  
149 - When I go to redemoinho's new product page  
150 - Then the "#save_and_continue" button should be disabled  
151 -  
152 - @selenium  
153 - Scenario: enable save button when select one category  
154 - Given I am logged in as "joaosilva"  
155 - And the following product_category  
156 - | name |  
157 - | Browsers (accept categories) |  
158 - When I go to redemoinho's new product page  
159 - And I select "Browsers (accept categories)" from "category_id" within "#categories_container_wrapper"  
160 - Then the "#save_and_continue" button should be enabled  
161 -  
162 - @selenium  
163 - Scenario: dont enable save button when select category with not accept products  
164 - Given the following product_category  
165 - | name | accept_products |  
166 - | Browsers | false |  
167 - Given I am logged in as "joaosilva"  
168 - When I go to redemoinho's new product page  
169 - And I select "Browsers" from "category_id" within "#categories_container_wrapper"  
170 - Then the "#save_and_continue" button should be disabled  
171 -  
172 - @selenium  
173 - Scenario: save product  
174 - Given the following product_category  
175 - | name |  
176 - | Bicycle |  
177 - Given I am logged in as "joaosilva"  
178 - When I go to redemoinho's new product page  
179 - And I select "Bicycle" from "category_id" within "#categories_container_wrapper"  
180 - And I press "Save and continue"  
181 - When I go to redemoinho's products page  
182 - And I follow "Bicycle" within "#product-list"  
183 - Then I should see "Bicycle" within "#show_product"  
184 - And I should see "Change category"  
185 -  
186 - Scenario: a user with permission can see edit links  
187 - Given the following product_category  
188 - | name |  
189 - | Bicycle |  
190 - And the following products  
191 - | owner | category | name | description |  
192 - | redemoinho | bicycle | Bike | Red bicycle |  
193 - And I am logged in as "joaosilva"  
194 - When I go to Rede Moinho's page of product Bike  
195 - Then I should see "Change category"  
196 - And I should see "Edit name"  
197 - And I should see "Edit description"  
198 - And I should see "Change image"  
199 -  
200 - Scenario: an allowed user will see a different button when has no description  
201 - Given the following product_category  
202 - | name |  
203 - | Bicycle |  
204 - And the following products  
205 - | owner | category | name |  
206 - | redemoinho | bicycle | Bike |  
207 - And I am logged in as "joaosilva"  
208 - When I go to Rede Moinho's page of product Bike  
209 - Then I should see "Change category"  
210 - And I should see "Edit name"  
211 - And I should see "Add some description to your product"  
212 - And I should see "Add price and other basic information"  
213 - And I should see "Change image"  
214 -  
215 - Scenario: an allowed user will see a different button when has no basic info  
216 - Given the following product_category  
217 - | name |  
218 - | Bicycle |  
219 - And the following products  
220 - | owner | category | name |  
221 - | redemoinho | bicycle | Bike |  
222 - And I am logged in as "joaosilva"  
223 - When I go to Rede Moinho's page of product Bike  
224 - Then I should see "Change category"  
225 - And I should see "Edit name"  
226 - And I should see "Add price and other basic information"  
227 - And I should see "Change image"  
228 -  
229 - Scenario: a not logged user cannot see edit links  
230 - Given I am not logged in  
231 - And the following product_category  
232 - | name |  
233 - | Bicycle |  
234 - And the following products  
235 - | owner | category | name | description |  
236 - | redemoinho | bicycle | Bike | Red bicycle |  
237 - When I go to Rede Moinho's page of product Bike  
238 - Then I should not see "Change category"  
239 - And I should not see "Edit name"  
240 - And I should not see "Edit description"  
241 - And I should not see "Edit basic information"  
242 - And I should not see "Change image"  
243 -  
244 - Scenario: a not allowed user cannot see edit links  
245 - Given the following users  
246 - | login | name |  
247 - | mariasantos | Maria Santos |  
248 - And the following product_category  
249 - | name |  
250 - | Bicycle |  
251 - And the following products  
252 - | owner | category | name | description |  
253 - | redemoinho | bicycle | Bike | Red bicycle |  
254 - And I am logged in as "mariasantos"  
255 - When I go to Rede Moinho's page of product Bike  
256 - Then I should not see "Change category"  
257 - And I should not see "Edit name"  
258 - And I should not see "Edit description"  
259 - And I should not see "Edit basic information"  
260 - And I should not see "Change image"  
261 -  
262 - @selenium  
263 - Scenario: edit name of a product  
264 - Given the following product_category  
265 - | name |  
266 - | Bicycle |  
267 - And the following products  
268 - | owner | category | name |  
269 - | redemoinho | bicycle | Bike |  
270 - And I am logged in as "joaosilva"  
271 - When I go to Rede Moinho's page of product Bike  
272 - And I follow "Edit name"  
273 - And I fill in "Red bicycle" for "product_name"  
274 - And I press "Save"  
275 - Then I should see "Red bicycle"  
276 - And I should be on Rede Moinho's page of product Red bicycle  
277 -  
278 - @selenium  
279 - Scenario: cancel edition of a product name  
280 - Given the following product_category  
281 - | name |  
282 - | Bicycle |  
283 - And the following products  
284 - | owner | category | name |  
285 - | redemoinho | bicycle | Bike |  
286 - And I am logged in as "joaosilva"  
287 - When I go to Rede Moinho's page of product Bike  
288 - And I follow "Edit name"  
289 - When I follow "Cancel"  
290 - Then I should see "Bike"  
291 -  
292 - @selenium  
293 - Scenario: edit category of a product  
294 - Given the following product_category  
295 - | name |  
296 - | Eletronics |  
297 - And the following product_categories  
298 - | name | parent |  
299 - | Computers | eletronics |  
300 - | DVDs | eletronics |  
301 - And the following products  
302 - | owner | category | name |  
303 - | redemoinho | computers | Generic pc |  
304 - And I am logged in as "joaosilva"  
305 - When I go to Rede Moinho's page of product Generic pc  
306 - And I follow "Change category"  
307 - And I select "Eletronics »" from "category_id" within "#categories_container_level0"  
308 - Then I select "DVDs" from "category_id" within "#categories_container_level1"  
309 - And I press "Save and continue"  
310 - When I go to Rede Moinho's page of product Generic pc  
311 - Then I should see "Eletronics → DVDs" within ".hierarchy-category"  
312 -  
313 - @selenium  
314 - Scenario: cancel edition of a product category  
315 - Given the following product_category  
316 - | name |  
317 - | Eletronics |  
318 - And the following product_categories  
319 - | name | parent |  
320 - | Computers | eletronics |  
321 - | DVDs | eletronics |  
322 - And the following products  
323 - | owner | category | name |  
324 - | redemoinho | computers | Generic pc |  
325 - And I am logged in as "joaosilva"  
326 - When I go to Rede Moinho's page of product Generic pc  
327 - And I follow "Change category"  
328 - When I follow "Back to product"  
329 - Then I should see "Eletronics → Computers"  
330 -  
331 -  
332 - @selenium  
333 - Scenario: edit image of a product  
334 - Given the following product_category  
335 - | name |  
336 - | Eletronics |  
337 - And the following product_categories  
338 - | name | parent |  
339 - | Computers | eletronics |  
340 - | DVDs | eletronics |  
341 - And the following products  
342 - | owner | category | name |  
343 - | redemoinho | computers | Generic pc |  
344 - And I am logged in as "joaosilva"  
345 - When I go to Rede Moinho's page of product Generic pc  
346 - And I follow "Change image"  
347 - When I follow "Cancel"  
348 - Then I should be on Rede Moinho's page of product Generic pc  
349 -  
350 - # FIXME Not working because of tinyMCE plus selenium  
351 - # @selenium  
352 - # Scenario: edit description of a product  
353 - # Given the following product_category  
354 - # | name |  
355 - # | Bicycle |  
356 - # And the following products  
357 - # | owner | category | name | description |  
358 - # | redemoinho | bicycle | Bike | A new red bicycle |  
359 - # And I am logged in as "joaosilva"  
360 - # When I go to Rede Moinho's page of product Bike  
361 - # Then I should see "A new red bicycle"  
362 - # And I follow "Edit basic information"  
363 - # And I type in tinyMCE field "Description" the text "An used red bicycle"  
364 - # And I press "Save"  
365 - # Then I should not see "A new red bicycle"  
366 - # And I should see "An used red bicycle"  
367 - # And I should be on Rede Moinho's page of product Bike  
368 -  
369 - @selenium  
370 - Scenario: cancel edition of a product description  
371 - Given the following product_category  
372 - | name |  
373 - | Bicycle |  
374 - And the following products  
375 - | owner | category | name | description |  
376 - | redemoinho | bicycle | Bike | A new red bicycle |  
377 - And I am logged in as "joaosilva"  
378 - When I go to Rede Moinho's page of product Bike  
379 - Then I should see "A new red bicycle"  
380 - And I follow "Edit description"  
381 - When I follow "Cancel"  
382 - Then I should see "A new red bicycle"  
383 - And I should be on Rede Moinho's page of product Bike  
384 -  
385 - @selenium  
386 - Scenario: Edit product category and save without select any category  
387 - Given the following product_category  
388 - | name |  
389 - | Eletronics |  
390 - And the following product_category  
391 - | name | parent |  
392 - | Computers | eletronics |  
393 - And the following products  
394 - | owner | category | name |  
395 - | redemoinho | computers | Generic pc |  
396 - And I am logged in as "joaosilva"  
397 - When I go to Rede Moinho's page of product Generic pc  
398 - And I follow "Change category"  
399 - And I press "Save and continue"  
400 - Then I should not see "Product category can't be blank"  
401 - When I go to Rede Moinho's page of product Generic pc  
402 - Then I should see "Eletronics → Computers" within ".hierarchy-category"  
403 -  
404 - And I should see "Generic pc"  
405 -  
406 - @selenium  
407 - Scenario: Scroll categories selection to right when editing  
408 - Given the following product_category  
409 - | name |  
410 - | Eletronics |  
411 - And the following product_category  
412 - | name | parent |  
413 - | Quantum Computers | eletronics |  
414 - And the following product_category  
415 - | name | parent |  
416 - | Laptops from Mars | Quantum Computers |  
417 - And the following product_category  
418 - | name | parent |  
419 - | Netbook from Venus | Laptops from Mars |  
420 - And the following product_category  
421 - | name | parent |  
422 - | Nanonote nanotech with long name | Netbook from Venus |  
423 - And the following products  
424 - | owner | category | name |  
425 - | redemoinho | Nanonote nanotech with long name | Generic pc |  
426 - And I am logged in as "joaosilva"  
427 - When I go to Rede Moinho's page of product Generic pc  
428 - And I follow "Change category"  
429 - Then "Netbook from Venus" should be visible within "#categories_container_wrapper"  
430 -  
431 - @selenium  
432 - Scenario: Truncate long category name in selection of category  
433 - Given the following product_category  
434 - | name |  
435 - | Super Quantum Computers with teraflops |  
436 - | Nanonote nanotech with long long name |  
437 - And the following product_category  
438 - | name | parent |  
439 - | Netbook Quantum | Super Quantum Computers with teraflops |  
440 - And I am logged in as "joaosilva"  
441 - When I go to redemoinho's new product page  
442 - Then I should see "Nanonote nanotech with long lo..."  
443 - And I should see "Super Quantum Computers with t... »"  
444 -  
445 - @selenium  
446 - Scenario: Edit unit of a product together your name  
447 - Given the following product_category  
448 - | name |  
449 - | Bicycle |  
450 - And the following products  
451 - | owner | category | name |  
452 - | redemoinho | bicycle | Bike |  
453 - And the following units  
454 - | singular | plural |  
455 - | Kilo | Kilos |  
456 - And I am logged in as "joaosilva"  
457 - When I go to Rede Moinho's page of product Bike  
458 - And I follow "Edit name and unit"  
459 - And I fill in "Red bicycle" for "product_name"  
460 - And I select "Kilo" from "product_unit_id" within "#product-name-form"  
461 - And I press "Save"  
462 - Then I should see "Red bicycle - kilo"  
463 -  
464 - @selenium  
465 - Scenario: Show info about unavailable product  
466 - Given the following product_category  
467 - | name |  
468 - | Bicycle |  
469 - And the following products  
470 - | owner | category | name |  
471 - | redemoinho | bicycle | Bike |  
472 - And I am logged in as "joaosilva"  
473 - When I go to Rede Moinho's page of product Bike  
474 - And I follow "Add price and other basic information"  
475 - And I fill in "10" for "product_price"  
476 - And I choose "No"  
477 - And I press "Save"  
478 - Then I should see "Product not available!"  
479 -  
480 - @selenium  
481 - Scenario: Add and remove some qualifiers  
482 - Given the following product_category  
483 - | name |  
484 - | Bicycle |  
485 - And the following products  
486 - | owner | category | name |  
487 - | redemoinho | bicycle | Bike |  
488 - And the following qualifiers  
489 - | name |  
490 - | Organic |  
491 - And the following certifiers  
492 - | name | qualifiers |  
493 - | Colivre | Organic |  
494 - And I am logged in as "joaosilva"  
495 - When I go to Rede Moinho's page of product Bike  
496 - And I follow "Add price and other basic information"  
497 - And I follow "Add new qualifier"  
498 - And I select "Organic" from "selected_qualifier" within "#product-qualifiers-list"  
499 - And I press "Save"  
500 - And I go to Rede Moinho's page of product Bike  
501 - Then I should see "Organic (Self declared)"  
502 - When I follow "Edit basic information"  
503 - And I follow "Delete qualifier"  
504 - And I press "Save"  
505 - And I go to Rede Moinho's page of product Bike  
506 - Then I should not see "Organic (Self declared)"  
507 -  
508 - @selenium  
509 - Scenario: Show checkbox to mark product as highlight  
510 - Given the following product_category  
511 - | name |  
512 - | Bicycle |  
513 - And the following products  
514 - | owner | category | name |  
515 - | redemoinho | bicycle | Bike |  
516 - And I am logged in as "joaosilva"  
517 - When I go to Rede Moinho's page of product Bike  
518 - And I follow "Add price and other basic information"  
519 - Then I should see "Highlight this product?"  
520 - And I check "Highlight this product?"