rufus 0.1 → 0.3
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 +15 -0
- data/Gemfile.lock +1 -1
- data/LICENSE.txt +21 -0
- data/README.md +63 -78
- data/RufusApp/RufusApp/RUViewController.h +4 -1
- data/RufusApp/RufusApp/RUViewController.m +21 -0
- data/RufusApp/RufusApp/RufusPageViewController.xib +52 -372
- data/RufusApp/RufusApp/en.lproj/RUViewController.xib +75 -525
- data/features/alert.feature +16 -0
- data/features/step_definitions/alert_steps.rb.rb +4 -0
- data/features/step_definitions/view_steps.rb +6 -0
- data/features/support/hooks.rb +3 -0
- data/features/support/screens/home_page.rb +3 -0
- data/features/view.feature +2 -6
- data/lib/rufus/accessors/accessors.rb +4 -0
- data/lib/rufus/accessors/view.rb +4 -0
- data/lib/rufus/driver.rb +74 -18
- data/lib/rufus/drivers/iOS_device.rb +23 -0
- data/lib/rufus/drivers/iOS_simulator.rb +25 -0
- data/rufus.gemspec +3 -2
- data/spec/{driver_spec.rb → drivers_specs/driver_spec.rb} +138 -11
- data/spec/drivers_specs/iOS_device_spec.rb +18 -0
- data/spec/drivers_specs/iOS_simulator_spec.rb +17 -0
- data/spec/view_spec.rb +8 -0
- metadata +16 -13
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'rufus/drivers/iOS_device'
|
3
|
+
require 'selenium-webdriver'
|
4
|
+
|
5
|
+
|
6
|
+
describe Rufus::Drivers::IOS_Device do
|
7
|
+
|
8
|
+
let(:config){ {"browser" =>"iOS", "platform"=>"Mac", "version"=>"6.1", "app"=>"/Users/app/path/rufus.app", "use_physical" => "true"}}
|
9
|
+
let(:capabilities){{"browserName" =>"iOS", "platform"=>"Mac", "version"=>"6.1", "app"=>"/Users/app/path/rufus.app"}}
|
10
|
+
let(:url){'http://127.0.0.1:4723/wd/hub'}
|
11
|
+
|
12
|
+
context 'initializing driver for iOS device' do
|
13
|
+
it 'can create a selenium driver for an iOS device' do
|
14
|
+
Selenium::WebDriver.should_receive(:for).with(:remote, :desired_capabilities => capabilities, :url => 'http://127.0.0.1:4723/wd/hub')
|
15
|
+
Rufus::Drivers::IOS_Device.for config, url
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'rufus/drivers/iOS_Simulator'
|
3
|
+
require 'selenium-webdriver'
|
4
|
+
|
5
|
+
describe Rufus::Drivers::IOS_Simulator do
|
6
|
+
|
7
|
+
let(:config){ {"browser" =>"iOS", "platform"=>"Mac", "version"=>"6.1", "app"=>"/Users/app/path/rufus.app", "use_physical" => "true", "sim_app_path" => "/path/to/simulator.app"}}
|
8
|
+
let(:capabilities){{"browserName" =>"iOS", "platform"=>"Mac", "version"=>"6.1", "app"=>"/path/to/simulator.app", "device" => "iPhoneSimulator"}}
|
9
|
+
let(:url){'http://127.0.0.1:4723/wd/hub'}
|
10
|
+
|
11
|
+
context 'initializing driver for iOS device' do
|
12
|
+
it 'can create a selenium driver for an iOS device' do
|
13
|
+
Selenium::WebDriver.should_receive(:for).with(:remote, :desired_capabilities => capabilities, :url => 'http://127.0.0.1:4723/wd/hub')
|
14
|
+
Rufus::Drivers::IOS_Simulator.for config, url
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/spec/view_spec.rb
CHANGED
@@ -78,6 +78,14 @@ describe Rufus::Accessors::View do
|
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
81
|
+
context 'getting the class of a view' do
|
82
|
+
it 'can get the UIAutomation class respresntation of view' do
|
83
|
+
element.should_receive(:tag_name).and_return('UIStaticText')
|
84
|
+
selenium.should_receive(:find).with({:label =>'testView'}).and_return(element)
|
85
|
+
view.class.should eql('UIStaticText')
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
81
89
|
end
|
82
90
|
|
83
91
|
context 'finding element by text' do
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rufus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
5
|
-
prerelease:
|
4
|
+
version: '0.3'
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jeremy Stewart
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-10-02 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: page_navigation
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ! '>='
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ! '>='
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rspec
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ! '>='
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ! '>='
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -54,6 +49,7 @@ files:
|
|
54
49
|
- .gitmodules
|
55
50
|
- Gemfile
|
56
51
|
- Gemfile.lock
|
52
|
+
- LICENSE.txt
|
57
53
|
- README.md
|
58
54
|
- RufusApp/Frank/features/my_first.feature
|
59
55
|
- RufusApp/Frank/features/step_definitions/launch_steps.rb
|
@@ -306,11 +302,14 @@ files:
|
|
306
302
|
- RufusApp/RufusAppTests/RufusAppTests.h
|
307
303
|
- RufusApp/RufusAppTests/RufusAppTests.m
|
308
304
|
- RufusApp/RufusAppTests/en.lproj/InfoPlist.strings
|
305
|
+
- features/alert.feature
|
309
306
|
- features/driver.feature
|
307
|
+
- features/step_definitions/alert_steps.rb.rb
|
310
308
|
- features/step_definitions/driver_steps.rb
|
311
309
|
- features/step_definitions/view_steps.rb
|
312
310
|
- features/support/core_ext/string.rb
|
313
311
|
- features/support/env.rb
|
312
|
+
- features/support/hooks.rb
|
314
313
|
- features/support/screens/home_page.rb
|
315
314
|
- features/support/screens/rufus_page.rb
|
316
315
|
- features/view.feature
|
@@ -318,35 +317,39 @@ files:
|
|
318
317
|
- lib/rufus/accessors/accessors.rb
|
319
318
|
- lib/rufus/accessors/view.rb
|
320
319
|
- lib/rufus/driver.rb
|
320
|
+
- lib/rufus/drivers/iOS_device.rb
|
321
|
+
- lib/rufus/drivers/iOS_simulator.rb
|
321
322
|
- lib/rufus/navigation.rb
|
322
323
|
- rufus.gemspec
|
323
324
|
- spec/accessors_spec.rb
|
324
|
-
- spec/driver_spec.rb
|
325
|
+
- spec/drivers_specs/driver_spec.rb
|
326
|
+
- spec/drivers_specs/iOS_device_spec.rb
|
327
|
+
- spec/drivers_specs/iOS_simulator_spec.rb
|
325
328
|
- spec/spec_helper.rb
|
326
329
|
- spec/view_spec.rb
|
327
330
|
homepage: https://github.com/jlstewart379/rufus
|
328
|
-
licenses:
|
331
|
+
licenses:
|
332
|
+
- MIT
|
333
|
+
metadata: {}
|
329
334
|
post_install_message:
|
330
335
|
rdoc_options: []
|
331
336
|
require_paths:
|
332
337
|
- lib
|
333
338
|
required_ruby_version: !ruby/object:Gem::Requirement
|
334
|
-
none: false
|
335
339
|
requirements:
|
336
340
|
- - ! '>='
|
337
341
|
- !ruby/object:Gem::Version
|
338
342
|
version: '0'
|
339
343
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
340
|
-
none: false
|
341
344
|
requirements:
|
342
345
|
- - ! '>='
|
343
346
|
- !ruby/object:Gem::Version
|
344
347
|
version: '0'
|
345
348
|
requirements: []
|
346
349
|
rubyforge_project:
|
347
|
-
rubygems_version: 1.
|
350
|
+
rubygems_version: 2.1.5
|
348
351
|
signing_key:
|
349
|
-
specification_version:
|
352
|
+
specification_version: 4
|
350
353
|
summary: Page object wrapper for Appium
|
351
354
|
test_files: []
|
352
355
|
has_rdoc:
|