add tests

This commit is contained in:
Geoffrey Goh
2015-12-18 00:08:11 -08:00
parent 61f83fde0d
commit bc52e8f0c5
58 changed files with 58127 additions and 1074 deletions

View File

@@ -17,9 +17,6 @@ android {
}
}
buildTypes {
debug {
buildConfigField "String", "RUN_TEST", "\"\""
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

View File

@@ -29,29 +29,10 @@ public class MainActivity extends FragmentActivity implements DefaultHardwareBac
ReactInstanceManager.Builder builder = ReactInstanceManager.builder()
.setApplication(getApplication())
.setJSBundleFile(codePush.getBundleUrl("index.android.bundle"));
.setJSBundleFile(codePush.getBundleUrl("index.android.bundle"))
.setJSMainModuleName("index.android");
String mainComponentName = null;
switch (BuildConfig.RUN_TEST) {
case "DOWNLOAD_PROGRESS":
builder = builder.setJSMainModuleName(TEST_FOLDER_PREFIX + "DownloadProgressTests/DownloadProgressTestApp");
mainComponentName = "DownloadProgressTestApp";
break;
case "INSTALL_UPDATE":
builder = builder.setJSMainModuleName(TEST_FOLDER_PREFIX + "InstallUpdateTests/InstallUpdateTestApp");
mainComponentName = "InstallUpdateTestApp";
break;
case "QUERY_UPDATE":
builder = builder.setJSMainModuleName(TEST_FOLDER_PREFIX + "QueryUpdateTests/QueryUpdateTestApp");
mainComponentName = "QueryUpdateTestApp";
break;
default:
// Run the standard demo app.
builder = builder.setJSMainModuleName("index.android");
mainComponentName = "CodePushDemoApp";
break;
}
String mainComponentName = "CodePushDemoApp";
mReactInstanceManager = builder.addPackage(new MainReactPackage())
.addPackage(codePush.getReactPackage())