honeydew 0.1.4 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- 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/{android-server → server}/repo/com/google/android/uiautomator/4.1.1.4/_maven.repositories
RENAMED
File without changes
|
data/{android-server → server}/repo/com/google/android/uiautomator/4.1.1.4/uiautomator-4.1.1.4.jar
RENAMED
File without changes
|
data/{android-server → server}/repo/com/google/android/uiautomator/4.1.1.4/uiautomator-4.1.1.4.pom
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/{android-server → server}/repo/commons-jxpath/commons-jxpath/1.4-SNAPSHOT/_maven.repositories
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,8 +1,8 @@
|
|
1
|
-
package com.
|
1
|
+
package com.amplify.honeydew;
|
2
2
|
|
3
3
|
import android.util.Log;
|
4
4
|
import com.android.uiautomator.core.UiDevice;
|
5
|
-
import com.
|
5
|
+
import com.amplify.honeydew.actions.*;
|
6
6
|
|
7
7
|
import java.lang.reflect.Constructor;
|
8
8
|
import java.lang.reflect.InvocationTargetException;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
package com.
|
1
|
+
package com.amplify.honeydew;
|
2
2
|
|
3
3
|
import android.view.KeyEvent;
|
4
4
|
import com.android.uiautomator.core.UiDevice;
|
5
5
|
import com.android.uiautomator.testrunner.UiAutomatorTestCase;
|
6
|
-
import com.
|
6
|
+
import com.amplify.honeydew.httpd.RemoteCommandReceiver;
|
7
7
|
|
8
8
|
public class TestRunner extends UiAutomatorTestCase {
|
9
9
|
|
@@ -23,4 +23,4 @@ public class TestRunner extends UiAutomatorTestCase {
|
|
23
23
|
getUiDevice().pressKeyCode(KeyEvent.KEYCODE_MENU);
|
24
24
|
getUiDevice().pressKeyCode(KeyEvent.KEYCODE_MENU);
|
25
25
|
}
|
26
|
-
}
|
26
|
+
}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
package com.
|
1
|
+
package com.amplify.honeydew.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.UiDevice;
|
4
4
|
import com.android.uiautomator.core.UiObjectNotFoundException;
|
5
|
-
import com.
|
6
|
-
import com.
|
5
|
+
import com.amplify.honeydew.Action;
|
6
|
+
import com.amplify.honeydew.Result;
|
7
7
|
|
8
8
|
import java.util.Map;
|
9
9
|
|
@@ -1,9 +1,9 @@
|
|
1
|
-
package com.
|
1
|
+
package com.amplify.honeydew.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.UiDevice;
|
4
4
|
import com.android.uiautomator.core.UiObjectNotFoundException;
|
5
|
-
import com.
|
6
|
-
import com.
|
5
|
+
import com.amplify.honeydew.Action;
|
6
|
+
import com.amplify.honeydew.Result;
|
7
7
|
|
8
8
|
import java.util.Map;
|
9
9
|
|
@@ -1,9 +1,9 @@
|
|
1
|
-
package com.
|
1
|
+
package com.amplify.honeydew.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.UiDevice;
|
4
4
|
import com.android.uiautomator.core.UiObjectNotFoundException;
|
5
|
-
import com.
|
6
|
-
import com.
|
5
|
+
import com.amplify.honeydew.Action;
|
6
|
+
import com.amplify.honeydew.Result;
|
7
7
|
import org.apache.commons.io.FileUtils;
|
8
8
|
|
9
9
|
import java.io.File;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
package com.
|
1
|
+
package com.amplify.honeydew.actions;
|
2
2
|
|
3
3
|
import android.widget.TextView;
|
4
4
|
import com.android.uiautomator.core.*;
|
5
|
-
import com.
|
6
|
-
import com.
|
5
|
+
import com.amplify.honeydew.Action;
|
6
|
+
import com.amplify.honeydew.Result;
|
7
7
|
|
8
8
|
import java.util.List;
|
9
9
|
import java.util.Map;
|
@@ -20,4 +20,4 @@ public class HasSettingsMenuItem extends Action {
|
|
20
20
|
UiObject menuItem = settingsMenu.getChildByText(new UiSelector().className(TextView.class.getName()), menuName);
|
21
21
|
return menuItem.exists() ? Result.OK : Result.FAILURE;
|
22
22
|
}
|
23
|
-
}
|
23
|
+
}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
package com.
|
1
|
+
package com.amplify.honeydew.actions;
|
2
2
|
|
3
3
|
import android.widget.TextView;
|
4
4
|
import com.android.uiautomator.core.*;
|
5
|
-
import com.
|
5
|
+
import com.amplify.honeydew.Result;
|
6
6
|
|
7
7
|
import java.util.List;
|
8
8
|
import java.util.Map;
|
@@ -1,11 +1,11 @@
|
|
1
|
-
package com.
|
1
|
+
package com.amplify.honeydew.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.UiDevice;
|
4
4
|
import com.android.uiautomator.core.UiObject;
|
5
5
|
import com.android.uiautomator.core.UiObjectNotFoundException;
|
6
6
|
import com.android.uiautomator.core.UiSelector;
|
7
|
-
import com.
|
8
|
-
import com.
|
7
|
+
import com.amplify.honeydew.Action;
|
8
|
+
import com.amplify.honeydew.Result;
|
9
9
|
|
10
10
|
import java.util.Map;
|
11
11
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
package com.
|
1
|
+
package com.amplify.honeydew.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.*;
|
4
|
-
import com.
|
5
|
-
import com.
|
4
|
+
import com.amplify.honeydew.Action;
|
5
|
+
import com.amplify.honeydew.Result;
|
6
6
|
|
7
7
|
import java.util.Map;
|
8
8
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
package com.
|
1
|
+
package com.amplify.honeydew.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.*;
|
4
|
-
import com.
|
5
|
-
import com.
|
4
|
+
import com.amplify.honeydew.Action;
|
5
|
+
import com.amplify.honeydew.Result;
|
6
6
|
|
7
7
|
import java.util.Map;
|
8
8
|
|
@@ -1,9 +1,9 @@
|
|
1
|
-
package com.
|
1
|
+
package com.amplify.honeydew.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.UiDevice;
|
4
4
|
import com.android.uiautomator.core.UiObjectNotFoundException;
|
5
|
-
import com.
|
6
|
-
import com.
|
5
|
+
import com.amplify.honeydew.Action;
|
6
|
+
import com.amplify.honeydew.Result;
|
7
7
|
|
8
8
|
import java.util.Map;
|
9
9
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
package com.
|
1
|
+
package com.amplify.honeydew.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.*;
|
4
|
-
import com.
|
5
|
-
import com.
|
4
|
+
import com.amplify.honeydew.Action;
|
5
|
+
import com.amplify.honeydew.Result;
|
6
6
|
|
7
7
|
import java.util.Map;
|
8
8
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
package com.
|
1
|
+
package com.amplify.honeydew.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.*;
|
4
|
-
import com.
|
5
|
-
import com.
|
4
|
+
import com.amplify.honeydew.Action;
|
5
|
+
import com.amplify.honeydew.Result;
|
6
6
|
|
7
7
|
import java.util.Map;
|
8
8
|
|
@@ -1,9 +1,9 @@
|
|
1
|
-
package com.
|
1
|
+
package com.amplify.honeydew.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.UiDevice;
|
4
4
|
import com.android.uiautomator.core.UiObjectNotFoundException;
|
5
|
-
import com.
|
6
|
-
import com.
|
5
|
+
import com.amplify.honeydew.Action;
|
6
|
+
import com.amplify.honeydew.Result;
|
7
7
|
|
8
8
|
import java.util.Map;
|
9
9
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
package com.
|
1
|
+
package com.amplify.honeydew.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.*;
|
4
|
-
import com.
|
5
|
-
import com.
|
4
|
+
import com.amplify.honeydew.Action;
|
5
|
+
import com.amplify.honeydew.Result;
|
6
6
|
|
7
7
|
import java.util.Map;
|
8
8
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
package com.
|
1
|
+
package com.amplify.honeydew.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.*;
|
4
|
-
import com.
|
5
|
-
import com.
|
4
|
+
import com.amplify.honeydew.Action;
|
5
|
+
import com.amplify.honeydew.Result;
|
6
6
|
|
7
7
|
import java.util.Map;
|
8
8
|
|
@@ -16,4 +16,4 @@ public class PressEnter extends Action {
|
|
16
16
|
getUiDevice().pressEnter();
|
17
17
|
return Result.OK;
|
18
18
|
}
|
19
|
-
}
|
19
|
+
}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
package com.
|
1
|
+
package com.amplify.honeydew.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.*;
|
4
|
-
import com.
|
5
|
-
import com.
|
4
|
+
import com.amplify.honeydew.Action;
|
5
|
+
import com.amplify.honeydew.Result;
|
6
6
|
|
7
7
|
import java.util.Map;
|
8
8
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
package com.
|
1
|
+
package com.amplify.honeydew.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.*;
|
4
|
-
import com.
|
5
|
-
import com.
|
4
|
+
import com.amplify.honeydew.Action;
|
5
|
+
import com.amplify.honeydew.Result;
|
6
6
|
|
7
7
|
import java.util.Map;
|
8
8
|
|
@@ -1,11 +1,11 @@
|
|
1
|
-
package com.
|
1
|
+
package com.amplify.honeydew.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.UiDevice;
|
4
4
|
import com.android.uiautomator.core.UiObject;
|
5
5
|
import com.android.uiautomator.core.UiObjectNotFoundException;
|
6
6
|
import com.android.uiautomator.core.UiSelector;
|
7
|
-
import com.
|
8
|
-
import com.
|
7
|
+
import com.amplify.honeydew.Action;
|
8
|
+
import com.amplify.honeydew.Result;
|
9
9
|
|
10
10
|
import java.util.Map;
|
11
11
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
package com.
|
1
|
+
package com.amplify.honeydew.actions;
|
2
2
|
|
3
3
|
import android.util.*;
|
4
4
|
import com.android.uiautomator.core.*;
|
5
|
-
import com.
|
5
|
+
import com.amplify.honeydew.*;
|
6
6
|
|
7
7
|
import java.util.*;
|
8
8
|
|
@@ -1,11 +1,11 @@
|
|
1
|
-
package com.
|
1
|
+
package com.amplify.honeydew.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.UiDevice;
|
4
4
|
import com.android.uiautomator.core.UiObject;
|
5
5
|
import com.android.uiautomator.core.UiObjectNotFoundException;
|
6
6
|
import com.android.uiautomator.core.UiSelector;
|
7
|
-
import com.
|
8
|
-
import com.
|
7
|
+
import com.amplify.honeydew.Action;
|
8
|
+
import com.amplify.honeydew.Result;
|
9
9
|
|
10
10
|
import java.util.Map;
|
11
11
|
|
@@ -1,11 +1,11 @@
|
|
1
|
-
package com.
|
1
|
+
package com.amplify.honeydew.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.UiDevice;
|
4
4
|
import com.android.uiautomator.core.UiObject;
|
5
5
|
import com.android.uiautomator.core.UiObjectNotFoundException;
|
6
6
|
import com.android.uiautomator.core.UiSelector;
|
7
|
-
import com.
|
8
|
-
import com.
|
7
|
+
import com.amplify.honeydew.Action;
|
8
|
+
import com.amplify.honeydew.Result;
|
9
9
|
|
10
10
|
import java.util.Map;
|
11
11
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
package com.
|
1
|
+
package com.amplify.honeydew.actions;
|
2
2
|
|
3
3
|
import com.android.uiautomator.core.*;
|
4
|
-
import com.
|
5
|
-
import com.
|
4
|
+
import com.amplify.honeydew.Action;
|
5
|
+
import com.amplify.honeydew.Result;
|
6
6
|
import android.os.RemoteException;
|
7
7
|
|
8
8
|
import java.util.Map;
|
@@ -21,4 +21,4 @@ public class WakeUp extends Action {
|
|
21
21
|
}
|
22
22
|
return Result.OK;
|
23
23
|
}
|
24
|
-
}
|
24
|
+
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
package com.
|
1
|
+
package com.amplify.honeydew.httpd;
|
2
2
|
|
3
3
|
import java.io.*;
|
4
4
|
import java.net.ServerSocket;
|
@@ -1097,4 +1097,4 @@ public class NanoHTTPD
|
|
1097
1097
|
"THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n"+
|
1098
1098
|
"(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n"+
|
1099
1099
|
"OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
|
1100
|
-
}
|
1100
|
+
}
|
@@ -1,10 +1,10 @@
|
|
1
|
-
package com.
|
1
|
+
package com.amplify.honeydew.httpd;
|
2
2
|
|
3
3
|
import android.util.Log;
|
4
4
|
import com.google.gson.Gson;
|
5
|
-
import com.
|
6
|
-
import com.
|
7
|
-
import com.
|
5
|
+
import com.amplify.honeydew.ActionsExecutor;
|
6
|
+
import com.amplify.honeydew.Command;
|
7
|
+
import com.amplify.honeydew.Result;
|
8
8
|
|
9
9
|
import java.io.File;
|
10
10
|
import java.io.IOException;
|
@@ -61,4 +61,4 @@ public class RemoteCommandReceiver extends NanoHTTPD {
|
|
61
61
|
private void log(String uri, String method, Properties params) {
|
62
62
|
Log.d(TAG, String.format("Processing uri: %s, method: %s, params: %s", uri, method, params));
|
63
63
|
}
|
64
|
-
}
|
64
|
+
}
|
@@ -1,58 +1,37 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Honeydew::DeviceMatchers do
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
let(:device) do
|
5
|
+
Class.new do
|
6
|
+
include Honeydew::DeviceMatchers
|
7
|
+
def perform_assertion; end
|
8
|
+
end.new
|
8
9
|
end
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
describe "#has_textview_text" do
|
13
|
-
let (:text) { "some text" }
|
14
|
-
|
15
|
-
it "should perform action for is_text_present" do
|
16
|
-
device.should_receive(:perform_action).with(hash_including({action: "is_text_present"}))
|
17
|
-
|
18
|
-
device.has_textview_text? text
|
19
|
-
end
|
20
|
-
|
21
|
-
it "should retry for a default timeout" do
|
22
|
-
device.should_receive(:perform_action).with(hash_including({retry_until: Honeydew.config.timeout}))
|
23
|
-
|
24
|
-
device.has_textview_text? text
|
25
|
-
end
|
11
|
+
describe '#has_textview_text' do
|
12
|
+
let(:text) { 'some text' }
|
26
13
|
|
27
|
-
it
|
28
|
-
device.should_receive(:
|
14
|
+
it 'should perform action for is_text_present' do
|
15
|
+
device.should_receive(:perform_assertion)
|
16
|
+
.with(:is_text_present,
|
17
|
+
hash_including(text: text, type: 'TextView'),
|
18
|
+
timeout: Honeydew.config.timeout)
|
29
19
|
|
30
20
|
device.has_textview_text? text
|
31
21
|
end
|
32
|
-
|
33
22
|
end
|
34
23
|
|
35
|
-
describe
|
36
|
-
let
|
37
|
-
let
|
38
|
-
|
39
|
-
it "should perform action for is_text_present" do
|
40
|
-
device.should_receive(:perform_action).with(hash_including({action: "is_text_present"}))
|
41
|
-
|
42
|
-
device.has_textview_with_text_and_description? text, description
|
43
|
-
end
|
44
|
-
|
45
|
-
it "should retry for a default timeout" do
|
46
|
-
device.should_receive(:perform_action).with(hash_including({retry_until: Honeydew.config.timeout}))
|
24
|
+
describe '#has_textview_with_text_and_description' do
|
25
|
+
let(:text) { 'some text' }
|
26
|
+
let(:description) { 'some description' }
|
47
27
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
28
|
+
it 'performs the is_text_present action' do
|
29
|
+
device.should_receive(:perform_assertion)
|
30
|
+
.with(:is_text_present,
|
31
|
+
hash_including(text: text, type: 'TextView'),
|
32
|
+
timeout: Honeydew.config.timeout)
|
53
33
|
|
54
34
|
device.has_textview_with_text_and_description? text, description
|
55
35
|
end
|
56
|
-
|
57
36
|
end
|
58
|
-
end
|
37
|
+
end
|