summaryrefslogtreecommitdiff
path: root/android-app/app/src/androidTest/kotlin/org
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-04-04 01:59:04 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-04-04 01:59:04 +0000
commitcfe178a0cd817f5ec747c220d37a82d3c7ecbf64 (patch)
treeb5c994609f926dddd182c328b4bb3f59d10fbd20 /android-app/app/src/androidTest/kotlin/org
parent7d4e856193954a0eba8e68b3ca5aa8f6a2dbd175 (diff)
test(smoke): ensure isTesting flag is set before Activity launch
- Use BeforeClass to set isTesting in NavApplication - This ensures MapLibre is bypassed correctly even when ActivityScenarioRule starts before @Before. Co-Authored-By: Gemini CLI <gemini-cli@google.com>
Diffstat (limited to 'android-app/app/src/androidTest/kotlin/org')
-rw-r--r--android-app/app/src/androidTest/kotlin/org/terst/nav/MainActivitySmokeTest.kt9
1 files changed, 9 insertions, 0 deletions
diff --git a/android-app/app/src/androidTest/kotlin/org/terst/nav/MainActivitySmokeTest.kt b/android-app/app/src/androidTest/kotlin/org/terst/nav/MainActivitySmokeTest.kt
index fecd9cc..30841c7 100644
--- a/android-app/app/src/androidTest/kotlin/org/terst/nav/MainActivitySmokeTest.kt
+++ b/android-app/app/src/androidTest/kotlin/org/terst/nav/MainActivitySmokeTest.kt
@@ -24,11 +24,20 @@ import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
class MainActivitySmokeTest {
+ companion object {
+ @org.junit.BeforeClass
+ @JvmStatic
+ fun setUpClass() {
+ NavApplication.isTesting = true
+ }
+ }
+
@get:Rule
val activityRule = ActivityScenarioRule(MainActivity::class.java)
@Before
fun setup() {
+ // Redundant but safe
NavApplication.isTesting = true
}