kookaburra 1.2.3 → 1.3.0
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 876b112f7d0a4bf348ff6eb5725b9acfba78231c
|
4
|
+
data.tar.gz: 5c9e9eb1859eae92ceeff6bdd27fb97508b2dbe0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de33f1490e4bf1f0fbf8ebce836b63c5b0569da8e6a878377499c3b764bbc36fa5a8d57f534b79547e4ab89b965de8c5589ae037360e9d79763dab70804a4a70
|
7
|
+
data.tar.gz: 46b70542699935c33958a1712618c0eddc772971f07482077aa2aad13e0a4651ba845fb31032085916157d0edc98e34450e40aa37a95e4ec6cdd4e1527063f65
|
@@ -172,6 +172,18 @@ class Kookaburra
|
|
172
172
|
end
|
173
173
|
end
|
174
174
|
|
175
|
+
protected
|
176
|
+
|
177
|
+
# Provides a reference to the HTML element represented by this UIComponent
|
178
|
+
#
|
179
|
+
# This is useful for getting at attributes of the current element, because
|
180
|
+
# the normal find methods are scoped to run *inside* this element.
|
181
|
+
#
|
182
|
+
# @return Capybara::Element
|
183
|
+
def this_element
|
184
|
+
browser.find(component_locator)
|
185
|
+
end
|
186
|
+
|
175
187
|
private
|
176
188
|
|
177
189
|
# As of Ruby 2.1.0, 'SimpleDelegator' delegates the '#raise' method to the
|
data/lib/kookaburra/version.rb
CHANGED
@@ -79,6 +79,21 @@ describe Kookaburra::UIDriver::UIComponent do
|
|
79
79
|
end
|
80
80
|
end
|
81
81
|
|
82
|
+
describe '#this_element' do
|
83
|
+
it 'returns the HTML element representing this component' do
|
84
|
+
browser = double('Browser Driver')
|
85
|
+
element = double('Element')
|
86
|
+
|
87
|
+
configuration.stub(browser: browser)
|
88
|
+
def component.component_locator
|
89
|
+
'#my_component'
|
90
|
+
end
|
91
|
+
|
92
|
+
expect(browser).to receive(:find).with('#my_component').and_return(element)
|
93
|
+
expect(component.send(:this_element)).to be(element)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
82
97
|
it_behaves_like :it_can_make_assertions do
|
83
98
|
let(:subject) { component }
|
84
99
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kookaburra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Wilger
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-01-
|
13
|
+
date: 2014-01-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rest-client
|