honeydew 0.27.4 → 0.28.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.java-version +1 -0
- data/lib/honeydew/device_matchers.rb +4 -0
- data/lib/honeydew/version.rb +1 -1
- data/server/src/main/java/com/amplify/honeydew_server/Action.java +10 -0
- data/server/src/main/java/com/amplify/honeydew_server/ActionsExecutor.java +1 -0
- data/server/src/main/java/com/amplify/honeydew_server/actions/IsRegexMatchPresent.java +20 -0
- data/server/target/honeydew-server-0.28.0.jar +0 -0
- metadata +5 -3
- data/server/target/honeydew-server-0.27.4.jar +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cac2f4b2164b66961030b667b958103850010f6
|
4
|
+
data.tar.gz: 7de69972e4ece0cf9eb8eacb2822df34ce76a8b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b0f99984887c6009dfa3dd23c99e2c2f64ce0d09c23becc0dc41f4162dbde5b01528b4717508076efdbad97484e9dcb66e811f060b8c1245247417fe80f9abf
|
7
|
+
data.tar.gz: e66f961e716c2daa375553173b30354a388739afc70249c6cb68dedb83164372ae9ca7bce8a00f3db217ab22486b8b5f2cd7bcc533389d355f7e8c7f07f6368e
|
data/.java-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
oracle64-1.6.0.65
|
@@ -9,6 +9,10 @@ module Honeydew
|
|
9
9
|
perform_assertion :is_text_present, :text => text
|
10
10
|
end
|
11
11
|
|
12
|
+
def has_regex_match?(regex)
|
13
|
+
perform_assertion :is_regex_match_present, :regex => regex
|
14
|
+
end
|
15
|
+
|
12
16
|
def has_element_with_description?(description)
|
13
17
|
perform_assertion :is_text_present, :description => description
|
14
18
|
end
|
data/lib/honeydew/version.rb
CHANGED
@@ -3,6 +3,7 @@ package com.amplify.honeydew_server;
|
|
3
3
|
import android.util.Log;
|
4
4
|
import com.android.uiautomator.core.*;
|
5
5
|
import com.google.common.base.CaseFormat;
|
6
|
+
import com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression;
|
6
7
|
|
7
8
|
import java.util.Map;
|
8
9
|
|
@@ -58,6 +59,10 @@ public abstract class Action {
|
|
58
59
|
Log.d(TAG, String.format("Description %s", (String) arguments.get("description")));
|
59
60
|
viewSelector.withDescription((String) arguments.get("description"));
|
60
61
|
}
|
62
|
+
if (arguments.containsKey("regex")) {
|
63
|
+
Log.d(TAG, String.format("Regular Expression %s", (String) arguments.get("regex")));
|
64
|
+
viewSelector.withRegexMatch((String) arguments.get("regex"));
|
65
|
+
}
|
61
66
|
return viewSelector;
|
62
67
|
}
|
63
68
|
|
@@ -79,6 +84,11 @@ public abstract class Action {
|
|
79
84
|
return this;
|
80
85
|
}
|
81
86
|
|
87
|
+
public ViewSelector withRegexMatch(String regexString) {
|
88
|
+
uiSelector = uiSelector.textMatches(regexString);
|
89
|
+
return this;
|
90
|
+
}
|
91
|
+
|
82
92
|
public UiObject find() {
|
83
93
|
return new UiObject(uiSelector);
|
84
94
|
}
|
@@ -66,6 +66,7 @@ public class ActionsExecutor {
|
|
66
66
|
actionClasses.add(Sleep.class);
|
67
67
|
actionClasses.add(IsTextPresent.class);
|
68
68
|
actionClasses.add(IsTextGone.class);
|
69
|
+
actionClasses.add(IsRegexMatchPresent.class);
|
69
70
|
actionClasses.add(IsButtonPresent.class);
|
70
71
|
actionClasses.add(IsElementWithNestedTextPresent.class);
|
71
72
|
actionClasses.add(IsChildCountEqualTo.class);
|
@@ -0,0 +1,20 @@
|
|
1
|
+
package com.amplify.honeydew_server.actions;
|
2
|
+
|
3
|
+
import com.amplify.honeydew_server.Action;
|
4
|
+
import com.amplify.honeydew_server.Result;
|
5
|
+
import com.android.uiautomator.core.UiDevice;
|
6
|
+
import com.android.uiautomator.core.UiObjectNotFoundException;
|
7
|
+
|
8
|
+
import java.util.Map;
|
9
|
+
|
10
|
+
public class IsRegexMatchPresent extends Action {
|
11
|
+
|
12
|
+
public IsRegexMatchPresent(UiDevice uiDevice){
|
13
|
+
super(uiDevice);
|
14
|
+
}
|
15
|
+
|
16
|
+
@Override
|
17
|
+
public Result execute(Map<String, Object> arguments) throws UiObjectNotFoundException {
|
18
|
+
return isUiObjectAvailable(getUiObject(arguments), arguments) ? Result.OK : Result.FAILURE;
|
19
|
+
}
|
20
|
+
}
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: honeydew
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.28.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Selvakumar Natesan
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-06-
|
14
|
+
date: 2014-06-22 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activesupport
|
@@ -108,6 +108,7 @@ extensions: []
|
|
108
108
|
extra_rdoc_files: []
|
109
109
|
files:
|
110
110
|
- .gitignore
|
111
|
+
- .java-version
|
111
112
|
- .rspec
|
112
113
|
- .ruby-gemset
|
113
114
|
- .ruby-version
|
@@ -171,6 +172,7 @@ files:
|
|
171
172
|
- server/src/main/java/com/amplify/honeydew_server/actions/IsElementWithNestedTextPresent.java
|
172
173
|
- server/src/main/java/com/amplify/honeydew_server/actions/IsOptionInSettingsMenuDisabled.java
|
173
174
|
- server/src/main/java/com/amplify/honeydew_server/actions/IsOptionInSettingsMenuEnabled.java
|
175
|
+
- server/src/main/java/com/amplify/honeydew_server/actions/IsRegexMatchPresent.java
|
174
176
|
- server/src/main/java/com/amplify/honeydew_server/actions/IsTextGone.java
|
175
177
|
- server/src/main/java/com/amplify/honeydew_server/actions/IsTextPresent.java
|
176
178
|
- server/src/main/java/com/amplify/honeydew_server/actions/LaunchApp.java
|
@@ -191,7 +193,7 @@ files:
|
|
191
193
|
- spec/honeydew/device_matchers_spec.rb
|
192
194
|
- spec/honeydew/device_spec.rb
|
193
195
|
- spec/spec_helper.rb
|
194
|
-
- server/target/honeydew-server-0.
|
196
|
+
- server/target/honeydew-server-0.28.0.jar
|
195
197
|
homepage:
|
196
198
|
licenses: []
|
197
199
|
metadata: {}
|
Binary file
|