test: name the designated per-app e2e test FullE2eTest
- Commit
74a853503fa23d68c558c7368405c6ad442a4634- Author
- Vayun Mathur <[email protected]>
- When
- 2026-11-19 04:42 UTC (17 days ago)
- Parents
5c8c076
Every app now has exactly one designated full e2e test: the launch test that starts from the runner-cleared clean state, grants permissions, and asserts the real first screen. Rename LaunchNoCrashTest to FullE2eTest in all 70 apps so the designated test is explicit; other emulator tests keep their names and remain unrestricted. Only file/class names and KDoc first lines change; assertions are untouched. Verified: the 23 new/strengthened modules run on the emulator (19 pass; astronomy, voxels, cast:tv blocked by arm64-native translation on the x86_64 AVD; emergency blocked by the emulator image built-in emergency app; communicate passes standalone).
Diff
appstore/src/androidTest/java/com/vayunmathur/appstore/ui/FullE2eTest.kt
diff --git a/appstore/src/androidTest/java/com/vayunmathur/appstore/ui/FullE2eTest.kt b/appstore/src/androidTest/java/com/vayunmathur/appstore/ui/FullE2eTest.ktindex f4490086c6..93055361e6 100644--- a/appstore/src/androidTest/java/com/vayunmathur/appstore/ui/FullE2eTest.kt+++ b/appstore/src/androidTest/java/com/vayunmathur/appstore/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the home tabs. * * Appstore hosts a five-tab pager rooted on Home; the Home tab label is always@@ -28,7 +28,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsHomeTabs() {
astronomy/src/androidTest/java/com/vayunmathur/astronomy/ui/FullE2eTest.kt
diff --git a/astronomy/src/androidTest/java/com/vayunmathur/astronomy/ui/FullE2eTest.kt b/astronomy/src/androidTest/java/com/vayunmathur/astronomy/ui/FullE2eTest.ktindex 2bacf945ce..9548c770ea 100644--- a/astronomy/src/androidTest/java/com/vayunmathur/astronomy/ui/FullE2eTest.kt+++ b/astronomy/src/androidTest/java/com/vayunmathur/astronomy/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the sky map. * * Astronomy gates on FINE + COARSE location through the shared AppPermissionsGate.@@ -36,7 +36,7 @@ import org.junit.runner.RunWith * works for Compose and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsSkyMap() {@@ -45,9 +45,9 @@ class LaunchNoCrashTest { val targetContext = instrumentation.targetContext val packageName = targetContext.packageName - // Clean state first (fresh-install journey); grants follow the clear- // because a clear can drop runtime-grant state on some releases.- clearAppData(instrumentation.uiAutomation, packageName)+ // Clean state is provided by the runner: ./test clears the app's+ // data before instrumenting (clearing from inside the test would+ // kill the instrumentation, which runs in the app process). grantAllRequestedPermissions(instrumentation.uiAutomation, targetContext.packageManager, packageName) @@ -96,16 +96,6 @@ class LaunchNoCrashTest { assertEquals(packageName, device.currentPackageName) } - private fun clearAppData(uiAutomation: UiAutomation, packageName: String) {- try {- uiAutomation.executeShellCommand("pm clear $packageName").close()- } catch (ignored: SecurityException) {- // Clear refused: the journey assertions below still report state.- } catch (ignored: IOException) {- // Shell pipe failed: the content assertions below report it.- }- }- private fun grantAllRequestedPermissions( uiAutomation: UiAutomation, packageManager: PackageManager,
auto/src/androidTest/java/com/vayunmathur/auto/ui/FullE2eTest.kt
diff --git a/auto/src/androidTest/java/com/vayunmathur/auto/ui/FullE2eTest.kt b/auto/src/androidTest/java/com/vayunmathur/auto/ui/FullE2eTest.ktindex f83aa13caf..aa70369916 100644--- a/auto/src/androidTest/java/com/vayunmathur/auto/ui/FullE2eTest.kt+++ b/auto/src/androidTest/java/com/vayunmathur/auto/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: clears the app's data, grants every requested permission, and+ * Full e2e test: starts from the runner-cleared clean state, grants every requested permission, and * asserts it lands on the phone-side connection status screen. * * Unlike the car display (driven through the Desktop Head Unit loop), the@@ -31,7 +31,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsConnectionStatus() {@@ -40,7 +40,9 @@ class LaunchNoCrashTest { val targetContext = instrumentation.targetContext val packageName = targetContext.packageName - clearAppData(instrumentation.uiAutomation, packageName)+ // Clean state is provided by the runner: ./test clears the app's+ // data before instrumenting (clearing from inside the test would+ // kill the instrumentation, which runs in the app process). grantAllRequestedPermissions(instrumentation.uiAutomation, targetContext.packageManager, packageName) @@ -68,16 +70,6 @@ class LaunchNoCrashTest { * Starts from clean app state: wipes the target package's data (which also * resets its grants, so this runs before the grant pass). */- private fun clearAppData(uiAutomation: UiAutomation, packageName: String) {- try {- uiAutomation.executeShellCommand("pm clear $packageName").close()- } catch (ignored: SecurityException) {- // Cannot clear headlessly: the content assertions below report stale state.- } catch (ignored: IOException) {- // Shell pipe failed: the content assertions below report it.- }- }- private fun grantAllRequestedPermissions( uiAutomation: UiAutomation, packageManager: PackageManager,
backup/src/androidTest/java/com/vayunmathur/backup/ui/FullE2eTest.kt
diff --git a/backup/src/androidTest/java/com/vayunmathur/backup/ui/FullE2eTest.kt b/backup/src/androidTest/java/com/vayunmathur/backup/ui/FullE2eTest.ktindex a23cd0ec9f..c5d607eeb1 100644--- a/backup/src/androidTest/java/com/vayunmathur/backup/ui/FullE2eTest.kt+++ b/backup/src/androidTest/java/com/vayunmathur/backup/ui/FullE2eTest.kt@@ -17,7 +17,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it lands on real content rather than sitting on a permission screen. * * Backup has no launcher intent by design: it is configured from Settings, which@@ -39,7 +39,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_showsOnboardingWithoutCrash() {@@ -48,9 +48,9 @@ class LaunchNoCrashTest { val targetContext = instrumentation.targetContext val packageName = targetContext.packageName - // Clean app state first: every run starts from the fresh-install- // first screen this test asserts, not whatever a previous run left.- clearAppData(instrumentation.uiAutomation, packageName)+ // Clean state is provided by the runner: ./test clears the app's+ // data before instrumenting (clearing from inside the test would+ // kill the instrumentation, which runs in the app process). grantAllRequestedPermissions(instrumentation.uiAutomation, targetContext.packageManager, packageName) @@ -75,17 +75,6 @@ class LaunchNoCrashTest { assertEquals(packageName, device.currentPackageName) } - private fun clearAppData(uiAutomation: UiAutomation, packageName: String) {- try {- uiAutomation.executeShellCommand("pm clear $packageName").close()- } catch (ignored: SecurityException) {- // Shell cannot clear the package: the content assertions below- // report whatever state the app actually starts in.- } catch (ignored: IOException) {- // Shell pipe failed: same reporting path as above.- }- }- private fun grantAllRequestedPermissions( uiAutomation: UiAutomation, packageManager: PackageManager,
calculator/src/androidTest/java/com/vayunmathur/calculator/ui/FullE2eTest.kt
diff --git a/calculator/src/androidTest/java/com/vayunmathur/calculator/ui/FullE2eTest.kt b/calculator/src/androidTest/java/com/vayunmathur/calculator/ui/FullE2eTest.ktindex 26cec92182..8a85a88793 100644--- a/calculator/src/androidTest/java/com/vayunmathur/calculator/ui/FullE2eTest.kt+++ b/calculator/src/androidTest/java/com/vayunmathur/calculator/ui/FullE2eTest.kt@@ -15,7 +15,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it lands on real content rather than sitting on a permission screen. * * Calculator declares only install-time permissions (INTERNET, VIBRATE), so the@@ -29,7 +29,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsMainContent() {
calendar/src/androidTest/java/com/vayunmathur/calendar/ui/FullE2eTest.kt
diff --git a/calendar/src/androidTest/java/com/vayunmathur/calendar/ui/FullE2eTest.kt b/calendar/src/androidTest/java/com/vayunmathur/calendar/ui/FullE2eTest.ktindex cf819bf5c9..11a0a11b4b 100644--- a/calendar/src/androidTest/java/com/vayunmathur/calendar/ui/FullE2eTest.kt+++ b/calendar/src/androidTest/java/com/vayunmathur/calendar/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test that launches the app, grants every requested permission, and+ * Full e2e test that launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the agenda view. * * Calendar gates on READ/WRITE_CALENDAR plus exact alarms and notifications through@@ -31,7 +31,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsAgenda() {
camera/src/androidTest/java/com/vayunmathur/camera/ui/FullE2eTest.kt
diff --git a/camera/src/androidTest/java/com/vayunmathur/camera/ui/FullE2eTest.kt b/camera/src/androidTest/java/com/vayunmathur/camera/ui/FullE2eTest.ktindex de45cc0e43..b3daac371d 100644--- a/camera/src/androidTest/java/com/vayunmathur/camera/ui/FullE2eTest.kt+++ b/camera/src/androidTest/java/com/vayunmathur/camera/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the viewfinder. * * Camera gates on CAMERA + RECORD_AUDIO through the shared AppPermissionsGate.@@ -29,7 +29,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsViewfinder() {
cast/src/androidTest/java/com/vayunmathur/cast/ui/FullE2eTest.kt
diff --git a/cast/src/androidTest/java/com/vayunmathur/cast/ui/FullE2eTest.kt b/cast/src/androidTest/java/com/vayunmathur/cast/ui/FullE2eTest.ktindex 0056a6e55d..5a8b9ba3cf 100644--- a/cast/src/androidTest/java/com/vayunmathur/cast/ui/FullE2eTest.kt+++ b/cast/src/androidTest/java/com/vayunmathur/cast/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the device list. * * Cast is a single-screen app rooted on the TV picker; the launcher entry is an@@ -30,7 +30,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsDeviceList() {
cast/tv/src/androidTest/java/com/vayunmathur/cast/tv/ui/FullE2eTest.kt
diff --git a/cast/tv/src/androidTest/java/com/vayunmathur/cast/tv/ui/FullE2eTest.kt b/cast/tv/src/androidTest/java/com/vayunmathur/cast/tv/ui/FullE2eTest.ktindex 7b71890b38..1a6f523866 100644--- a/cast/tv/src/androidTest/java/com/vayunmathur/cast/tv/ui/FullE2eTest.kt+++ b/cast/tv/src/androidTest/java/com/vayunmathur/cast/tv/ui/FullE2eTest.kt@@ -17,7 +17,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: clears the receiver's data, grants every requested+ * Full e2e test: starts from the runner-cleared clean state, grants every requested * permission, and asserts it reaches the ready-to-receive idle screen. * * The TV receiver only advertises a LEANBACK_LAUNCHER entry, which a phone@@ -34,7 +34,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsReadyToReceive() {@@ -43,7 +43,9 @@ class LaunchNoCrashTest { val targetContext = instrumentation.targetContext val packageName = targetContext.packageName - clearAppData(instrumentation.uiAutomation, packageName)+ // Clean state is provided by the runner: ./test clears the app's+ // data before instrumenting (clearing from inside the test would+ // kill the instrumentation, which runs in the app process). grantAllRequestedPermissions(instrumentation.uiAutomation, targetContext.packageManager, packageName) @@ -73,16 +75,6 @@ class LaunchNoCrashTest { * Starts from clean app state: wipes the target package's data (which also * resets its grants, so this runs before the grant pass). */- private fun clearAppData(uiAutomation: UiAutomation, packageName: String) {- try {- uiAutomation.executeShellCommand("pm clear $packageName").close()- } catch (ignored: SecurityException) {- // Cannot clear headlessly: the content assertions below report stale state.- } catch (ignored: IOException) {- // Shell pipe failed: the content assertions below report it.- }- }- private fun grantAllRequestedPermissions( uiAutomation: UiAutomation, packageManager: PackageManager,
clock/src/androidTest/java/com/vayunmathur/clock/ui/FullE2eTest.kt
diff --git a/clock/src/androidTest/java/com/vayunmathur/clock/ui/FullE2eTest.kt b/clock/src/androidTest/java/com/vayunmathur/clock/ui/FullE2eTest.ktindex 1079b38af4..6a0034b4df 100644--- a/clock/src/androidTest/java/com/vayunmathur/clock/ui/FullE2eTest.kt+++ b/clock/src/androidTest/java/com/vayunmathur/clock/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the alarms list. * * Clock gates on POST_NOTIFICATIONS (a `pm grant`-able runtime permission) plus@@ -29,7 +29,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsAlarms() {
code/src/androidTest/java/com/vayunmathur/code/ui/FullE2eTest.kt
diff --git a/code/src/androidTest/java/com/vayunmathur/code/ui/FullE2eTest.kt b/code/src/androidTest/java/com/vayunmathur/code/ui/FullE2eTest.ktindex 4ca5db998c..0656905394 100644--- a/code/src/androidTest/java/com/vayunmathur/code/ui/FullE2eTest.kt+++ b/code/src/androidTest/java/com/vayunmathur/code/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the editor. * * Code gates first launch on all-files special access (MANAGE_EXTERNAL_STORAGE)@@ -30,7 +30,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsEditor() {
communicate/src/androidTest/java/com/vayunmathur/communicate/ui/FullE2eTest.kt
diff --git a/communicate/src/androidTest/java/com/vayunmathur/communicate/ui/FullE2eTest.kt b/communicate/src/androidTest/java/com/vayunmathur/communicate/ui/FullE2eTest.ktindex 727642ec5d..c5968cbd9f 100644--- a/communicate/src/androidTest/java/com/vayunmathur/communicate/ui/FullE2eTest.kt+++ b/communicate/src/androidTest/java/com/vayunmathur/communicate/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the messages tab. * * Communicate gates SMS, call-log and contacts access through the shared@@ -35,7 +35,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsMessages() {@@ -44,9 +44,9 @@ class LaunchNoCrashTest { val targetContext = instrumentation.targetContext val packageName = targetContext.packageName - // Clean state first (fresh-install journey); grants follow the clear- // because a clear can drop runtime-grant state on some releases.- clearAppData(instrumentation.uiAutomation, packageName)+ // Clean state is provided by the runner: ./test clears the app's+ // data before instrumenting (clearing from inside the test would+ // kill the instrumentation, which runs in the app process). grantAllRequestedPermissions(instrumentation.uiAutomation, targetContext.packageManager, packageName) @@ -80,16 +80,6 @@ class LaunchNoCrashTest { assertEquals(packageName, device.currentPackageName) } - private fun clearAppData(uiAutomation: UiAutomation, packageName: String) {- try {- uiAutomation.executeShellCommand("pm clear $packageName").close()- } catch (ignored: SecurityException) {- // Clear refused: the journey assertions below still report state.- } catch (ignored: IOException) {- // Shell pipe failed: the content assertions below report it.- }- }- private fun grantAllRequestedPermissions( uiAutomation: UiAutomation, packageManager: PackageManager,
contacts/src/androidTest/java/com/vayunmathur/contacts/ui/ContactsSearchTest.kt
diff --git a/contacts/src/androidTest/java/com/vayunmathur/contacts/ui/ContactsSearchTest.kt b/contacts/src/androidTest/java/com/vayunmathur/contacts/ui/ContactsSearchTest.ktindex d02a1e7f42..62e02dddc1 100644--- a/contacts/src/androidTest/java/com/vayunmathur/contacts/ui/ContactsSearchTest.kt+++ b/contacts/src/androidTest/java/com/vayunmathur/contacts/ui/ContactsSearchTest.kt@@ -72,7 +72,7 @@ class ContactsSearchTest { val token = seeded!!.first val absent = seeded.second - // The search field is part of first paint (proven by LaunchNoCrashTest):+ // The search field is part of first paint (proven by FullE2eTest): // tap it directly. Do NOT tap the Search action icon — that toggles // search UI state and collapses the field we need. Note the field is // an EditText with EMPTY text: the "Search contacts" Compose hint
contacts/src/androidTest/java/com/vayunmathur/contacts/ui/FullE2eTest.kt
diff --git a/contacts/src/androidTest/java/com/vayunmathur/contacts/ui/FullE2eTest.kt b/contacts/src/androidTest/java/com/vayunmathur/contacts/ui/FullE2eTest.ktindex 28d3461286..1e30a1e1a3 100644--- a/contacts/src/androidTest/java/com/vayunmathur/contacts/ui/FullE2eTest.kt+++ b/contacts/src/androidTest/java/com/vayunmathur/contacts/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the contacts list. * * Contacts gates on READ/WRITE_CONTACTS + CALL_PHONE + READ_PHONE_STATE through@@ -30,7 +30,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsContactsList() {
education/src/androidTest/java/com/vayunmathur/education/ui/FullE2eTest.kt
diff --git a/education/src/androidTest/java/com/vayunmathur/education/ui/FullE2eTest.kt b/education/src/androidTest/java/com/vayunmathur/education/ui/FullE2eTest.ktindex 0552303ecc..f7dc819ac2 100644--- a/education/src/androidTest/java/com/vayunmathur/education/ui/FullE2eTest.kt+++ b/education/src/androidTest/java/com/vayunmathur/education/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the Learn catalog. * * Education loads its bundled content packs before the catalog paints, so the@@ -34,7 +34,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsLearnCatalog() {@@ -43,9 +43,9 @@ class LaunchNoCrashTest { val targetContext = instrumentation.targetContext val packageName = targetContext.packageName - // Clean state first (fresh-install journey); grants follow the clear- // because a clear can drop runtime-grant state on some releases.- clearAppData(instrumentation.uiAutomation, packageName)+ // Clean state is provided by the runner: ./test clears the app's+ // data before instrumenting (clearing from inside the test would+ // kill the instrumentation, which runs in the app process). grantAllRequestedPermissions(instrumentation.uiAutomation, targetContext.packageManager, packageName) @@ -92,16 +92,6 @@ class LaunchNoCrashTest { assertEquals(packageName, device.currentPackageName) } - private fun clearAppData(uiAutomation: UiAutomation, packageName: String) {- try {- uiAutomation.executeShellCommand("pm clear $packageName").close()- } catch (ignored: SecurityException) {- // Clear refused: the journey assertions below still report state.- } catch (ignored: IOException) {- // Shell pipe failed: the content assertions below report it.- }- }- private fun grantAllRequestedPermissions( uiAutomation: UiAutomation, packageManager: PackageManager,
email/src/androidTest/java/com/vayunmathur/email/ui/FullE2eTest.kt
diff --git a/email/src/androidTest/java/com/vayunmathur/email/ui/FullE2eTest.kt b/email/src/androidTest/java/com/vayunmathur/email/ui/FullE2eTest.ktindex 52fb1f6439..b4bea8a596 100644--- a/email/src/androidTest/java/com/vayunmathur/email/ui/FullE2eTest.kt+++ b/email/src/androidTest/java/com/vayunmathur/email/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto account setup. * * A fresh install has no accounts, so MainContent shows the Add Account screen@@ -29,7 +29,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsAccountSetup() {
emergency/src/androidTest/java/com/vayunmathur/emergency/ui/FullE2eTest.kt
diff --git a/emergency/src/androidTest/java/com/vayunmathur/emergency/ui/FullE2eTest.kt b/emergency/src/androidTest/java/com/vayunmathur/emergency/ui/FullE2eTest.ktindex a6417eb3a6..076491dcb9 100644--- a/emergency/src/androidTest/java/com/vayunmathur/emergency/ui/FullE2eTest.kt+++ b/emergency/src/androidTest/java/com/vayunmathur/emergency/ui/FullE2eTest.kt@@ -17,7 +17,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: clears the app's data, grants every requested permission, and+ * Full e2e test: starts from the runner-cleared clean state, grants every requested permission, and * asserts it lands on the emergency-info view card. * * Emergency has no launcher entry (it is reached from Settings > Safety &@@ -34,7 +34,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsEmergencyInfo() {@@ -43,7 +43,9 @@ class LaunchNoCrashTest { val targetContext = instrumentation.targetContext val packageName = targetContext.packageName - clearAppData(instrumentation.uiAutomation, packageName)+ // Clean state is provided by the runner: ./test clears the app's+ // data before instrumenting (clearing from inside the test would+ // kill the instrumentation, which runs in the app process). grantAllRequestedPermissions(instrumentation.uiAutomation, targetContext.packageManager, packageName) @@ -73,16 +75,6 @@ class LaunchNoCrashTest { * Starts from clean app state: wipes the target package's data (which also * resets its grants, so this runs before the grant pass). */- private fun clearAppData(uiAutomation: UiAutomation, packageName: String) {- try {- uiAutomation.executeShellCommand("pm clear $packageName").close()- } catch (ignored: SecurityException) {- // Cannot clear headlessly: the content assertions below report stale state.- } catch (ignored: IOException) {- // Shell pipe failed: the content assertions below report it.- }- }- private fun grantAllRequestedPermissions( uiAutomation: UiAutomation, packageManager: PackageManager,
euicc/src/androidTest/java/com/vayunmathur/euicc/ui/FullE2eTest.kt
diff --git a/euicc/src/androidTest/java/com/vayunmathur/euicc/ui/FullE2eTest.kt b/euicc/src/androidTest/java/com/vayunmathur/euicc/ui/FullE2eTest.ktindex fa1f4ff0d0..e5addf9a19 100644--- a/euicc/src/androidTest/java/com/vayunmathur/euicc/ui/FullE2eTest.kt+++ b/euicc/src/androidTest/java/com/vayunmathur/euicc/ui/FullE2eTest.kt@@ -17,7 +17,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it lands on real content rather than sitting on a permission screen. * * Euicc has no launcher intent by design: the platform opens it from Settings@@ -38,7 +38,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_showsAddSimWithoutCrash() {@@ -47,9 +47,9 @@ class LaunchNoCrashTest { val targetContext = instrumentation.targetContext val packageName = targetContext.packageName - // Clean app state first: every run starts from the fresh-install- // first screen this test asserts, not whatever a previous run left.- clearAppData(instrumentation.uiAutomation, packageName)+ // Clean state is provided by the runner: ./test clears the app's+ // data before instrumenting (clearing from inside the test would+ // kill the instrumentation, which runs in the app process). grantAllRequestedPermissions(instrumentation.uiAutomation, targetContext.packageManager, packageName) @@ -74,17 +74,6 @@ class LaunchNoCrashTest { assertEquals(packageName, device.currentPackageName) } - private fun clearAppData(uiAutomation: UiAutomation, packageName: String) {- try {- uiAutomation.executeShellCommand("pm clear $packageName").close()- } catch (ignored: SecurityException) {- // Shell cannot clear the package: the content assertions below- // report whatever state the app actually starts in.- } catch (ignored: IOException) {- // Shell pipe failed: same reporting path as above.- }- }- private fun grantAllRequestedPermissions( uiAutomation: UiAutomation, packageManager: PackageManager,
everysync/src/androidTest/java/com/vayunmathur/everysync/ui/FullE2eTest.kt
diff --git a/everysync/src/androidTest/java/com/vayunmathur/everysync/ui/FullE2eTest.kt b/everysync/src/androidTest/java/com/vayunmathur/everysync/ui/FullE2eTest.ktindex 22a57511e8..80841ed3db 100644--- a/everysync/src/androidTest/java/com/vayunmathur/everysync/ui/FullE2eTest.kt+++ b/everysync/src/androidTest/java/com/vayunmathur/everysync/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the accounts list. * * A fresh install has no accounts, so the marker asserts the accounts-list@@ -33,7 +33,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsAccountsList() {@@ -42,9 +42,9 @@ class LaunchNoCrashTest { val targetContext = instrumentation.targetContext val packageName = targetContext.packageName - // Clean state first (fresh-install journey); grants follow the clear- // because a clear can drop runtime-grant state on some releases.- clearAppData(instrumentation.uiAutomation, packageName)+ // Clean state is provided by the runner: ./test clears the app's+ // data before instrumenting (clearing from inside the test would+ // kill the instrumentation, which runs in the app process). grantAllRequestedPermissions(instrumentation.uiAutomation, targetContext.packageManager, packageName) @@ -90,16 +90,6 @@ class LaunchNoCrashTest { assertEquals(packageName, device.currentPackageName) } - private fun clearAppData(uiAutomation: UiAutomation, packageName: String) {- try {- uiAutomation.executeShellCommand("pm clear $packageName").close()- } catch (ignored: SecurityException) {- // Clear refused: the journey assertions below still report state.- } catch (ignored: IOException) {- // Shell pipe failed: the content assertions below report it.- }- }- private fun grantAllRequestedPermissions( uiAutomation: UiAutomation, packageManager: PackageManager,
files/src/androidTest/java/com/vayunmathur/files/ui/FullE2eTest.kt
diff --git a/files/src/androidTest/java/com/vayunmathur/files/ui/FullE2eTest.kt b/files/src/androidTest/java/com/vayunmathur/files/ui/FullE2eTest.ktindex fc9593b746..2b6e08189e 100644--- a/files/src/androidTest/java/com/vayunmathur/files/ui/FullE2eTest.kt+++ b/files/src/androidTest/java/com/vayunmathur/files/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it lands on real content rather than sitting on a permission screen. * * Files has no runtime-permission gate in MainActivity, so the grant pass only@@ -29,7 +29,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsDirectory() {
findfamily/src/androidTest/java/com/vayunmathur/findfamily/ui/FullE2eTest.kt
diff --git a/findfamily/src/androidTest/java/com/vayunmathur/findfamily/ui/FullE2eTest.kt b/findfamily/src/androidTest/java/com/vayunmathur/findfamily/ui/FullE2eTest.ktindex d1c7ff430e..4a2028c85f 100644--- a/findfamily/src/androidTest/java/com/vayunmathur/findfamily/ui/FullE2eTest.kt+++ b/findfamily/src/androidTest/java/com/vayunmathur/findfamily/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the family map. * * FindFamily gates on foreground + background location + BLUETOOTH_SCAN through@@ -31,7 +31,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsFamilyMap() {
flashcards/src/androidTest/java/com/vayunmathur/flashcards/ui/FullE2eTest.kt
diff --git a/flashcards/src/androidTest/java/com/vayunmathur/flashcards/ui/FullE2eTest.kt b/flashcards/src/androidTest/java/com/vayunmathur/flashcards/ui/FullE2eTest.ktindex ef0e10383e..5b324df4d9 100644--- a/flashcards/src/androidTest/java/com/vayunmathur/flashcards/ui/FullE2eTest.kt+++ b/flashcards/src/androidTest/java/com/vayunmathur/flashcards/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the decks tab. * * A fresh install has no decks, so the marker asserts the decks-tab empty@@ -28,7 +28,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsDecksTab() {
fooddelivery/src/androidTest/java/com/vayunmathur/fooddelivery/ui/FullE2eTest.kt
diff --git a/fooddelivery/src/androidTest/java/com/vayunmathur/fooddelivery/ui/FullE2eTest.kt b/fooddelivery/src/androidTest/java/com/vayunmathur/fooddelivery/ui/FullE2eTest.ktindex f7f93535cb..444ac77941 100644--- a/fooddelivery/src/androidTest/java/com/vayunmathur/fooddelivery/ui/FullE2eTest.kt+++ b/fooddelivery/src/androidTest/java/com/vayunmathur/fooddelivery/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the home tab. * * The five bottom-nav tabs paint without sign-in, so the marker asserts the@@ -28,7 +28,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsHomeTab() {
games/arrows/src/androidTest/java/com/vayunmathur/games/arrows/ui/FullE2eTest.kt
diff --git a/games/arrows/src/androidTest/java/com/vayunmathur/games/arrows/ui/FullE2eTest.kt b/games/arrows/src/androidTest/java/com/vayunmathur/games/arrows/ui/FullE2eTest.ktindex 42ad1283b1..64baf5b519 100644--- a/games/arrows/src/androidTest/java/com/vayunmathur/games/arrows/ui/FullE2eTest.kt+++ b/games/arrows/src/androidTest/java/com/vayunmathur/games/arrows/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the game board. * * Arrows boots straight into the board with the mode selector on top, so the@@ -28,7 +28,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsBoard() {
games/chess/src/androidTest/java/com/vayunmathur/games/chess/ui/FullE2eTest.kt
diff --git a/games/chess/src/androidTest/java/com/vayunmathur/games/chess/ui/FullE2eTest.kt b/games/chess/src/androidTest/java/com/vayunmathur/games/chess/ui/FullE2eTest.ktindex b9fa8080ea..b92667ed62 100644--- a/games/chess/src/androidTest/java/com/vayunmathur/games/chess/ui/FullE2eTest.kt+++ b/games/chess/src/androidTest/java/com/vayunmathur/games/chess/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the offline board. * * Chess boots into the offline game with the four bottom-bar tabs below it,@@ -29,7 +29,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsOfflineTab() {
games/hub/src/androidTest/java/com/vayunmathur/games/hub/ui/FullE2eTest.kt
diff --git a/games/hub/src/androidTest/java/com/vayunmathur/games/hub/ui/FullE2eTest.kt b/games/hub/src/androidTest/java/com/vayunmathur/games/hub/ui/FullE2eTest.ktindex 8f836353b0..21b67d27be 100644--- a/games/hub/src/androidTest/java/com/vayunmathur/games/hub/ui/FullE2eTest.kt+++ b/games/hub/src/androidTest/java/com/vayunmathur/games/hub/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the games list. * * GameHub boots into the Home/Games pager; an empty hub shows the stable@@ -28,7 +28,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsGamesTab() {
games/kart/src/androidTest/java/com/vayunmathur/games/kart/ui/FullE2eTest.kt
diff --git a/games/kart/src/androidTest/java/com/vayunmathur/games/kart/ui/FullE2eTest.kt b/games/kart/src/androidTest/java/com/vayunmathur/games/kart/ui/FullE2eTest.ktindex 77c422b5f2..d06d851e7b 100644--- a/games/kart/src/androidTest/java/com/vayunmathur/games/kart/ui/FullE2eTest.kt+++ b/games/kart/src/androidTest/java/com/vayunmathur/games/kart/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the garage. * * Kart boots into the garage lobby with the Start Race button on top, so the@@ -28,7 +28,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsGarage() {
games/logicgate/src/androidTest/java/com/vayunmathur/games/logicgate/ui/FullE2eTest.kt
diff --git a/games/logicgate/src/androidTest/java/com/vayunmathur/games/logicgate/ui/FullE2eTest.kt b/games/logicgate/src/androidTest/java/com/vayunmathur/games/logicgate/ui/FullE2eTest.ktindex a29c592f0e..61678d2a31 100644--- a/games/logicgate/src/androidTest/java/com/vayunmathur/games/logicgate/ui/FullE2eTest.kt+++ b/games/logicgate/src/androidTest/java/com/vayunmathur/games/logicgate/ui/FullE2eTest.kt@@ -16,14 +16,14 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and asserts it+ * Full e2e test: launches the app, grants every requested permission, and asserts it * reaches the level map, marked by its stable tagline. * * UiDevice polling, not compose-test: compose's Espresso idle-sync reflects on hidden * InputManager APIs that no longer exist on current releases. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsLevelMap() {
games/minesweeper/src/androidTest/java/com/vayunmathur/games/minesweeper/ui/FullE2eTest.kt
diff --git a/games/minesweeper/src/androidTest/java/com/vayunmathur/games/minesweeper/ui/FullE2eTest.kt b/games/minesweeper/src/androidTest/java/com/vayunmathur/games/minesweeper/ui/FullE2eTest.ktindex b81ea7c416..40057882d0 100644--- a/games/minesweeper/src/androidTest/java/com/vayunmathur/games/minesweeper/ui/FullE2eTest.kt+++ b/games/minesweeper/src/androidTest/java/com/vayunmathur/games/minesweeper/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it lands on the home menu rather than sitting on a permission screen. * * Minesweeper starts at Route.Home with a New Game button; stats cards render@@ -28,7 +28,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsHome() {
games/nonogram/src/androidTest/java/com/vayunmathur/games/nonogram/ui/FullE2eTest.kt
diff --git a/games/nonogram/src/androidTest/java/com/vayunmathur/games/nonogram/ui/FullE2eTest.kt b/games/nonogram/src/androidTest/java/com/vayunmathur/games/nonogram/ui/FullE2eTest.ktindex fd64e864ca..3587ae8443 100644--- a/games/nonogram/src/androidTest/java/com/vayunmathur/games/nonogram/ui/FullE2eTest.kt+++ b/games/nonogram/src/androidTest/java/com/vayunmathur/games/nonogram/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it lands on the puzzle board rather than sitting on a permission screen. * * Nonogram starts directly at Route.Game: the top-bar title folds in the level@@ -29,7 +29,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsGame() {
games/pipes/src/androidTest/java/com/vayunmathur/games/pipes/ui/FullE2eTest.kt
diff --git a/games/pipes/src/androidTest/java/com/vayunmathur/games/pipes/ui/FullE2eTest.kt b/games/pipes/src/androidTest/java/com/vayunmathur/games/pipes/ui/FullE2eTest.ktindex 789f065880..2a661dc893 100644--- a/games/pipes/src/androidTest/java/com/vayunmathur/games/pipes/ui/FullE2eTest.kt+++ b/games/pipes/src/androidTest/java/com/vayunmathur/games/pipes/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it lands on the pack list rather than sitting on a permission screen. * * Pipes starts at Route.PackSelector, whose title is the stable Pack Select@@ -28,7 +28,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsPackList() {
games/solitaire/src/androidTest/java/com/vayunmathur/games/solitaire/ui/FullE2eTest.kt
diff --git a/games/solitaire/src/androidTest/java/com/vayunmathur/games/solitaire/ui/FullE2eTest.kt b/games/solitaire/src/androidTest/java/com/vayunmathur/games/solitaire/ui/FullE2eTest.ktindex 3859f9f695..95f246f594 100644--- a/games/solitaire/src/androidTest/java/com/vayunmathur/games/solitaire/ui/FullE2eTest.kt+++ b/games/solitaire/src/androidTest/java/com/vayunmathur/games/solitaire/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it lands on the home menu rather than sitting on a permission screen. * * Solitaire starts at Route.Home with a New Game button; the game board screen@@ -28,7 +28,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsHome() {
games/sudoku/src/androidTest/java/com/vayunmathur/games/sudoku/ui/FullE2eTest.kt
diff --git a/games/sudoku/src/androidTest/java/com/vayunmathur/games/sudoku/ui/FullE2eTest.kt b/games/sudoku/src/androidTest/java/com/vayunmathur/games/sudoku/ui/FullE2eTest.ktindex 86202bda09..c898ad8a70 100644--- a/games/sudoku/src/androidTest/java/com/vayunmathur/games/sudoku/ui/FullE2eTest.kt+++ b/games/sudoku/src/androidTest/java/com/vayunmathur/games/sudoku/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it lands on the home menu rather than sitting on a permission screen. * * Sudoku starts at Route.Home with a New Game button; the stat cards below it@@ -28,7 +28,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsHome() {
games/unblockjam/src/androidTest/java/com/vayunmathur/games/unblockjam/ui/FullE2eTest.kt
diff --git a/games/unblockjam/src/androidTest/java/com/vayunmathur/games/unblockjam/ui/FullE2eTest.kt b/games/unblockjam/src/androidTest/java/com/vayunmathur/games/unblockjam/ui/FullE2eTest.ktindex cab2e78c71..755a5c5f69 100644--- a/games/unblockjam/src/androidTest/java/com/vayunmathur/games/unblockjam/ui/FullE2eTest.kt+++ b/games/unblockjam/src/androidTest/java/com/vayunmathur/games/unblockjam/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it lands on the pack list rather than sitting on a permission screen. * * Unblock Jam starts at Route.PackSelector, whose title is the stable Pack@@ -28,7 +28,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsPackList() {
games/voxels/src/androidTest/java/com/vayunmathur/games/voxels/ui/FullE2eTest.kt
diff --git a/games/voxels/src/androidTest/java/com/vayunmathur/games/voxels/ui/FullE2eTest.kt b/games/voxels/src/androidTest/java/com/vayunmathur/games/voxels/ui/FullE2eTest.ktindex f963e3695a..f8ab9995f7 100644--- a/games/voxels/src/androidTest/java/com/vayunmathur/games/voxels/ui/FullE2eTest.kt+++ b/games/voxels/src/androidTest/java/com/vayunmathur/games/voxels/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it lands on the world menu rather than sitting on a permission screen. * * Voxels launches into MenuActivity (a raw ComponentActivity; MainActivity is@@ -35,7 +35,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsWorldMenu() {@@ -44,9 +44,9 @@ class LaunchNoCrashTest { val targetContext = instrumentation.targetContext val packageName = targetContext.packageName - // Clean state first (fresh-install journey); grants follow the clear- // because a clear can drop runtime-grant state on some releases.- clearAppData(instrumentation.uiAutomation, packageName)+ // Clean state is provided by the runner: ./test clears the app's+ // data before instrumenting (clearing from inside the test would+ // kill the instrumentation, which runs in the app process). grantAllRequestedPermissions(instrumentation.uiAutomation, targetContext.packageManager, packageName) @@ -96,16 +96,6 @@ class LaunchNoCrashTest { assertEquals(packageName, device.currentPackageName) } - private fun clearAppData(uiAutomation: UiAutomation, packageName: String) {- try {- uiAutomation.executeShellCommand("pm clear $packageName").close()- } catch (ignored: SecurityException) {- // Clear refused: the journey assertions below still report state.- } catch (ignored: IOException) {- // Shell pipe failed: the content assertions below report it.- }- }- private fun grantAllRequestedPermissions( uiAutomation: UiAutomation, packageManager: PackageManager,
games/wordmaker/src/androidTest/java/com/vayunmathur/games/wordmaker/ui/FullE2eTest.kt
diff --git a/games/wordmaker/src/androidTest/java/com/vayunmathur/games/wordmaker/ui/FullE2eTest.kt b/games/wordmaker/src/androidTest/java/com/vayunmathur/games/wordmaker/ui/FullE2eTest.ktindex 51b6c542e9..a5eaae5271 100644--- a/games/wordmaker/src/androidTest/java/com/vayunmathur/games/wordmaker/ui/FullE2eTest.kt+++ b/games/wordmaker/src/androidTest/java/com/vayunmathur/games/wordmaker/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it lands on the crossword board rather than sitting on a permission screen. * * Word Maker starts at Route.Game, but the top-bar label folds in the level@@ -30,7 +30,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsGame() {
globalesim/src/androidTest/java/com/vayunmathur/globalesim/ui/FullE2eTest.kt
diff --git a/globalesim/src/androidTest/java/com/vayunmathur/globalesim/ui/FullE2eTest.kt b/globalesim/src/androidTest/java/com/vayunmathur/globalesim/ui/FullE2eTest.ktindex fa80633f74..e80e0acbce 100644--- a/globalesim/src/androidTest/java/com/vayunmathur/globalesim/ui/FullE2eTest.kt+++ b/globalesim/src/androidTest/java/com/vayunmathur/globalesim/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it lands on real content rather than sitting on a permission screen. * * Globalesim has no runtime-permission gate, so the grant pass only covers what@@ -33,7 +33,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsPurchaseEmptyState() {@@ -42,9 +42,9 @@ class LaunchNoCrashTest { val targetContext = instrumentation.targetContext val packageName = targetContext.packageName - // Clean app state first: every run starts from the fresh-install- // first screen this test asserts, not whatever a previous run left.- clearAppData(instrumentation.uiAutomation, packageName)+ // Clean state is provided by the runner: ./test clears the app's+ // data before instrumenting (clearing from inside the test would+ // kill the instrumentation, which runs in the app process). grantAllRequestedPermissions(instrumentation.uiAutomation, targetContext.packageManager, packageName) @@ -67,17 +67,6 @@ class LaunchNoCrashTest { assertEquals(packageName, device.currentPackageName) } - private fun clearAppData(uiAutomation: UiAutomation, packageName: String) {- try {- uiAutomation.executeShellCommand("pm clear $packageName").close()- } catch (ignored: SecurityException) {- // Shell cannot clear the package: the content assertions below- // report whatever state the app actually starts in.- } catch (ignored: IOException) {- // Shell pipe failed: same reporting path as above.- }- }- private fun grantAllRequestedPermissions( uiAutomation: UiAutomation, packageManager: PackageManager,
health/src/androidTest/java/com/vayunmathur/health/ui/FullE2eTest.kt
diff --git a/health/src/androidTest/java/com/vayunmathur/health/ui/FullE2eTest.kt b/health/src/androidTest/java/com/vayunmathur/health/ui/FullE2eTest.ktindex 7fad585372..929b37ce8a 100644--- a/health/src/androidTest/java/com/vayunmathur/health/ui/FullE2eTest.kt+++ b/health/src/androidTest/java/com/vayunmathur/health/ui/FullE2eTest.kt@@ -17,7 +17,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto Today. * * Health gates first launch on Health Connect reads and writes (PERMISSIONS in@@ -35,7 +35,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsToday() {
keyboard/src/androidTest/java/com/vayunmathur/keyboard/ui/FullE2eTest.kt
diff --git a/keyboard/src/androidTest/java/com/vayunmathur/keyboard/ui/FullE2eTest.kt b/keyboard/src/androidTest/java/com/vayunmathur/keyboard/ui/FullE2eTest.ktindex fd7656b3dd..7470bdf68b 100644--- a/keyboard/src/androidTest/java/com/vayunmathur/keyboard/ui/FullE2eTest.kt+++ b/keyboard/src/androidTest/java/com/vayunmathur/keyboard/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it lands on real content rather than sitting on a permission screen. * * Keyboard's launcher entry is the setup screen (enable/select the IME plus its@@ -29,7 +29,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsSetupScreen() {
launcher/src/androidTest/java/com/vayunmathur/launcher/ui/FullE2eTest.kt
diff --git a/launcher/src/androidTest/java/com/vayunmathur/launcher/ui/FullE2eTest.kt b/launcher/src/androidTest/java/com/vayunmathur/launcher/ui/FullE2eTest.ktindex 6360941e3b..cfa3e78084 100644--- a/launcher/src/androidTest/java/com/vayunmathur/launcher/ui/FullE2eTest.kt+++ b/launcher/src/androidTest/java/com/vayunmathur/launcher/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it lands on real content rather than sitting on a permission screen. * * Launcher's home screen paints wallpaper plus icons whose labels come from the@@ -30,7 +30,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsDrawerSearch() {
logviewer/src/androidTest/java/com/vayunmathur/logviewer/ui/FullE2eTest.kt
diff --git a/logviewer/src/androidTest/java/com/vayunmathur/logviewer/ui/FullE2eTest.kt b/logviewer/src/androidTest/java/com/vayunmathur/logviewer/ui/FullE2eTest.ktindex e4c7958516..58e8d1b1b6 100644--- a/logviewer/src/androidTest/java/com/vayunmathur/logviewer/ui/FullE2eTest.kt+++ b/logviewer/src/androidTest/java/com/vayunmathur/logviewer/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the viewer, grants every requested permission,+ * Full e2e test: launches the viewer, grants every requested permission, * and asserts it lands on real content rather than a permission screen. * * There is deliberately no launcher intent to launch: both entry points are@@ -36,7 +36,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsSystemLog() {@@ -45,7 +45,9 @@ class LaunchNoCrashTest { val targetContext = instrumentation.targetContext val packageName = targetContext.packageName - clearPackageData(instrumentation.uiAutomation, packageName)+ // Clean state is provided by the runner: ./test clears the app's+ // data before instrumenting (clearing from inside the test would+ // kill the instrumentation, which runs in the app process). grantAllRequestedPermissions(instrumentation.uiAutomation, targetContext.packageManager, packageName) val intent = Intent(ACTION_LOGCAT)@@ -72,16 +74,6 @@ class LaunchNoCrashTest { * fresh install, so any data (or stopped state) a previous test left * behind is cleared before permissions are granted and the app launches. */- private fun clearPackageData(uiAutomation: UiAutomation, packageName: String) {- try {- uiAutomation.executeShellCommand("pm clear $packageName").close()- } catch (ignored: SecurityException) {- // Cannot clear: the content assertions below report stale state.- } catch (ignored: IOException) {- // Shell pipe failed: the content assertions below report it.- }- }- private fun grantAllRequestedPermissions( uiAutomation: UiAutomation, packageManager: PackageManager,
madeveloper/src/androidTest/java/com/vayunmathur/madeveloper/ui/FullE2eTest.kt
diff --git a/madeveloper/src/androidTest/java/com/vayunmathur/madeveloper/ui/FullE2eTest.kt b/madeveloper/src/androidTest/java/com/vayunmathur/madeveloper/ui/FullE2eTest.ktindex 7c396d5aa8..30a128c57d 100644--- a/madeveloper/src/androidTest/java/com/vayunmathur/madeveloper/ui/FullE2eTest.kt+++ b/madeveloper/src/androidTest/java/com/vayunmathur/madeveloper/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it lands on real content rather than sitting on a permission screen. * * Madeveloper has no runtime-permission gate, so the grant pass only covers@@ -34,7 +34,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsHome() {@@ -43,9 +43,9 @@ class LaunchNoCrashTest { val targetContext = instrumentation.targetContext val packageName = targetContext.packageName - // Clean app state first: every run starts from the fresh-install- // first screen this test asserts, not whatever a previous run left.- clearAppData(instrumentation.uiAutomation, packageName)+ // Clean state is provided by the runner: ./test clears the app's+ // data before instrumenting (clearing from inside the test would+ // kill the instrumentation, which runs in the app process). grantAllRequestedPermissions(instrumentation.uiAutomation, targetContext.packageManager, packageName) @@ -68,17 +68,6 @@ class LaunchNoCrashTest { assertEquals(packageName, device.currentPackageName) } - private fun clearAppData(uiAutomation: UiAutomation, packageName: String) {- try {- uiAutomation.executeShellCommand("pm clear $packageName").close()- } catch (ignored: SecurityException) {- // Shell cannot clear the package: the content assertions below- // report whatever state the app actually starts in.- } catch (ignored: IOException) {- // Shell pipe failed: same reporting path as above.- }- }- private fun grantAllRequestedPermissions( uiAutomation: UiAutomation, packageManager: PackageManager,
maps/src/androidTest/java/com/vayunmathur/maps/ui/FullE2eTest.kt
diff --git a/maps/src/androidTest/java/com/vayunmathur/maps/ui/FullE2eTest.kt b/maps/src/androidTest/java/com/vayunmathur/maps/ui/FullE2eTest.ktindex db9c20b867..19a7295001 100644--- a/maps/src/androidTest/java/com/vayunmathur/maps/ui/FullE2eTest.kt+++ b/maps/src/androidTest/java/com/vayunmathur/maps/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the map. * * Maps gates first launch on the offline basemap archive@@ -36,7 +36,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsMap() {
measure/src/androidTest/java/com/vayunmathur/measure/ui/FullE2eTest.kt
diff --git a/measure/src/androidTest/java/com/vayunmathur/measure/ui/FullE2eTest.kt b/measure/src/androidTest/java/com/vayunmathur/measure/ui/FullE2eTest.ktindex d3550ae34c..97d39cd1d7 100644--- a/measure/src/androidTest/java/com/vayunmathur/measure/ui/FullE2eTest.kt+++ b/measure/src/androidTest/java/com/vayunmathur/measure/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it lands on the compass page rather than sitting on a permission screen. * * Measure starts at Route.Compass, the first bottom-bar tab; the title and the@@ -29,7 +29,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsCompass() {
music/src/androidTest/java/com/vayunmathur/music/ui/FullE2eTest.kt
diff --git a/music/src/androidTest/java/com/vayunmathur/music/ui/FullE2eTest.kt b/music/src/androidTest/java/com/vayunmathur/music/ui/FullE2eTest.ktindex a4f1446d24..4c8b719db7 100644--- a/music/src/androidTest/java/com/vayunmathur/music/ui/FullE2eTest.kt+++ b/music/src/androidTest/java/com/vayunmathur/music/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the library tabs. * * Music gates first launch on READ_MEDIA_AUDIO on API 33+ (READ_EXTERNAL_STORAGE@@ -33,7 +33,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsLibrary() {
networklocation/src/androidTest/java/com/vayunmathur/networklocation/ui/FullE2eTest.kt
diff --git a/networklocation/src/androidTest/java/com/vayunmathur/networklocation/ui/FullE2eTest.kt b/networklocation/src/androidTest/java/com/vayunmathur/networklocation/ui/FullE2eTest.ktindex 2410ba5042..30047cbf53 100644--- a/networklocation/src/androidTest/java/com/vayunmathur/networklocation/ui/FullE2eTest.kt+++ b/networklocation/src/androidTest/java/com/vayunmathur/networklocation/ui/FullE2eTest.kt@@ -17,7 +17,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it lands on real content rather than sitting on a permission screen. * * This app has no launcher intent by design: it is a headless system provider@@ -36,7 +36,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsStatusScreen() {@@ -45,10 +45,9 @@ class LaunchNoCrashTest { val targetContext = instrumentation.targetContext val packageName = targetContext.packageName - // Clean-state start: wipe any data a previous run left behind so the- // first screen below is the fresh-install one, then grant permissions- // (grants are applied after the clear so they survive it).- clearAppData(instrumentation.uiAutomation, packageName)+ // Clean state is provided by the runner: ./test clears the app's+ // data before instrumenting (clearing from inside the test would+ // kill the instrumentation, which runs in the app process). grantAllRequestedPermissions(instrumentation.uiAutomation, targetContext.packageManager, packageName) // No launcher intent exists (see class doc): launch MainActivity directly.@@ -72,17 +71,6 @@ class LaunchNoCrashTest { assertEquals(packageName, device.currentPackageName) } - private fun clearAppData(uiAutomation: UiAutomation, packageName: String) {- try {- uiAutomation.executeShellCommand("pm clear $packageName").close()- } catch (ignored: SecurityException) {- // Clear refused: leftover state may change the first screen and- // the content assertions below report it.- } catch (ignored: IOException) {- // Shell pipe failed: the content assertions below report it.- }- }- private fun grantAllRequestedPermissions( uiAutomation: UiAutomation, packageManager: PackageManager,
notes/src/androidTest/java/com/vayunmathur/notes/ui/FullE2eTest.kt
diff --git a/notes/src/androidTest/java/com/vayunmathur/notes/ui/FullE2eTest.kt b/notes/src/androidTest/java/com/vayunmathur/notes/ui/FullE2eTest.ktindex 49c51cd63c..c69efd6973 100644--- a/notes/src/androidTest/java/com/vayunmathur/notes/ui/FullE2eTest.kt+++ b/notes/src/androidTest/java/com/vayunmathur/notes/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it lands on real content rather than sitting on a permission screen. * * Notes is offline-first with no runtime-permission gate, so the grant pass only@@ -29,7 +29,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsNotesList() {
office/src/androidTest/java/com/vayunmathur/office/ui/FullE2eTest.kt
diff --git a/office/src/androidTest/java/com/vayunmathur/office/ui/FullE2eTest.kt b/office/src/androidTest/java/com/vayunmathur/office/ui/FullE2eTest.ktindex aed16c2a75..3b36567314 100644--- a/office/src/androidTest/java/com/vayunmathur/office/ui/FullE2eTest.kt+++ b/office/src/androidTest/java/com/vayunmathur/office/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it lands on real content rather than sitting on a permission screen. * * A plain launcher launch with no document intent lands on the OfflineHome tab,@@ -29,7 +29,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsOfficeHome() {@@ -38,10 +38,9 @@ class LaunchNoCrashTest { val targetContext = instrumentation.targetContext val packageName = targetContext.packageName - // Clean-state start: wipe any data a previous run left behind so the- // first screen below is the fresh-install one, then grant permissions- // (grants are applied after the clear so they survive it).- clearAppData(instrumentation.uiAutomation, packageName)+ // Clean state is provided by the runner: ./test clears the app's+ // data before instrumenting (clearing from inside the test would+ // kill the instrumentation, which runs in the app process). grantAllRequestedPermissions(instrumentation.uiAutomation, targetContext.packageManager, packageName) val intent = targetContext.packageManager.getLaunchIntentForPackage(packageName)@@ -65,17 +64,6 @@ class LaunchNoCrashTest { assertEquals(packageName, device.currentPackageName) } - private fun clearAppData(uiAutomation: UiAutomation, packageName: String) {- try {- uiAutomation.executeShellCommand("pm clear $packageName").close()- } catch (ignored: SecurityException) {- // Clear refused: leftover state may change the first screen and- // the content assertions below report it.- } catch (ignored: IOException) {- // Shell pipe failed: the content assertions below report it.- }- }- private fun grantAllRequestedPermissions( uiAutomation: UiAutomation, packageManager: PackageManager,
openassistant/src/androidTest/java/com/vayunmathur/openassistant/ui/FullE2eTest.kt
diff --git a/openassistant/src/androidTest/java/com/vayunmathur/openassistant/ui/FullE2eTest.kt b/openassistant/src/androidTest/java/com/vayunmathur/openassistant/ui/FullE2eTest.ktindex 7ce67e91fe..3d6f3f006a 100644--- a/openassistant/src/androidTest/java/com/vayunmathur/openassistant/ui/FullE2eTest.kt+++ b/openassistant/src/androidTest/java/com/vayunmathur/openassistant/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it lands on the chat screen rather than sitting on a permission screen. * * OpenAssistant starts at Route.ConversationPage(0); with no saved@@ -33,7 +33,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsChat() {
parentalcontrols/src/androidTest/java/com/vayunmathur/parentalcontrols/ui/FullE2eTest.kt
diff --git a/parentalcontrols/src/androidTest/java/com/vayunmathur/parentalcontrols/ui/FullE2eTest.kt b/parentalcontrols/src/androidTest/java/com/vayunmathur/parentalcontrols/ui/FullE2eTest.ktindex 2309edff51..efeaf751dc 100644--- a/parentalcontrols/src/androidTest/java/com/vayunmathur/parentalcontrols/ui/FullE2eTest.kt+++ b/parentalcontrols/src/androidTest/java/com/vayunmathur/parentalcontrols/ui/FullE2eTest.kt@@ -17,7 +17,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: clears the app's data, grants every requested permission, and+ * Full e2e test: starts from the runner-cleared clean state, grants every requested permission, and * asserts it lands on the parental-controls dashboard. * * Parental Controls has no launcher entry by design (it is reached from@@ -37,7 +37,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsDashboard() {@@ -46,7 +46,9 @@ class LaunchNoCrashTest { val targetContext = instrumentation.targetContext val packageName = targetContext.packageName - clearAppData(instrumentation.uiAutomation, packageName)+ // Clean state is provided by the runner: ./test clears the app's+ // data before instrumenting (clearing from inside the test would+ // kill the instrumentation, which runs in the app process). grantAllRequestedPermissions(instrumentation.uiAutomation, targetContext.packageManager, packageName) @@ -81,16 +83,6 @@ class LaunchNoCrashTest { * Starts from clean app state: wipes the target package's data (which also * resets its grants, so this runs before the grant pass). */- private fun clearAppData(uiAutomation: UiAutomation, packageName: String) {- try {- uiAutomation.executeShellCommand("pm clear $packageName").close()- } catch (ignored: SecurityException) {- // Cannot clear headlessly: the content assertions below report stale state.- } catch (ignored: IOException) {- // Shell pipe failed: the content assertions below report it.- }- }- private fun grantAllRequestedPermissions( uiAutomation: UiAutomation, packageManager: PackageManager,
passwords/src/androidTest/java/com/vayunmathur/passwords/ui/FullE2eTest.kt
diff --git a/passwords/src/androidTest/java/com/vayunmathur/passwords/ui/FullE2eTest.kt b/passwords/src/androidTest/java/com/vayunmathur/passwords/ui/FullE2eTest.ktindex f9131da533..d5e7881420 100644--- a/passwords/src/androidTest/java/com/vayunmathur/passwords/ui/FullE2eTest.kt+++ b/passwords/src/androidTest/java/com/vayunmathur/passwords/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it reaches the biometric unlock prompt rather than dying on launch. * * Passwords is a MaFragmentActivity whose composition defers until@@ -31,7 +31,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsUnlockPrompt() {
pdf/src/androidTest/java/com/vayunmathur/pdf/ui/FullE2eTest.kt
diff --git a/pdf/src/androidTest/java/com/vayunmathur/pdf/ui/FullE2eTest.kt b/pdf/src/androidTest/java/com/vayunmathur/pdf/ui/FullE2eTest.ktindex 122b58a278..a9da53b861 100644--- a/pdf/src/androidTest/java/com/vayunmathur/pdf/ui/FullE2eTest.kt+++ b/pdf/src/androidTest/java/com/vayunmathur/pdf/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the picker. * * Pdf lands on its initial picker when launched with no document intent; the@@ -28,7 +28,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsPicker() {
photos/src/androidTest/java/com/vayunmathur/photos/ui/FullE2eTest.kt
diff --git a/photos/src/androidTest/java/com/vayunmathur/photos/ui/FullE2eTest.kt b/photos/src/androidTest/java/com/vayunmathur/photos/ui/FullE2eTest.ktindex 6bfc4a9ff5..fdd1b195bc 100644--- a/photos/src/androidTest/java/com/vayunmathur/photos/ui/FullE2eTest.kt+++ b/photos/src/androidTest/java/com/vayunmathur/photos/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the gallery. * * Photos gates first launch on the runtime media batch (READ_MEDIA_IMAGES,@@ -32,7 +32,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsGallery() {
screentime/src/androidTest/java/com/vayunmathur/screentime/ui/FullE2eTest.kt
diff --git a/screentime/src/androidTest/java/com/vayunmathur/screentime/ui/FullE2eTest.kt b/screentime/src/androidTest/java/com/vayunmathur/screentime/ui/FullE2eTest.ktindex e3d4afa9c1..c05a926b5e 100644--- a/screentime/src/androidTest/java/com/vayunmathur/screentime/ui/FullE2eTest.kt+++ b/screentime/src/androidTest/java/com/vayunmathur/screentime/ui/FullE2eTest.kt@@ -17,7 +17,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: clears the app's data, grants every requested permission+ * Full e2e test: starts from the runner-cleared clean state, grants every requested permission * plus the usage-access appop, and asserts it lands on the usage dashboard. * * Screen Time has no launcher entry by design (it is reached from@@ -37,7 +37,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsUsageDashboard() {@@ -46,7 +46,9 @@ class LaunchNoCrashTest { val targetContext = instrumentation.targetContext val packageName = targetContext.packageName - clearAppData(instrumentation.uiAutomation, packageName)+ // Clean state is provided by the runner: ./test clears the app's+ // data before instrumenting (clearing from inside the test would+ // kill the instrumentation, which runs in the app process). grantAllRequestedPermissions(instrumentation.uiAutomation, targetContext.packageManager, packageName) @@ -76,16 +78,6 @@ class LaunchNoCrashTest { * Starts from clean app state: wipes the target package's data (which also * resets its grants, so this runs before the grant pass). */- private fun clearAppData(uiAutomation: UiAutomation, packageName: String) {- try {- uiAutomation.executeShellCommand("pm clear $packageName").close()- } catch (ignored: SecurityException) {- // Cannot clear headlessly: the content assertions below report stale state.- } catch (ignored: IOException) {- // Shell pipe failed: the content assertions below report it.- }- }- private fun grantAllRequestedPermissions( uiAutomation: UiAutomation, packageManager: PackageManager,
securemail/src/androidTest/java/com/vayunmathur/securemail/ui/FullE2eTest.kt
diff --git a/securemail/src/androidTest/java/com/vayunmathur/securemail/ui/FullE2eTest.kt b/securemail/src/androidTest/java/com/vayunmathur/securemail/ui/FullE2eTest.ktindex e291b8b6f1..71b881ee77 100644--- a/securemail/src/androidTest/java/com/vayunmathur/securemail/ui/FullE2eTest.kt+++ b/securemail/src/androidTest/java/com/vayunmathur/securemail/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it lands on real content rather than sitting on a permission screen. * * A fresh install has no identity, so MailViewModel.unlockIfReady skips the@@ -30,7 +30,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsOnboarding() {@@ -39,10 +39,9 @@ class LaunchNoCrashTest { val targetContext = instrumentation.targetContext val packageName = targetContext.packageName - // Clean-state start: wipe any data a previous run left behind so the- // first screen below is the fresh-install one, then grant permissions- // (grants are applied after the clear so they survive it).- clearAppData(instrumentation.uiAutomation, packageName)+ // Clean state is provided by the runner: ./test clears the app's+ // data before instrumenting (clearing from inside the test would+ // kill the instrumentation, which runs in the app process). grantAllRequestedPermissions(instrumentation.uiAutomation, targetContext.packageManager, packageName) val intent = targetContext.packageManager.getLaunchIntentForPackage(packageName)@@ -66,17 +65,6 @@ class LaunchNoCrashTest { assertEquals(packageName, device.currentPackageName) } - private fun clearAppData(uiAutomation: UiAutomation, packageName: String) {- try {- uiAutomation.executeShellCommand("pm clear $packageName").close()- } catch (ignored: SecurityException) {- // Clear refused: leftover state may change the first screen and- // the content assertions below report it.- } catch (ignored: IOException) {- // Shell pipe failed: the content assertions below report it.- }- }- private fun grantAllRequestedPermissions( uiAutomation: UiAutomation, packageManager: PackageManager,
setupwizard/src/androidTest/java/com/vayunmathur/setupwizard/ui/FullE2eTest.kt
diff --git a/setupwizard/src/androidTest/java/com/vayunmathur/setupwizard/ui/FullE2eTest.kt b/setupwizard/src/androidTest/java/com/vayunmathur/setupwizard/ui/FullE2eTest.ktindex 39723fcbbe..9d4be7a073 100644--- a/setupwizard/src/androidTest/java/com/vayunmathur/setupwizard/ui/FullE2eTest.kt+++ b/setupwizard/src/androidTest/java/com/vayunmathur/setupwizard/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the wizard, grants every requested permission,+ * Full e2e test: launches the wizard, grants every requested permission, * and asserts it lands on its first setup step rather than a permission screen. * * There is no launcher intent to launch: MainActivity only answers MAIN with@@ -37,7 +37,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsWelcomeStep() {@@ -46,7 +46,9 @@ class LaunchNoCrashTest { val targetContext = instrumentation.targetContext val packageName = targetContext.packageName - clearPackageData(instrumentation.uiAutomation, packageName)+ // Clean state is provided by the runner: ./test clears the app's+ // data before instrumenting (clearing from inside the test would+ // kill the instrumentation, which runs in the app process). grantAllRequestedPermissions(instrumentation.uiAutomation, targetContext.packageManager, packageName) clearUserSetupComplete(instrumentation.uiAutomation) @@ -91,16 +93,6 @@ class LaunchNoCrashTest { * fresh install, so any data (or stopped state) a previous test left * behind is cleared before permissions are granted and the app launches. */- private fun clearPackageData(uiAutomation: UiAutomation, packageName: String) {- try {- uiAutomation.executeShellCommand("pm clear $packageName").close()- } catch (ignored: SecurityException) {- // Cannot clear: the content assertions below report stale state.- } catch (ignored: IOException) {- // Shell pipe failed: the content assertions below report it.- }- }- private fun grantAllRequestedPermissions( uiAutomation: UiAutomation, packageManager: PackageManager,
share/src/androidTest/java/com/vayunmathur/share/ui/FullE2eTest.kt
diff --git a/share/src/androidTest/java/com/vayunmathur/share/ui/FullE2eTest.kt b/share/src/androidTest/java/com/vayunmathur/share/ui/FullE2eTest.ktindex b8d4132981..3dd13a3fdd 100644--- a/share/src/androidTest/java/com/vayunmathur/share/ui/FullE2eTest.kt+++ b/share/src/androidTest/java/com/vayunmathur/share/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the send screen. * * Share gates first launch on the nearby-share runtime batch@@ -32,7 +32,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsSendScreen() {
shop/src/androidTest/java/com/vayunmathur/shop/ui/FullE2eTest.kt
diff --git a/shop/src/androidTest/java/com/vayunmathur/shop/ui/FullE2eTest.kt b/shop/src/androidTest/java/com/vayunmathur/shop/ui/FullE2eTest.ktindex 76a12fb5c6..e79125580a 100644--- a/shop/src/androidTest/java/com/vayunmathur/shop/ui/FullE2eTest.kt+++ b/shop/src/androidTest/java/com/vayunmathur/shop/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto its first real screen. * * On a fresh install no buyer profile is saved yet, so Navigation starts at@@ -32,7 +32,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsProfileSetupForm() {@@ -41,7 +41,9 @@ class LaunchNoCrashTest { val targetContext = instrumentation.targetContext val packageName = targetContext.packageName - clearPackageData(instrumentation.uiAutomation, packageName)+ // Clean state is provided by the runner: ./test clears the app's+ // data before instrumenting (clearing from inside the test would+ // kill the instrumentation, which runs in the app process). grantAllRequestedPermissions(instrumentation.uiAutomation, targetContext.packageManager, packageName) val intent = targetContext.packageManager.getLaunchIntentForPackage(packageName)@@ -68,16 +70,6 @@ class LaunchNoCrashTest { * fresh install, so any data (or stopped state) a previous test left * behind is cleared before permissions are granted and the app launches. */- private fun clearPackageData(uiAutomation: UiAutomation, packageName: String) {- try {- uiAutomation.executeShellCommand("pm clear $packageName").close()- } catch (ignored: SecurityException) {- // Cannot clear: the content assertions below report stale state.- } catch (ignored: IOException) {- // Shell pipe failed: the content assertions below report it.- }- }- private fun grantAllRequestedPermissions( uiAutomation: UiAutomation, packageManager: PackageManager,
speech/src/androidTest/java/com/vayunmathur/speech/ui/FullE2eTest.kt
diff --git a/speech/src/androidTest/java/com/vayunmathur/speech/ui/FullE2eTest.kt b/speech/src/androidTest/java/com/vayunmathur/speech/ui/FullE2eTest.ktindex 4ca68beea5..06e1b44699 100644--- a/speech/src/androidTest/java/com/vayunmathur/speech/ui/FullE2eTest.kt+++ b/speech/src/androidTest/java/com/vayunmathur/speech/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the speech setup. * * Speech gates first launch on RECORD_AUDIO through the shared AppPermissionsGate. The@@ -32,7 +32,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsSetup() {
taxi/src/androidTest/java/com/vayunmathur/taxi/ui/FullE2eTest.kt
diff --git a/taxi/src/androidTest/java/com/vayunmathur/taxi/ui/FullE2eTest.kt b/taxi/src/androidTest/java/com/vayunmathur/taxi/ui/FullE2eTest.ktindex e8b7bc4d19..81d8ba50a6 100644--- a/taxi/src/androidTest/java/com/vayunmathur/taxi/ui/FullE2eTest.kt+++ b/taxi/src/androidTest/java/com/vayunmathur/taxi/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the ride tab. * * Taxi cold-starts on the Ride tab of its bottom nav; the Ride tab label is always@@ -28,7 +28,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsRideTab() {
things/src/androidTest/java/com/vayunmathur/things/ui/FullE2eTest.kt
diff --git a/things/src/androidTest/java/com/vayunmathur/things/ui/FullE2eTest.kt b/things/src/androidTest/java/com/vayunmathur/things/ui/FullE2eTest.ktindex 23f4b38e8e..bd0382d97b 100644--- a/things/src/androidTest/java/com/vayunmathur/things/ui/FullE2eTest.kt+++ b/things/src/androidTest/java/com/vayunmathur/things/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the home empty state. * * Things gates first launch on BLUETOOTH_SCAN + BLUETOOTH_CONNECT (plus@@ -34,7 +34,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsHome() {
todo/src/androidTest/java/com/vayunmathur/todo/ui/FullE2eTest.kt
diff --git a/todo/src/androidTest/java/com/vayunmathur/todo/ui/FullE2eTest.kt b/todo/src/androidTest/java/com/vayunmathur/todo/ui/FullE2eTest.ktindex 89d85c2c8d..a83bddd3d1 100644--- a/todo/src/androidTest/java/com/vayunmathur/todo/ui/FullE2eTest.kt+++ b/todo/src/androidTest/java/com/vayunmathur/todo/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the todo list. * * Todo is offline-first with no runtime-permission gate; the list search field@@ -29,7 +29,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsTodoList() {
translate/src/androidTest/java/com/vayunmathur/translate/ui/FullE2eTest.kt
diff --git a/translate/src/androidTest/java/com/vayunmathur/translate/ui/FullE2eTest.kt b/translate/src/androidTest/java/com/vayunmathur/translate/ui/FullE2eTest.ktindex 2a511a78da..6bf2d1f4c9 100644--- a/translate/src/androidTest/java/com/vayunmathur/translate/ui/FullE2eTest.kt+++ b/translate/src/androidTest/java/com/vayunmathur/translate/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the translate screen. * * Translate wraps Navigation in InitialModelDownloadChecker with NllbModel.FILES,@@ -37,7 +37,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsTranslate() {
travel/src/androidTest/java/com/vayunmathur/travel/ui/FullE2eTest.kt
diff --git a/travel/src/androidTest/java/com/vayunmathur/travel/ui/FullE2eTest.kt b/travel/src/androidTest/java/com/vayunmathur/travel/ui/FullE2eTest.ktindex 2bff1470d2..e79e66f6bf 100644--- a/travel/src/androidTest/java/com/vayunmathur/travel/ui/FullE2eTest.kt+++ b/travel/src/androidTest/java/com/vayunmathur/travel/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto flight search. * * Travel defers composition until its repository loads on a background thread;@@ -29,7 +29,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsFlightSearch() {
tuner/src/androidTest/java/com/vayunmathur/tuner/ui/FullE2eTest.kt
diff --git a/tuner/src/androidTest/java/com/vayunmathur/tuner/ui/FullE2eTest.kt b/tuner/src/androidTest/java/com/vayunmathur/tuner/ui/FullE2eTest.ktindex 223d51a8db..b3c696fd2a 100644--- a/tuner/src/androidTest/java/com/vayunmathur/tuner/ui/FullE2eTest.kt+++ b/tuner/src/androidTest/java/com/vayunmathur/tuner/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the note tab. * * Tuner gates first launch on RECORD_AUDIO through the shared AppPermissionsGate.@@ -38,7 +38,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsNote() {@@ -47,9 +47,9 @@ class LaunchNoCrashTest { val targetContext = instrumentation.targetContext val packageName = targetContext.packageName - // Clean state first (fresh-install journey); grants follow the clear- // because a clear can drop runtime-grant state on some releases.- clearAppData(instrumentation.uiAutomation, packageName)+ // Clean state is provided by the runner: ./test clears the app's+ // data before instrumenting (clearing from inside the test would+ // kill the instrumentation, which runs in the app process). grantAllRequestedPermissions(instrumentation.uiAutomation, targetContext.packageManager, packageName) @@ -87,16 +87,6 @@ class LaunchNoCrashTest { assertEquals(packageName, device.currentPackageName) } - private fun clearAppData(uiAutomation: UiAutomation, packageName: String) {- try {- uiAutomation.executeShellCommand("pm clear $packageName").close()- } catch (ignored: SecurityException) {- // Clear refused: the journey assertions below still report state.- } catch (ignored: IOException) {- // Shell pipe failed: the content assertions below report it.- }- }- private fun grantAllRequestedPermissions( uiAutomation: UiAutomation, packageManager: PackageManager,
uniflix/src/androidTest/java/com/vayunmathur/uniflix/ui/FullE2eTest.kt
diff --git a/uniflix/src/androidTest/java/com/vayunmathur/uniflix/ui/FullE2eTest.kt b/uniflix/src/androidTest/java/com/vayunmathur/uniflix/ui/FullE2eTest.ktindex 4da58d5ce1..136bbb6a06 100644--- a/uniflix/src/androidTest/java/com/vayunmathur/uniflix/ui/FullE2eTest.kt+++ b/uniflix/src/androidTest/java/com/vayunmathur/uniflix/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it lands on real content rather than sitting on a permission screen. * * Navigation starts on the Home route with no onboarding gate in this build:@@ -30,7 +30,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsCatalogHome() {@@ -39,10 +39,9 @@ class LaunchNoCrashTest { val targetContext = instrumentation.targetContext val packageName = targetContext.packageName - // Clean-state start: wipe any data a previous run left behind so the- // first screen below is the fresh-install one, then grant permissions- // (grants are applied after the clear so they survive it).- clearAppData(instrumentation.uiAutomation, packageName)+ // Clean state is provided by the runner: ./test clears the app's+ // data before instrumenting (clearing from inside the test would+ // kill the instrumentation, which runs in the app process). grantAllRequestedPermissions(instrumentation.uiAutomation, targetContext.packageManager, packageName) val intent = targetContext.packageManager.getLaunchIntentForPackage(packageName)@@ -66,17 +65,6 @@ class LaunchNoCrashTest { assertEquals(packageName, device.currentPackageName) } - private fun clearAppData(uiAutomation: UiAutomation, packageName: String) {- try {- uiAutomation.executeShellCommand("pm clear $packageName").close()- } catch (ignored: SecurityException) {- // Clear refused: leftover state may change the first screen and- // the content assertions below report it.- } catch (ignored: IOException) {- // Shell pipe failed: the content assertions below report it.- }- }- private fun grantAllRequestedPermissions( uiAutomation: UiAutomation, packageManager: PackageManager,
updater/src/androidTest/java/com/vayunmathur/updater/ui/FullE2eTest.kt
diff --git a/updater/src/androidTest/java/com/vayunmathur/updater/ui/FullE2eTest.kt b/updater/src/androidTest/java/com/vayunmathur/updater/ui/FullE2eTest.ktindex 5db1aabc83..e3a37639e7 100644--- a/updater/src/androidTest/java/com/vayunmathur/updater/ui/FullE2eTest.kt+++ b/updater/src/androidTest/java/com/vayunmathur/updater/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the updater, grants every requested+ * Full e2e test: launches the updater, grants every requested * permission, and asserts it lands on its one screen rather than a permission * screen. *@@ -34,7 +34,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsUpdaterScreen() {@@ -43,7 +43,9 @@ class LaunchNoCrashTest { val targetContext = instrumentation.targetContext val packageName = targetContext.packageName - clearPackageData(instrumentation.uiAutomation, packageName)+ // Clean state is provided by the runner: ./test clears the app's+ // data before instrumenting (clearing from inside the test would+ // kill the instrumentation, which runs in the app process). grantAllRequestedPermissions(instrumentation.uiAutomation, targetContext.packageManager, packageName) val intent = Intent("android.settings.SYSTEM_UPDATE_SETTINGS")@@ -70,16 +72,6 @@ class LaunchNoCrashTest { * fresh install, so any data (or stopped state) a previous test left * behind is cleared before permissions are granted and the app launches. */- private fun clearPackageData(uiAutomation: UiAutomation, packageName: String) {- try {- uiAutomation.executeShellCommand("pm clear $packageName").close()- } catch (ignored: SecurityException) {- // Cannot clear: the content assertions below report stale state.- } catch (ignored: IOException) {- // Shell pipe failed: the content assertions below report it.- }- }- private fun grantAllRequestedPermissions( uiAutomation: UiAutomation, packageManager: PackageManager,
vpn/src/androidTest/java/com/vayunmathur/vpn/ui/FullE2eTest.kt
diff --git a/vpn/src/androidTest/java/com/vayunmathur/vpn/ui/FullE2eTest.kt b/vpn/src/androidTest/java/com/vayunmathur/vpn/ui/FullE2eTest.ktindex 8f4ba395aa..7f2f754d2e 100644--- a/vpn/src/androidTest/java/com/vayunmathur/vpn/ui/FullE2eTest.kt+++ b/vpn/src/androidTest/java/com/vayunmathur/vpn/ui/FullE2eTest.kt@@ -15,7 +15,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every headlessly grantable+ * Full e2e test: launches the app, grants every headlessly grantable * permission, and asserts the permission gate is correctly shown. * * Vpn gates on PermissionRequirement.Vpn, which the OS only grants via a user@@ -30,7 +30,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_showsVpnGateWithoutCrash() {
weather/src/androidTest/java/com/vayunmathur/weather/ui/FullE2eTest.kt
diff --git a/weather/src/androidTest/java/com/vayunmathur/weather/ui/FullE2eTest.kt b/weather/src/androidTest/java/com/vayunmathur/weather/ui/FullE2eTest.ktindex c897c3b5c2..7cb83cc395 100644--- a/weather/src/androidTest/java/com/vayunmathur/weather/ui/FullE2eTest.kt+++ b/weather/src/androidTest/java/com/vayunmathur/weather/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it gets past the permission screen onto the home empty state. * * Weather lands on its home list; a fresh install has no saved locations, so the@@ -28,7 +28,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsEmptyState() {
web/src/androidTest/java/com/vayunmathur/web/ui/FullE2eTest.kt
diff --git a/web/src/androidTest/java/com/vayunmathur/web/ui/FullE2eTest.kt b/web/src/androidTest/java/com/vayunmathur/web/ui/FullE2eTest.ktindex cde3bfc681..c1ab0e0998 100644--- a/web/src/androidTest/java/com/vayunmathur/web/ui/FullE2eTest.kt+++ b/web/src/androidTest/java/com/vayunmathur/web/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it lands on real content rather than sitting on a permission screen. * * Web has no runtime-permission gate; it defers composition until the tab@@ -29,7 +29,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsBrowser() {
youpipe/src/androidTest/java/com/vayunmathur/youpipe/ui/FullE2eTest.kt
diff --git a/youpipe/src/androidTest/java/com/vayunmathur/youpipe/ui/FullE2eTest.kt b/youpipe/src/androidTest/java/com/vayunmathur/youpipe/ui/FullE2eTest.ktindex afdd003ecd..d6d7d1e43f 100644--- a/youpipe/src/androidTest/java/com/vayunmathur/youpipe/ui/FullE2eTest.kt+++ b/youpipe/src/androidTest/java/com/vayunmathur/youpipe/ui/FullE2eTest.kt@@ -16,7 +16,7 @@ import org.junit.Test import org.junit.runner.RunWith /**- * Launch-no-crash test: launches the app, grants every requested permission, and+ * Full e2e test: launches the app, grants every requested permission, and * asserts it lands on real content rather than sitting on a permission screen. * * YouPipe has no runtime-permission gate; it opens on the user's default tab@@ -28,7 +28,7 @@ import org.junit.runner.RunWith * and non-Compose screens alike. */ @RunWith(AndroidJUnit4::class)-class LaunchNoCrashTest {+class FullE2eTest { @Test fun launch_grantsPermissions_showsHome() {