Hiding side menu elements by filtering rather than by making invisible

This commit is contained in:
Rob Harrington
2014-12-17 12:58:00 +11:00
parent a489aa7ad9
commit 435bc177f8
2 changed files with 6 additions and 7 deletions

View File

@@ -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'",

View File

@@ -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"