forked from jsnbuchanan/crowd-funder-for-time-pwa
fix: Update Android package name and improve test reliability
- Change package name from app.timesafari.app to app.timesafari - Fix ADB connection issues with server restart and retries - Add interactive test flow with user prompts between tests - Generate test data locally instead of external script - Add proper cleanup of readline interface - Fix URL scheme registration in Android manifest Technical changes: 1. Remove duplicate SDK suppression entries 2. Update Gradle and build configurations 3. Add retry logic for flaky ADB connections 4. Add proper error handling for test data generation 5. Update all package references consistently The changes improve Android testing by: 1. Making package naming consistent 2. Adding reliability to ADB connections 3. Adding user control over test flow 4. Providing better test progress visibility 5. Improving error handling and logging
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package com.getcapacitor.myapp;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import android.content.Context;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
|
||||
@Test
|
||||
public void useAppContext() throws Exception {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||
|
||||
assertEquals("app.timesafari", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user