Skip to content
This repository was archived by the owner on Mar 3, 2020. It is now read-only.

Commit 7bb9385

Browse files
authored
Merge pull request #1063 from thoughtbot/datalist
Selecting from a datalist test is expected to fail since Qt version doesn't support datalist - exclude
2 parents dc1224c + 02f9c64 commit 7bb9385

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

spec/spec_helper.rb

+11-8
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,17 @@ def has_internet?
5252
# Accessing unattached nodes is allowed when reload is disabled - Legacy behavior
5353
# Node#send_keys does not support modifiers and only supports a subset of special keys
5454
c.filter_run_excluding :full_description => lambda { |description, metadata|
55-
(description =~ /Capybara::Session webkit node #reload without automatic reload should not automatically reload/ ||
56-
if Gem::Version.new(Capybara::VERSION) < Gem::Version.new("2.12.0")
57-
description =~ /Capybara::Session webkit Capybara::Window\s*#(size|resize_to|maximize|close.*no_such_window_error)/ ||
58-
description =~ /Capybara::Session webkit node\s*#set should allow me to change the contents of a contenteditable elements child/
59-
else
60-
description =~ /Capybara::Session webkit Capybara::Window\s*#close.*no_such_window_error/
61-
end
62-
)
55+
patterns = [
56+
/Capybara::Session webkit node #reload without automatic reload should not automatically reload/,
57+
/Capybara::Session webkit #select input with datalist should select an option/,
58+
/Capybara::Session webkit Capybara::Window\s*#close.*no_such_window_error/
59+
]
60+
# These tests were implemented in a non-compatible manner in Capybara < 2.12.0
61+
if Gem::Version.new(Capybara::VERSION) < Gem::Version.new("2.12.0")
62+
patterns << /Capybara::Session webkit Capybara::Window\s*#(size|resize_to|maximize)/ <<
63+
/Capybara::Session webkit node\s*#set should allow me to change the contents of a contenteditable elements child/
64+
end
65+
patterns.any? { |pattern| description =~ pattern }
6366
}
6467

6568
c.filter_run :focus unless ENV["TRAVIS"]

0 commit comments

Comments
 (0)