druid-ts 1.1.6 → 1.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -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,:b_method]]
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.6
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