capybara 3.4.1 → 3.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc443391d5475d63631cf014a869483782fdd43b41be89913c516e5ff9962865
4
- data.tar.gz: 481d818b0d7a349230ec9affd25f7b3e61154ae1c6f13814fe756487278dbcae
3
+ metadata.gz: 8f5ec7ca4c922139d08198a15752604d048cb848ee93824e06c8d5c37d617b25
4
+ data.tar.gz: da7e6957df159f701ef63ce7a950f5ef951240f0f74a345558c8066d4c298f59
5
5
  SHA512:
6
- metadata.gz: 2aa608506c11b767f734d012c2a9624b31165a00ad95e96632f023e8e5479203381efa7be8b9241769e5abd136416471f0025b54c5e16cbdad8b22239fbf0974
7
- data.tar.gz: 9a867a64c8ce8b95c60c50398cd9ee1bb9dfaa683b3d630b72de79bb7c9aafb3f8d93131706ff598515fc84b4eb3fc0fa25928665f556eaf3117adbf1f7398c1
6
+ metadata.gz: 6ac51efb716931eaf27df9d605c175efacbb15bc808d8f87f3ae880bff5bd493193952c47d58cf8088740f3a1b258d1f24e7a409b5ca682a602d7595f9930cbf
7
+ data.tar.gz: 77820939323587eb1e4a74ad3b31e0e93575a82fdad8a18c1ed239069790426db1c3017deced1e813bbeda7f6a148513a3fd74ee87db332b27ab15e722a9d702
data/History.md CHANGED
@@ -1,3 +1,10 @@
1
+ # Version 3.4.2
2
+ Release date: 2018-07-24
3
+
4
+ ### Fixed
5
+
6
+ * `match_xxx` selectors and `matches_xxx?` predicates work correctly with elements found using a sibling selector - Issue #2073
7
+
1
8
  # Version 3.4.1
2
9
  Release date: 2018-07-20
3
10
 
@@ -709,7 +709,7 @@ module Capybara
709
709
  query_args = _set_query_session_options(*query_args)
710
710
  query = Capybara::Queries::MatchQuery.new(*query_args, &optional_filter_block)
711
711
  synchronize(query.wait) do
712
- yield query.resolve_for(query_scope)
712
+ yield query.resolve_for(self.first(:xpath, './parent::*', minimum: 0) || query_scope)
713
713
  end
714
714
  true
715
715
  end
@@ -24,6 +24,17 @@ Capybara::SpecHelper.spec '#match_selector?' do
24
24
  expect(@element).to match_selector('span.number')
25
25
  end
26
26
 
27
+ it 'should work with elements located via a sibling selector' do
28
+ sibling = @element.sibling(:css, 'span', text: 'Other span')
29
+ expect(sibling).to match_selector(:xpath, '//span')
30
+ expect(sibling).to match_selector(:css, 'span')
31
+ end
32
+
33
+ it 'should work with the html element' do
34
+ html = @session.find('/html')
35
+ expect(html).to match_selector(:css, 'html')
36
+ end
37
+
27
38
  context 'with text' do
28
39
  it 'should discard all matches where the given string is not contained' do
29
40
  expect(@element).to match_selector('//span', text: '42')
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Capybara
4
- VERSION = '3.4.1'
4
+ VERSION = '3.4.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.1
4
+ version: 3.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Walpole
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain:
12
12
  - gem-public_cert.pem
13
- date: 2018-07-20 00:00:00.000000000 Z
13
+ date: 2018-07-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: addressable