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: ac74f1ae1ddfe26fdb4678f7fdf14ed28917fb6f
4
- data.tar.gz: 536ecef0a0ede8ca0a3cf5516b53aed99cf0fd21
3
+ metadata.gz: 876b112f7d0a4bf348ff6eb5725b9acfba78231c
4
+ data.tar.gz: 5c9e9eb1859eae92ceeff6bdd27fb97508b2dbe0
5
5
  SHA512:
6
- metadata.gz: dc4360b3dbb316985608d3759fc847eb156912d59fd42c521386c447909083a2be85ce0b1bcc63f9eb544fe28f86c07c9c428e07c388d5c973f08041772d3081
7
- data.tar.gz: 745a6688c32f91a96a5a16702e06dafe97b8febc18d1081acaf9457333a34c8e0d856df4100d063de4a48e44621a79996bf9b3b78c6a782d82c19c797bb7edb5
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
@@ -1,3 +1,3 @@
1
1
  class Kookaburra
2
- VERSION = "1.2.3"
2
+ VERSION = "1.3.0"
3
3
  end
@@ -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.2.3
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-20 00:00:00.000000000 Z
13
+ date: 2014-01-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rest-client