Commit f205672c4c2ba693b0ac6bc8631cf0305db92dc0
1 parent
ddc24ef4
Exists in
master
and in
23 other branches
Adding checkbox to mark product as highlight
(ActionItem2320)
Showing
2 changed files
with
18 additions
and
0 deletions
Show diff stats
app/views/manage_products/_edit_info.rhtml
| @@ -21,6 +21,10 @@ | @@ -21,6 +21,10 @@ | ||
| 21 | <td class='formlabel'><%= _('Available') %></td> | 21 | <td class='formlabel'><%= _('Available') %></td> |
| 22 | <td class='formfield'><%= labelled_radio_button( _('Yes'), 'product[available]', true, @product.available, :id => 'product_available') + labelled_radio_button( _('No'), 'product[available]', false, !@product.available) %></td> | 22 | <td class='formfield'><%= labelled_radio_button( _('Yes'), 'product[available]', true, @product.available, :id => 'product_available') + labelled_radio_button( _('No'), 'product[available]', false, !@product.available) %></td> |
| 23 | </tr> | 23 | </tr> |
| 24 | + <tr> | ||
| 25 | + <td><%= f.label :highlighted, _('Highlight product') %></td> | ||
| 26 | + <td class='formfield'><%= f.check_box(:highlighted) %></td> | ||
| 27 | + </tr> | ||
| 24 | </table> | 28 | </table> |
| 25 | 29 | ||
| 26 | <% if !environment.qualifiers.empty? %> | 30 | <% if !environment.qualifiers.empty? %> |
features/manage_products.feature
| @@ -526,3 +526,17 @@ Feature: manage products | @@ -526,3 +526,17 @@ Feature: manage products | ||
| 526 | And I follow "Delete qualifier" | 526 | And I follow "Delete qualifier" |
| 527 | And I press "Save" | 527 | And I press "Save" |
| 528 | Then I should not see "Organic (Self declared)" | 528 | Then I should not see "Organic (Self declared)" |
| 529 | + | ||
| 530 | + @selenium | ||
| 531 | + Scenario: Show checkbox to mark product as highlight | ||
| 532 | + Given the following product_category | ||
| 533 | + | name | | ||
| 534 | + | Bicycle | | ||
| 535 | + And the following products | ||
| 536 | + | owner | category | name | | ||
| 537 | + | redemoinho | bicycle | Bike | | ||
| 538 | + And I am logged in as "joaosilva" | ||
| 539 | + When I go to Rede Moinho's page of product Bike | ||
| 540 | + And I follow "Add price and other basic information" | ||
| 541 | + Then I should see "Highlight product" | ||
| 542 | + And I check "Highlight product" |