druid-ts 1.1.6 → 1.1.7
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 +4 -4
- data/ChangeLog +68 -1
- data/Gemfile +1 -0
- data/cucumber.yml +1 -1
- data/features/audio.feature +33 -33
- data/features/element.feature +5 -0
- data/features/{sample-app/public → html}/04-Death_Becomes_Fur.mp4 +0 -0
- data/features/{sample-app/public → html}/04-Death_Becomes_Fur.oga +0 -0
- data/features/html/static_elements.html +2 -0
- data/features/multi_elements.feature +189 -0
- data/features/sample-app/sample_app.rb +5 -1
- data/features/step_definations/element_steps.rb +8 -0
- data/features/step_definations/form_steps.rb +2 -2
- data/features/step_definations/javasript_steps.rb +8 -2
- data/features/step_definations/multi_elements_steps.rb +118 -0
- data/features/support/persistent_browser.rb +44 -2
- data/features/support/targets/firefox14_osx.rb +5 -0
- data/features/support/targets/firefox14_windows7.rb +5 -0
- data/features/support/url_helper.rb +3 -1
- data/features/video.feature +51 -51
- data/lib/druid/accessors.rb +160 -287
- data/lib/druid/assist.rb +2 -2
- data/lib/druid/element_locators.rb +9 -1032
- data/lib/druid/elements/element.rb +7 -0
- data/lib/druid/locator_generator.rb +73 -0
- data/lib/druid/nested_elements.rb +50 -233
- data/lib/druid/page_factory.rb +7 -4
- data/lib/druid/version.rb +1 -1
- data/spec/druid/accessors_spec.rb +13 -2
- data/spec/druid/element_locators_spec.rb +5 -5
- data/spec/druid/elements/element_spec.rb +6 -0
- data/spec/druid/page_factory_spec.rb +10 -1
- metadata +10 -5
@@ -162,5 +162,11 @@ describe Druid::Elements::Element do
|
|
162
162
|
expect(we).to receive(:flash)
|
163
163
|
element.flash
|
164
164
|
end
|
165
|
+
|
166
|
+
it "should scroll into view" do
|
167
|
+
expect(we).to receive(:wd).and_return(we)
|
168
|
+
expect(we).to receive(:location_once_scrolled_into_view)
|
169
|
+
element.scroll_into_view
|
170
|
+
end
|
165
171
|
end
|
166
172
|
end
|
@@ -189,7 +189,7 @@ describe Druid::PageFactory do
|
|
189
189
|
end
|
190
190
|
|
191
191
|
it "should navigate to a page calling the default methods" do
|
192
|
-
pages = [[FactoryTestDruid, :a_method], [AnotherPage
|
192
|
+
pages = [[FactoryTestDruid, :a_method], [AnotherPage, :b_method]]
|
193
193
|
Druid::PageFactory.routes = {:default => pages}
|
194
194
|
fake_page = double('a_page')
|
195
195
|
expect(FactoryTestDruid).to receive(:new).with(driver,false).and_return(fake_page)
|
@@ -197,6 +197,15 @@ describe Druid::PageFactory do
|
|
197
197
|
expect(world.navigate_to(AnotherPage).class).to eql AnotherPage
|
198
198
|
end
|
199
199
|
|
200
|
+
it "should pass parameters to methods when navigating" do
|
201
|
+
pages = [[FactoryTestDruid, :a_method, 'blah'], [AnotherPage, :b_method]]
|
202
|
+
Druid::PageFactory.routes = {:default => pages}
|
203
|
+
fake_page = double('a_page')
|
204
|
+
expect(FactoryTestDruid).to receive(:new).with(driver,false).and_return(fake_page)
|
205
|
+
expect(fake_page).to receive(:a_method).with('blah')
|
206
|
+
expect(world.navigate_to(AnotherPage).class).to eql AnotherPage
|
207
|
+
end
|
208
|
+
|
200
209
|
it "should fail when it does not find a proper route" do
|
201
210
|
Druid::PageFactory.routes = {:default => ['a'], :another => ['b']}
|
202
211
|
expect{world.navigate_to(AnotherPage, :using => :no_route)}.to raise_error 'PageFactory route :no_route not found'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: druid-ts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Sheng
|
@@ -97,6 +97,8 @@ files:
|
|
97
97
|
- features/generic_elements.feature
|
98
98
|
- features/heading.feature
|
99
99
|
- features/hidden_field.feature
|
100
|
+
- features/html/04-Death_Becomes_Fur.mp4
|
101
|
+
- features/html/04-Death_Becomes_Fur.oga
|
100
102
|
- features/html/async.html
|
101
103
|
- features/html/frame_1.html
|
102
104
|
- features/html/frame_2.html
|
@@ -131,8 +133,6 @@ files:
|
|
131
133
|
- features/page_level_actions.feature
|
132
134
|
- features/paragraph.feature
|
133
135
|
- features/radio_button.feature
|
134
|
-
- features/sample-app/public/04-Death_Becomes_Fur.mp4
|
135
|
-
- features/sample-app/public/04-Death_Becomes_Fur.oga
|
136
136
|
- features/sample-app/public/jquery-1.3.2.js
|
137
137
|
- features/sample-app/public/jquery.html
|
138
138
|
- features/sample-app/public/movie.mp4
|
@@ -182,6 +182,8 @@ files:
|
|
182
182
|
- features/support/hooks.rb
|
183
183
|
- features/support/page.rb
|
184
184
|
- features/support/persistent_browser.rb
|
185
|
+
- features/support/targets/firefox14_osx.rb
|
186
|
+
- features/support/targets/firefox14_windows7.rb
|
185
187
|
- features/support/url_helper.rb
|
186
188
|
- features/table.feature
|
187
189
|
- features/table_cell.feature
|
@@ -228,6 +230,7 @@ files:
|
|
228
230
|
- lib/druid/javascript/prototype.rb
|
229
231
|
- lib/druid/javascript/yui.rb
|
230
232
|
- lib/druid/javascript_framework_facade.rb
|
233
|
+
- lib/druid/locator_generator.rb
|
231
234
|
- lib/druid/nested_elements.rb
|
232
235
|
- lib/druid/page_factory.rb
|
233
236
|
- lib/druid/page_populator.rb
|
@@ -306,6 +309,8 @@ test_files:
|
|
306
309
|
- features/generic_elements.feature
|
307
310
|
- features/heading.feature
|
308
311
|
- features/hidden_field.feature
|
312
|
+
- features/html/04-Death_Becomes_Fur.mp4
|
313
|
+
- features/html/04-Death_Becomes_Fur.oga
|
309
314
|
- features/html/async.html
|
310
315
|
- features/html/frame_1.html
|
311
316
|
- features/html/frame_2.html
|
@@ -340,8 +345,6 @@ test_files:
|
|
340
345
|
- features/page_level_actions.feature
|
341
346
|
- features/paragraph.feature
|
342
347
|
- features/radio_button.feature
|
343
|
-
- features/sample-app/public/04-Death_Becomes_Fur.mp4
|
344
|
-
- features/sample-app/public/04-Death_Becomes_Fur.oga
|
345
348
|
- features/sample-app/public/jquery-1.3.2.js
|
346
349
|
- features/sample-app/public/jquery.html
|
347
350
|
- features/sample-app/public/movie.mp4
|
@@ -391,6 +394,8 @@ test_files:
|
|
391
394
|
- features/support/hooks.rb
|
392
395
|
- features/support/page.rb
|
393
396
|
- features/support/persistent_browser.rb
|
397
|
+
- features/support/targets/firefox14_osx.rb
|
398
|
+
- features/support/targets/firefox14_windows7.rb
|
394
399
|
- features/support/url_helper.rb
|
395
400
|
- features/table.feature
|
396
401
|
- features/table_cell.feature
|