rspec-html 0.2.18 → 0.2.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ed64650126b6d13ca7e26b3d221ac1c94f207fa07d861fcd32755a0066888a09
4
- data.tar.gz: 19e69584d514d085b14f58990bc8e92ce6f037bea48ab8efd826e774633f1237
3
+ metadata.gz: 8865227f9bc455819f4ba863c81203949304871e7e99d61c28d97f7564aaad4b
4
+ data.tar.gz: af0fb5b13c1ee182abf8f38a3b5ff9298db43caaf59fc5bd11c6de4e6bd6523a
5
5
  SHA512:
6
- metadata.gz: 7ab9654fe0b62ccd8f6ae7c34c6733f8251ef64e5c94d45ffc2b2edd93e0ed0a54ee1c0977a3c642e083eb2dfb9a18ca8259e9b796b5b169bf646cdf0dd2781d
7
- data.tar.gz: 8689600fae2602785a021cb33385ff7ce8cc8972054f0946a2e9fab790b6d51e03c079a715a47543a752712749a4b1209fe0ccd666486d4efc6dc11ef7cde7aa
6
+ metadata.gz: 147e82f99c7412cf7cddf6439e6b6d787f0a39738a51c521dda2890545329f852797dcf242ed0ce1d61bd50c268d8dfa72fdc62ca47bfdfd041d03466d29544f
7
+ data.tar.gz: 1d2758a85c78c74a39c8114f1d00dbaac9ec3a64ffec22d5fa246b1133bc789d880dc2fdcf99daddf7641546f28fa32fd6a11fd4bc01ebf89b6cc7ab5a409ca1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rspec-html (0.2.18)
4
+ rspec-html (0.2.19)
5
5
  nokogiri (~> 1.10)
6
6
  rspec (~> 3.0)
7
7
 
@@ -15,7 +15,9 @@ GEM
15
15
  i18n (1.13.0)
16
16
  concurrent-ruby (~> 1.0)
17
17
  json (2.6.3)
18
- nokogiri (1.13.10-x86_64-linux)
18
+ mini_portile2 (2.8.2)
19
+ nokogiri (1.13.10)
20
+ mini_portile2 (~> 2.8.0)
19
21
  racc (~> 1.4)
20
22
  paint (2.3.0)
21
23
  parallel (1.23.0)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RSpec
4
4
  module HTML
5
- VERSION = '0.2.18'
5
+ VERSION = '0.2.19'
6
6
  end
7
7
  end
@@ -3,13 +3,13 @@
3
3
  module RSpecHTML
4
4
  # HTML DOM element abstraction
5
5
  class Element
6
- attr_reader :name, :element
6
+ attr_reader :name, :element, :search
7
7
 
8
8
  extend Forwardable
9
9
 
10
10
  def_delegators :@search,
11
11
  :has_css?, :has_xpath?, :include?,
12
- :all, :siblings, :text, :truncated_text, :attributes,
12
+ :all, :siblings, :text, :truncated_text, :attributes, :to_a,
13
13
  :size, :length, :[],
14
14
  :css, :xpath, :checked?
15
15
 
@@ -16,6 +16,10 @@ module RSpecHTML
16
16
  @element&.to_s
17
17
  end
18
18
 
19
+ def to_a
20
+ all.to_a
21
+ end
22
+
19
23
  def include?(val)
20
24
  text.include?(val)
21
25
  end
@@ -140,7 +144,7 @@ module RSpecHTML
140
144
 
141
145
  def where_xpath(tag, query)
142
146
  conditions = "[#{where_conditions(query)}]" unless query.compact.empty?
143
- @element&.xpath("//#{tag}#{conditions}")
147
+ @element&.xpath(".//#{tag}#{conditions}")
144
148
  end
145
149
 
146
150
  def where_conditions(query)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-html
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.18
4
+ version: 0.2.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Farrell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-05 00:00:00.000000000 Z
11
+ date: 2023-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri