diff --git a/bin/test.sh b/bin/test.sh index a82c663310f..e1d111afb84 100755 --- a/bin/test.sh +++ b/bin/test.sh @@ -96,7 +96,7 @@ if $android_only || $all_tests; then echo "RUNNING ANDROID TESTS" echo "---------------------" android_testfile="./test/functional/_joined/android.js" - android_dirs="apidemos selendroid android gappium" + android_dirs="apidemos selendroid android toggletest gappium" join_testfiles android $android_testfile $android_dirs APPIUM_CORDOVA="android" time $appium_mocha $android_testfile fi diff --git a/grunt-helpers.js b/grunt-helpers.js index 336d356f13a..d96be1b26fc 100644 --- a/grunt-helpers.js +++ b/grunt-helpers.js @@ -340,7 +340,7 @@ module.exports.setupAndroidBootstrap = function(grunt, cb) { module.exports.setupAndroidApp = function(grunt, appName, cb) { var appPath = path.resolve(__dirname, "sample-code", "apps", appName); - var args = ["update", "project", "--subprojects", "-t", "android-18", "-p", "."]; + var args = ["update", "project", "--subprojects", "-t", "android-18", "-p", ".", "-n", appName]; setupAndroidProj(grunt, appPath, args, cb); }; diff --git a/reset.sh b/reset.sh index 7ec5adb8f99..c182584a00a 100755 --- a/reset.sh +++ b/reset.sh @@ -19,6 +19,7 @@ appium_home=$(pwd) reset_successful=false has_reset_unlock_apk=false apidemos_reset=false +toggletest_reset=false hardcore=false grunt="$(npm bin)/grunt" # might not have grunt-cli installed with -g verbose=false @@ -251,6 +252,14 @@ reset_apidemos() { apidemos_reset=true } +reset_toggle_test() { + echo "* Configuring and cleaning/building Android test app: ToggleTest" + run_cmd $grunt configAndroidApp:ToggleTest + run_cmd $grunt buildAndroidApp:ToggleTest + uninstall_android_app com.example.toggletest + toggletest_reset=true +} + reset_gps_demo() { if $hardcore ; then echo "* Removing previous copies of the gps demo" @@ -293,6 +302,7 @@ reset_android() { reset_unlock_apk if $include_dev ; then reset_apidemos + reset_toggle_test reset_gps_demo fi echo "* Setting Android config to Appium's version" @@ -320,6 +330,10 @@ reset_selendroid() { reset_apidemos uninstall_android_app com.example.android.apis.selendroid fi + if ! $toggletest_reset; then + reset_toggle_test + uninstall_android_app com.example.toggletest.selendroid + fi echo "* Linking selendroid test app: WebViewDemo" run_cmd rm -rf $appium_home/sample-code/apps/WebViewDemo run_cmd ln -s $appium_home/submodules/selendroid/selendroid-test-app $appium_home/sample-code/apps/WebViewDemo diff --git a/test/functional/testapp/toggle.js b/test/functional/toggletest/toggle.js similarity index 97% rename from test/functional/testapp/toggle.js rename to test/functional/toggletest/toggle.js index d1a79f351c8..37b7ef9d833 100644 --- a/test/functional/testapp/toggle.js +++ b/test/functional/toggletest/toggle.js @@ -3,7 +3,7 @@ var driverBlock = require("../../helpers/driverblock.js") , Q = driverBlock.Q , path = require('path') - , appPath = path.resolve(__dirname, "../../../sample-code/apps/ToggleTest/bin/ToggleTest.apk") + , appPath = path.resolve(__dirname, "../../../sample-code/apps/ToggleTest/bin/ToggleTest-debug.apk") , appPkg = "com.example.toggletest" , appAct = ".MainActivity" , it = driverBlock.it; diff --git a/test/functional/testapp/toggleAndroid.js b/test/functional/toggletest/toggleAndroid.js similarity index 100% rename from test/functional/testapp/toggleAndroid.js rename to test/functional/toggletest/toggleAndroid.js diff --git a/test/functional/testapp/toggleSelendroid.js b/test/functional/toggletest/toggleSelendroid.js similarity index 100% rename from test/functional/testapp/toggleSelendroid.js rename to test/functional/toggletest/toggleSelendroid.js