mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Hiding side menu elements by filtering rather than by making invisible
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
.side_menu{ ng: { controller: 'sideMenuCtrl' } }
|
||||
%a.menu_item{ href: "#", id: "{{ item.name.toLowerCase().replace(' ', '_') }}",
|
||||
ng: { repeat: '(index,item) in menu.items',
|
||||
show: "item.visible",
|
||||
ng: { repeat: '(index,item) in menu.items | filter:{visible:true}',
|
||||
click: 'select(index)',
|
||||
class: '{ selected: item.selected}',
|
||||
'class-odd' => "'odd'",
|
||||
|
||||
@@ -199,13 +199,13 @@ feature %q{
|
||||
click_link "Primary Details"
|
||||
uncheck 'enterprise_is_primary_producer'
|
||||
choose 'None'
|
||||
page.should have_selector "#enterprise_fees", visible: false
|
||||
page.should have_selector "#payment_methods", visible: false
|
||||
page.should have_selector "#shipping_methods", visible: false
|
||||
page.should_not have_selector "#enterprise_fees"
|
||||
page.should_not have_selector "#payment_methods"
|
||||
page.should_not have_selector "#shipping_methods"
|
||||
check 'enterprise_is_primary_producer'
|
||||
page.should have_selector "#enterprise_fees"
|
||||
page.should have_selector "#payment_methods", visible: false
|
||||
page.should have_selector "#shipping_methods", visible: false
|
||||
page.should_not have_selector "#payment_methods"
|
||||
page.should_not have_selector "#shipping_methods"
|
||||
uncheck 'enterprise_is_primary_producer'
|
||||
choose 'Own'
|
||||
page.should have_selector "#enterprise_fees"
|
||||
|
||||
Reference in New Issue
Block a user