calabash-android 0.5.1 → 0.5.2.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/bin/calabash-android-console.rb +24 -9
- data/bin/calabash-android-run.rb +4 -1
- data/bin/calabash-android-setup.rb +1 -1
- data/lib/calabash-android/deprecated_actions.map +8 -0
- data/lib/calabash-android/env.rb +30 -2
- data/lib/calabash-android/environment_helpers.rb +12 -0
- data/lib/calabash-android/gestures.rb +308 -0
- data/lib/calabash-android/helpers.rb +55 -6
- data/lib/calabash-android/java_keystore.rb +2 -1
- data/lib/calabash-android/lib/TestServer.apk +0 -0
- data/lib/calabash-android/operations.rb +901 -707
- data/lib/calabash-android/removed_actions.txt +4 -0
- data/lib/calabash-android/steps/date_picker_steps.rb +4 -4
- data/lib/calabash-android/steps/time_picker_steps.rb +3 -3
- data/lib/calabash-android/touch_helpers.rb +114 -18
- data/lib/calabash-android/version.rb +1 -1
- data/test-server/calabash-js/src/calabash.js +42 -1
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/HttpServer.java +67 -2
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/MultiTouchGesture.java +749 -0
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/softkey/PressKey.java +85 -0
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/text/HideSoftKeyboard.java +24 -2
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/text/PressUserActionButton.java +128 -0
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/webview/QueryHelper.java +8 -1
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/query/InvocationOperation.java +56 -9
- metadata +10 -8
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/time/SetDateByContentDescription.java +0 -33
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/time/SetDateByIndex.java +0 -24
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/time/SetTimeByContentDescription.java +0 -34
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/actions/time/SetTimeByIndex.java +0 -26
@@ -1,33 +0,0 @@
|
|
1
|
-
package sh.calaba.instrumentationbackend.actions.time;
|
2
|
-
|
3
|
-
|
4
|
-
import sh.calaba.instrumentationbackend.InstrumentationBackend;
|
5
|
-
import sh.calaba.instrumentationbackend.Result;
|
6
|
-
import sh.calaba.instrumentationbackend.TestHelpers;
|
7
|
-
import sh.calaba.instrumentationbackend.actions.Action;
|
8
|
-
import android.view.View;
|
9
|
-
import android.widget.DatePicker;
|
10
|
-
|
11
|
-
|
12
|
-
public class SetDateByContentDescription implements Action {
|
13
|
-
|
14
|
-
@Override
|
15
|
-
public Result execute(String... args) {
|
16
|
-
String contentDescription = args[0];
|
17
|
-
View view = TestHelpers.getViewByDescription(contentDescription);
|
18
|
-
int[] date = TestHelpers.parseDate(args[1]);
|
19
|
-
|
20
|
-
if(view != null && view instanceof DatePicker) {
|
21
|
-
InstrumentationBackend.solo.setDatePicker((DatePicker)view, date[2], date[1], date[0]);
|
22
|
-
} else {
|
23
|
-
return new Result(false, "Failed to find TimePicker with content description:'" + contentDescription + "'");
|
24
|
-
}
|
25
|
-
return Result.successResult();
|
26
|
-
}
|
27
|
-
|
28
|
-
@Override
|
29
|
-
public String key() {
|
30
|
-
return "set_date_with_description";
|
31
|
-
}
|
32
|
-
|
33
|
-
}
|
@@ -1,24 +0,0 @@
|
|
1
|
-
package sh.calaba.instrumentationbackend.actions.time;
|
2
|
-
|
3
|
-
|
4
|
-
import sh.calaba.instrumentationbackend.InstrumentationBackend;
|
5
|
-
import sh.calaba.instrumentationbackend.Result;
|
6
|
-
import sh.calaba.instrumentationbackend.TestHelpers;
|
7
|
-
import sh.calaba.instrumentationbackend.actions.Action;
|
8
|
-
|
9
|
-
|
10
|
-
public class SetDateByIndex implements Action {
|
11
|
-
|
12
|
-
@Override
|
13
|
-
public Result execute(String... args) {
|
14
|
-
int[] date = TestHelpers.parseDate(args[0]);
|
15
|
-
InstrumentationBackend.solo.setDatePicker(Integer.parseInt(args[1]) - 1, date[2], date[1], date[0]);
|
16
|
-
return Result.successResult();
|
17
|
-
}
|
18
|
-
|
19
|
-
@Override
|
20
|
-
public String key() {
|
21
|
-
return "set_date_with_index";
|
22
|
-
}
|
23
|
-
|
24
|
-
}
|
@@ -1,34 +0,0 @@
|
|
1
|
-
package sh.calaba.instrumentationbackend.actions.time;
|
2
|
-
|
3
|
-
|
4
|
-
import sh.calaba.instrumentationbackend.InstrumentationBackend;
|
5
|
-
import sh.calaba.instrumentationbackend.Result;
|
6
|
-
import sh.calaba.instrumentationbackend.TestHelpers;
|
7
|
-
import sh.calaba.instrumentationbackend.actions.Action;
|
8
|
-
import android.view.View;
|
9
|
-
import android.widget.TimePicker;
|
10
|
-
|
11
|
-
|
12
|
-
public class SetTimeByContentDescription implements Action {
|
13
|
-
|
14
|
-
@Override
|
15
|
-
public Result execute(String... args) {
|
16
|
-
int[] time = TestHelpers.parseTime(args[1]);
|
17
|
-
String contentDescription = args[0];
|
18
|
-
View view = TestHelpers.getViewByDescription(contentDescription);
|
19
|
-
|
20
|
-
if(view != null && view instanceof TimePicker) {
|
21
|
-
InstrumentationBackend.solo.setTimePicker((TimePicker)view, time[0], time[1]);
|
22
|
-
} else {
|
23
|
-
return new Result(false, "Failed to find TimePicker with content description:'" + contentDescription + "'");
|
24
|
-
}
|
25
|
-
|
26
|
-
return Result.successResult();
|
27
|
-
}
|
28
|
-
|
29
|
-
@Override
|
30
|
-
public String key() {
|
31
|
-
return "set_time_with_description";
|
32
|
-
}
|
33
|
-
|
34
|
-
}
|
@@ -1,26 +0,0 @@
|
|
1
|
-
package sh.calaba.instrumentationbackend.actions.time;
|
2
|
-
|
3
|
-
|
4
|
-
import sh.calaba.instrumentationbackend.InstrumentationBackend;
|
5
|
-
import sh.calaba.instrumentationbackend.Result;
|
6
|
-
import sh.calaba.instrumentationbackend.TestHelpers;
|
7
|
-
import sh.calaba.instrumentationbackend.actions.Action;
|
8
|
-
|
9
|
-
|
10
|
-
public class SetTimeByIndex implements Action {
|
11
|
-
|
12
|
-
@Override
|
13
|
-
public Result execute(String... args) {
|
14
|
-
int[] time = TestHelpers.parseTime(args[0]);
|
15
|
-
|
16
|
-
InstrumentationBackend.solo.setTimePicker(Integer.parseInt(args[1]) - 1, time[0], time[1]);
|
17
|
-
|
18
|
-
return Result.successResult();
|
19
|
-
}
|
20
|
-
|
21
|
-
@Override
|
22
|
-
public String key() {
|
23
|
-
return "set_time_with_index";
|
24
|
-
}
|
25
|
-
|
26
|
-
}
|