lib/capybara/selector.rb in capybara-2.10.0 vs lib/capybara/selector.rb in capybara-2.10.1
- old
+ new
@@ -343,16 +343,18 @@
else
actual = node.all(:xpath, './/option', visible: false).map { |option| option.text(:all) }
end
options.sort == actual.sort
end
+
filter(:with_options) do |node, options|
finder_settings = { minimum: 0 }
if !node.visible?
finder_settings[:visible] = false
end
options.all? { |option| node.first(:option, option, finder_settings) }
end
+
filter(:selected) do |node, selected|
actual = node.all(:xpath, './/option', visible: false).select { |option| option.selected? }.map { |option| option.text(:all) }
[selected].flatten.sort == actual.sort
end