honeydew 0.1.4 → 0.10.0
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.
- data/README.md +4 -1
- data/Rakefile +2 -2
- data/example/Gemfile +3 -3
- data/honeydew.gemspec +7 -6
- data/lib/honeydew.rb +2 -2
- data/lib/honeydew/device.rb +3 -12
- data/lib/honeydew/device_actions.rb +61 -62
- data/lib/honeydew/device_commands.rb +3 -3
- data/lib/honeydew/device_matchers.rb +36 -14
- data/lib/honeydew/version.rb +1 -1
- data/{android-server → server}/.gitignore +0 -0
- data/{android-server → server}/pom.xml +5 -5
- data/{android-server → server}/repo/com/google/android/uiautomator/4.1.1.4/_maven.repositories +0 -0
- data/{android-server → server}/repo/com/google/android/uiautomator/4.1.1.4/uiautomator-4.1.1.4.jar +0 -0
- data/{android-server → server}/repo/com/google/android/uiautomator/4.1.1.4/uiautomator-4.1.1.4.pom +0 -0
- data/{android-server → server}/repo/com/jayway/maven/plugins/android/generation2/android-maven-plugin/3.5.2-SNAPSHOT/android-maven-plugin-3.5.2-SNAPSHOT.jar +0 -0
- data/{android-server → server}/repo/com/jayway/maven/plugins/android/generation2/android-maven-plugin/3.5.2-SNAPSHOT/android-maven-plugin-3.5.2-SNAPSHOT.pom +0 -0
- data/{android-server → server}/repo/com/jayway/maven/plugins/android/generation2/android-maven-plugin/3.5.2-SNAPSHOT/maven-metadata-local.xml +0 -0
- data/{android-server → server}/repo/commons-jxpath/commons-jxpath/1.4-SNAPSHOT/_maven.repositories +0 -0
- data/{android-server → server}/repo/commons-jxpath/commons-jxpath/1.4-SNAPSHOT/commons-jxpath-1.4-SNAPSHOT.jar +0 -0
- data/{android-server → server}/repo/commons-jxpath/commons-jxpath/1.4-SNAPSHOT/commons-jxpath-1.4-SNAPSHOT.pom +0 -0
- data/{android-server → server}/repo/commons-jxpath/commons-jxpath/1.4-SNAPSHOT/maven-metadata-local.xml +0 -0
- data/{android-server → server}/repo/commons-jxpath/commons-jxpath/maven-metadata-local.xml +0 -0
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/Action.java +1 -1
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/ActionsExecutor.java +2 -2
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/Command.java +1 -1
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/Result.java +1 -1
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/TestRunner.java +3 -3
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/actions/Click.java +3 -3
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/actions/ClickAndWaitForNewWindow.java +3 -3
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/actions/DumpWindowHierarchy.java +3 -3
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/actions/HasSettingsMenuItem.java +4 -4
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/actions/InspectOptionInSettingsMenu.java +2 -2
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/actions/IsButtonPresent.java +3 -3
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/actions/IsChildCountEqualTo.java +3 -3
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/actions/IsElementWithNestedTextPresent.java +3 -3
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/actions/IsOptionInSettingsMenuDisabled.java +1 -1
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/actions/IsOptionInSettingsMenuEnabled.java +1 -1
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/actions/IsTextPresent.java +3 -3
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/actions/LaunchApp.java +3 -3
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/actions/LaunchHome.java +3 -3
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/actions/LongClick.java +3 -3
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/actions/PressBack.java +3 -3
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/actions/PressEnter.java +4 -4
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/actions/SelectFromAppsList.java +3 -3
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/actions/SelectMenuInSettings.java +3 -3
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/actions/SetText.java +3 -3
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/actions/SetTextByIndex.java +2 -2
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/actions/SetTextByLabel.java +3 -3
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/actions/Unlock.java +3 -3
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/actions/WakeUp.java +4 -4
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/httpd/NanoHTTPD.java +2 -2
- data/{android-server/src/main/java/com/uiautomator_cucumber/android_server → server/src/main/java/com/amplify/honeydew}/httpd/RemoteCommandReceiver.java +5 -5
- data/spec/honeydew/device_matchers_spec.rb +21 -42
- data/spec/honeydew/device_spec.rb +37 -35
- metadata +57 -68
- data/lib/honeydew/hooks.rb +0 -0
- data/lib/honeydew/step_definitions.rb +0 -75
- data/lib/tasks/honeydew.rake +0 -7
data/README.md
CHANGED
data/Rakefile
CHANGED
|
@@ -11,7 +11,7 @@ task :build_android_server do
|
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def android_server_path
|
|
14
|
-
File.absolute_path(File.join(File.dirname(__FILE__), '
|
|
14
|
+
File.absolute_path(File.join(File.dirname(__FILE__), 'server'))
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
task :build => [:spec, :build_android_server]
|
|
17
|
+
task :build => [:spec, :build_android_server]
|
data/example/Gemfile
CHANGED
data/honeydew.gemspec
CHANGED
|
@@ -6,11 +6,13 @@ require 'honeydew/version'
|
|
|
6
6
|
Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = "honeydew"
|
|
8
8
|
spec.version = Honeydew::VERSION
|
|
9
|
-
spec.authors = ["
|
|
10
|
-
spec.email = ["scmp-team@amplify.com"]
|
|
11
|
-
spec.
|
|
12
|
-
spec.
|
|
13
|
-
|
|
9
|
+
spec.authors = ["Selvakumar Natesan", "Christopher Rex", "Shyam Vala", "John Barker"]
|
|
10
|
+
spec.email = ["scmp-team@amplify.com", "jbarker@amplify.com"]
|
|
11
|
+
spec.summary = %q{Ruby DSL for controlling Android devices}
|
|
12
|
+
spec.description = <<-EOF
|
|
13
|
+
Honeydew is a Ruby driver for UIAutomator which enables automated testing of
|
|
14
|
+
Android devices.
|
|
15
|
+
EOF
|
|
14
16
|
|
|
15
17
|
spec.files = `git ls-files`.split($/) + Dir['android-server/target/*.jar']
|
|
16
18
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
@@ -21,7 +23,6 @@ Gem::Specification.new do |spec|
|
|
|
21
23
|
spec.add_development_dependency "rake"
|
|
22
24
|
spec.add_development_dependency "rspec"
|
|
23
25
|
|
|
24
|
-
spec.add_dependency("cucumber")
|
|
25
26
|
spec.add_dependency("json")
|
|
26
27
|
spec.add_dependency("rest-client")
|
|
27
28
|
spec.add_dependency("activesupport")
|
data/lib/honeydew.rb
CHANGED
data/lib/honeydew/device.rb
CHANGED
|
@@ -18,24 +18,15 @@ module Honeydew
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def contains_textview_text?(text, timeout = Honeydew.config.timeout)
|
|
21
|
-
|
|
22
|
-
response['success']
|
|
23
|
-
rescue
|
|
24
|
-
false
|
|
21
|
+
has_textview_text? text, timeout
|
|
25
22
|
end
|
|
26
23
|
|
|
27
24
|
def contains_element_with_description?(description, timeout = Honeydew.config.timeout)
|
|
28
|
-
|
|
29
|
-
response['success']
|
|
30
|
-
rescue
|
|
31
|
-
false
|
|
25
|
+
has_element_with_description? description, timeout
|
|
32
26
|
end
|
|
33
27
|
|
|
34
28
|
def contains_button?(text, timeout = Honeydew.config.timeout)
|
|
35
|
-
|
|
36
|
-
response['success']
|
|
37
|
-
rescue
|
|
38
|
-
false
|
|
29
|
+
has_button? text, timeout
|
|
39
30
|
end
|
|
40
31
|
|
|
41
32
|
def is_app_installed?(package_name)
|
|
@@ -4,147 +4,146 @@ module Honeydew
|
|
|
4
4
|
module DeviceActions
|
|
5
5
|
include Honeydew::DeviceCommands
|
|
6
6
|
|
|
7
|
-
def click_button
|
|
8
|
-
perform_action :
|
|
7
|
+
def click_button button_text
|
|
8
|
+
perform_action :click, :text => button_text, :type => 'Button'
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
def click_button_and_wait
|
|
12
|
-
perform_action :
|
|
11
|
+
def click_button_and_wait button_text
|
|
12
|
+
perform_action :click_and_wait_for_new_window, :text => button_text, :type => 'Button'
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
def click_text
|
|
16
|
-
perform_action :
|
|
15
|
+
def click_text text
|
|
16
|
+
perform_action :click, :text => text, :type => 'TextView'
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
def click_text_and_wait
|
|
20
|
-
perform_action :
|
|
19
|
+
def click_text_and_wait text
|
|
20
|
+
perform_action :click_and_wait_for_new_window, :text => text, :type => 'TextView'
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
def click_element
|
|
24
|
-
perform_action :
|
|
23
|
+
def click_element element_description
|
|
24
|
+
perform_action :click, :description => element_description
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
-
def click_element_and_wait
|
|
28
|
-
perform_action :
|
|
27
|
+
def click_element_and_wait element_description
|
|
28
|
+
perform_action :click_and_wait_for_new_window, :description => element_description
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
def fill_in field_description, options = {with: ''}
|
|
32
|
-
perform_action :
|
|
32
|
+
perform_action :set_text, :description => field_description, :text => options[:with]
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
def fill_in_by_label field_label, options = {with: ''}
|
|
36
|
-
perform_action :
|
|
36
|
+
perform_action :set_text_by_label, :label => field_label, :text => options[:with]
|
|
37
37
|
end
|
|
38
38
|
|
|
39
39
|
def fill_in_by_index index, options = {with: ''}
|
|
40
|
-
perform_action :
|
|
40
|
+
perform_action :set_text_by_index, :index => index, :text => options[:with]
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
def launch_home
|
|
44
|
-
perform_action :
|
|
44
|
+
perform_action :launch_home
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
-
def launch_settings_app
|
|
48
|
-
perform_action :
|
|
47
|
+
def launch_settings_app app_name
|
|
48
|
+
perform_action :select_from_apps_list, :appName => app_name
|
|
49
49
|
end
|
|
50
50
|
|
|
51
|
-
def launch_application
|
|
52
|
-
perform_action :
|
|
51
|
+
def launch_application application_name
|
|
52
|
+
perform_action :launch_app, :appName => application_name, :attempts => 3
|
|
53
53
|
end
|
|
54
54
|
|
|
55
|
-
def long_click_element
|
|
56
|
-
perform_action :
|
|
55
|
+
def long_click_element element_description
|
|
56
|
+
perform_action :long_click, :description => element_description
|
|
57
57
|
end
|
|
58
58
|
|
|
59
|
-
def launch_settings_item
|
|
60
|
-
perform_action :
|
|
59
|
+
def launch_settings_item item_name
|
|
60
|
+
perform_action :select_menu_in_settings, :menuName => item_name
|
|
61
61
|
end
|
|
62
62
|
|
|
63
|
-
|
|
64
63
|
def press_back
|
|
65
|
-
perform_action :
|
|
64
|
+
perform_action :press_back
|
|
66
65
|
end
|
|
67
66
|
|
|
68
67
|
def press_enter
|
|
69
|
-
perform_action :
|
|
68
|
+
perform_action :press_enter
|
|
70
69
|
end
|
|
71
70
|
|
|
72
71
|
def unlock
|
|
73
|
-
perform_action :
|
|
72
|
+
perform_action :unlock
|
|
74
73
|
end
|
|
75
74
|
|
|
76
75
|
def wake_up
|
|
77
|
-
perform_action :
|
|
76
|
+
perform_action :wake_up
|
|
78
77
|
end
|
|
79
78
|
|
|
80
|
-
def
|
|
81
|
-
|
|
79
|
+
def perform_assertion action, arguments = {}, options = {}
|
|
80
|
+
response = perform_action action, arguments, options
|
|
81
|
+
response['success']
|
|
82
|
+
rescue
|
|
83
|
+
end
|
|
82
84
|
|
|
83
|
-
|
|
84
|
-
timeout = options[:
|
|
85
|
+
def perform_action action, arguments = {}, options = {}
|
|
86
|
+
timeout = options[:timeout]
|
|
85
87
|
attempts = options[:attempts]
|
|
86
88
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
end
|
|
95
|
-
log_action(command, response)
|
|
96
|
-
raise "Device: #{serial} :Action #{options} failed." unless response['success']
|
|
97
|
-
response
|
|
89
|
+
if timeout
|
|
90
|
+
retry_until_timeout timeout, action, arguments
|
|
91
|
+
elsif attempts
|
|
92
|
+
retry_until_success attempts, action, arguments
|
|
93
|
+
else
|
|
94
|
+
execute_command action, arguments
|
|
95
|
+
end
|
|
98
96
|
end
|
|
99
97
|
|
|
100
98
|
private
|
|
101
99
|
|
|
102
|
-
def retry_until_success
|
|
100
|
+
def retry_until_success attempts, action, arguments
|
|
103
101
|
completed = false
|
|
104
102
|
response = nil
|
|
105
103
|
tries = 0
|
|
106
|
-
until completed ||
|
|
107
|
-
response = execute_command
|
|
104
|
+
until completed || tries >= attempts do
|
|
105
|
+
response = execute_command action, arguments
|
|
108
106
|
completed = response['success']
|
|
109
107
|
return response if completed
|
|
110
108
|
tries += 1
|
|
111
109
|
sleep 1
|
|
112
110
|
end
|
|
113
|
-
|
|
114
|
-
raise "Device: #{serial} : All #{attempts} attempts failed while performing #{command[:action]}, with arguments: #{command[:arguments]}"
|
|
111
|
+
raise "Device: #{serial} : All #{attempts} attempts failed while performing #{action}, with arguments: #{arguments}"
|
|
115
112
|
end
|
|
116
113
|
|
|
117
|
-
def retry_until_timeout
|
|
114
|
+
def retry_until_timeout timeout, action, arguments
|
|
118
115
|
completed = false
|
|
119
116
|
response = nil
|
|
120
117
|
Timeout.timeout(timeout.to_i) do
|
|
121
118
|
until completed do
|
|
122
119
|
sleep 1
|
|
123
|
-
response = execute_command
|
|
120
|
+
response = execute_command action, arguments
|
|
124
121
|
completed = response['success']
|
|
125
122
|
end
|
|
126
123
|
end
|
|
127
124
|
return response
|
|
128
125
|
rescue Timeout::Error
|
|
129
|
-
|
|
130
|
-
raise "Device: #{serial} :Timeout while performing #{command[:action]}, with arguments: #{command[:arguments]}"
|
|
126
|
+
raise "Device: #{serial} :Timeout while performing #{action}, with arguments: #{arguments}"
|
|
131
127
|
end
|
|
132
128
|
|
|
133
|
-
def execute_command
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
129
|
+
def execute_command action, arguments
|
|
130
|
+
ensure_tablet_ready
|
|
131
|
+
|
|
132
|
+
log "Device: #{serial} : executing command #{action} with arguments #{arguments}"
|
|
133
|
+
|
|
134
|
+
command = stringify_keys(command: {action: action, arguments: arguments})
|
|
135
|
+
response = RestClient.get device_endpoint, :params => command
|
|
137
136
|
|
|
138
|
-
def log_action(command, response)
|
|
139
|
-
log "Device: #{serial} : executing command: #{command}"
|
|
140
137
|
log "Device: #{serial} : responded with: #{response}"
|
|
138
|
+
|
|
139
|
+
JSON.parse response
|
|
141
140
|
end
|
|
142
141
|
|
|
143
|
-
def stringify_keys
|
|
144
|
-
JSON.parse
|
|
142
|
+
def stringify_keys arguments
|
|
143
|
+
JSON.parse arguments.to_json
|
|
145
144
|
end
|
|
146
145
|
|
|
147
|
-
def log
|
|
146
|
+
def log message
|
|
148
147
|
puts message
|
|
149
148
|
end
|
|
150
149
|
end
|
|
@@ -6,7 +6,7 @@ module Honeydew
|
|
|
6
6
|
end
|
|
7
7
|
|
|
8
8
|
def dump_window_hierarchy(local_path)
|
|
9
|
-
path_in_device = perform_action(
|
|
9
|
+
path_in_device = perform_action('dump_window_hierarchy')['description']
|
|
10
10
|
adb "pull #{path_in_device} #{local_path}"
|
|
11
11
|
end
|
|
12
12
|
|
|
@@ -41,7 +41,7 @@ module Honeydew
|
|
|
41
41
|
def start_automation_server
|
|
42
42
|
Thread.new do
|
|
43
43
|
adb "push #{automation_server_jar_path} /data/local/tmp"
|
|
44
|
-
adb "shell uiautomator runtest #{automation_test_jar_name} -c com.
|
|
44
|
+
adb "shell uiautomator runtest #{automation_test_jar_name} -c com.amplify.honeydew_server.TestRunner"
|
|
45
45
|
log "Device: #{serial} initiated the start of automation server"
|
|
46
46
|
end
|
|
47
47
|
at_exit do
|
|
@@ -81,4 +81,4 @@ module Honeydew
|
|
|
81
81
|
end
|
|
82
82
|
|
|
83
83
|
end
|
|
84
|
-
end
|
|
84
|
+
end
|
|
@@ -1,36 +1,54 @@
|
|
|
1
1
|
module Honeydew
|
|
2
2
|
module DeviceMatchers
|
|
3
|
-
|
|
4
3
|
def has_text?(text, timeout = Honeydew.config.timeout)
|
|
5
|
-
|
|
4
|
+
perform_assertion :is_text_present,
|
|
5
|
+
{:text => text},
|
|
6
|
+
:timeout => timeout
|
|
6
7
|
end
|
|
7
8
|
|
|
8
9
|
def has_element_with_description?(description, timeout = Honeydew.config.timeout)
|
|
9
|
-
|
|
10
|
+
perform_assertion :is_text_present,
|
|
11
|
+
{:description => description},
|
|
12
|
+
:timeout => timeout
|
|
10
13
|
end
|
|
11
14
|
|
|
12
15
|
def has_edit_text?(text, timeout = Honeydew.config.timeout)
|
|
13
|
-
|
|
16
|
+
perform_assertion :is_text_present,
|
|
17
|
+
{:text => text, :type => 'EditText'},
|
|
18
|
+
:timeout => timeout
|
|
14
19
|
end
|
|
15
20
|
|
|
16
21
|
def has_textview_text?(text, timeout = Honeydew.config.timeout)
|
|
17
|
-
|
|
22
|
+
perform_assertion :is_text_present,
|
|
23
|
+
{:text => text, :type => 'TextView'},
|
|
24
|
+
:timeout => timeout
|
|
18
25
|
end
|
|
19
26
|
|
|
20
|
-
def has_textview_with_text_and_description?(text, description, timeout=Honeydew.config.timeout)
|
|
21
|
-
|
|
27
|
+
def has_textview_with_text_and_description?(text, description, timeout = Honeydew.config.timeout)
|
|
28
|
+
perform_assertion :is_text_present,
|
|
29
|
+
{:text => text, :description => description, :type => 'TextView'},
|
|
30
|
+
:timeout => timeout
|
|
22
31
|
end
|
|
23
32
|
|
|
24
33
|
def has_button?(button_text, timeout = Honeydew.config.timeout)
|
|
25
|
-
|
|
34
|
+
perform_assertion :is_button_present,
|
|
35
|
+
{:text => button_text},
|
|
36
|
+
:timeout => timeout
|
|
26
37
|
end
|
|
27
38
|
|
|
28
39
|
def has_child_count?(parent_element_description, child_element_description, child_count, timeout = Honeydew.config.timeout)
|
|
29
|
-
|
|
40
|
+
perform_assertion :is_child_count_equal_to,
|
|
41
|
+
{:parent_description => parent_element_description,
|
|
42
|
+
:child_description => child_element_description,
|
|
43
|
+
:child_count => child_count},
|
|
44
|
+
:timeout => timeout
|
|
30
45
|
end
|
|
31
46
|
|
|
32
47
|
def has_element_with_nested_text?(parent_description, child_text, timeout = Honeydew.config.timeout)
|
|
33
|
-
|
|
48
|
+
perform_assertion :is_element_with_nested_text_present,
|
|
49
|
+
{:parent_description => parent_description,
|
|
50
|
+
:child_text => child_text},
|
|
51
|
+
:timeout => timeout
|
|
34
52
|
end
|
|
35
53
|
|
|
36
54
|
def has_app_installed?(package_name)
|
|
@@ -38,15 +56,19 @@ module Honeydew
|
|
|
38
56
|
end
|
|
39
57
|
|
|
40
58
|
def is_option_in_setting_enabled?(item_name, option_names)
|
|
41
|
-
|
|
59
|
+
perform_assertion :is_option_in_settings_menu_enabled,
|
|
60
|
+
:menuName => item_name, :optionNames => option_names
|
|
42
61
|
end
|
|
43
62
|
|
|
44
63
|
def is_option_in_setting_disabled?(item_name, option_names)
|
|
45
|
-
|
|
64
|
+
perform_assertion :is_option_in_settings_menu_disabled,
|
|
65
|
+
:menuName => item_name, :optionNames => option_names
|
|
46
66
|
end
|
|
47
67
|
|
|
48
68
|
def has_settings_menu_item?(item_name, timeout = 10)
|
|
49
|
-
|
|
69
|
+
perform_assertion :has_settings_menu_item,
|
|
70
|
+
{:menuName => item_name},
|
|
71
|
+
:timeout => timeout
|
|
50
72
|
end
|
|
51
73
|
end
|
|
52
|
-
end
|
|
74
|
+
end
|
data/lib/honeydew/version.rb
CHANGED
|
File without changes
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
4
4
|
<modelVersion>4.0.0</modelVersion>
|
|
5
5
|
|
|
6
|
-
<groupId>
|
|
7
|
-
<artifactId>
|
|
8
|
-
<version>0.0
|
|
6
|
+
<groupId>amplify</groupId>
|
|
7
|
+
<artifactId>honeydew-server</artifactId>
|
|
8
|
+
<version>0.10.0</version>
|
|
9
9
|
<packaging>jar</packaging>
|
|
10
|
-
<name>
|
|
10
|
+
<name>Honeydew Android Server</name>
|
|
11
11
|
|
|
12
12
|
<properties>
|
|
13
13
|
<platform.version>4.1.1.4</platform.version>
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
<skip>false</skip>
|
|
106
106
|
<testClassOrMethods>
|
|
107
107
|
<testClassOrMethod>
|
|
108
|
-
com.
|
|
108
|
+
com.amplify.honeydew.TestRunner
|
|
109
109
|
</testClassOrMethod>
|
|
110
110
|
</testClassOrMethods>
|
|
111
111
|
<createReport>true</createReport>
|