mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Add guard for selector overflow (only seen in phantom, not selenium/firefox or dev server/chrome)
This commit is contained in:
@@ -38,7 +38,8 @@ Darkswarm.directive 'singleLineSelectors', ($timeout, $filter) ->
|
||||
|
||||
loadWidths = ->
|
||||
$(element).find("li").not(".more").each (i) ->
|
||||
scope.allSelectors[i].width = $(this).outerWidth(true)
|
||||
if i < scope.allSelectors.length
|
||||
scope.allSelectors[i].width = $(this).outerWidth(true)
|
||||
return null # So we don't exit the loop weirdly
|
||||
|
||||
scope.overFlowSelectors = ->
|
||||
|
||||
@@ -55,6 +55,23 @@ feature %q{
|
||||
page.should_not have_content producer2.name
|
||||
end
|
||||
|
||||
describe "filtering by product property" do
|
||||
it "filters" do
|
||||
toggle_filters
|
||||
|
||||
toggle_filter 'Organic'
|
||||
|
||||
page.should have_content producer1.name
|
||||
page.should_not have_content producer2.name
|
||||
|
||||
toggle_filter 'Organic'
|
||||
toggle_filter 'Biodynamic'
|
||||
|
||||
page.should_not have_content producer1.name
|
||||
page.should have_content producer2.name
|
||||
end
|
||||
end
|
||||
|
||||
it "shows all producers with expandable details" do
|
||||
page.should have_content producer1.name
|
||||
expand_active_table_node producer1.name
|
||||
|
||||
Reference in New Issue
Block a user