Skip to content

Commit baba3e4

Browse files
dectorpocmo
authored andcommitted
For mozilla-mobile#1481. Use androidx runner in feature-readerview.
1 parent 1dc58ad commit baba3e4

File tree

8 files changed

+159
-142
lines changed

8 files changed

+159
-142
lines changed

components/feature/prompts/src/test/java/mozilla/ext/context.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,10 @@ import androidx.appcompat.R
99
import androidx.appcompat.view.ContextThemeWrapper
1010
import mozilla.components.support.test.robolectric.testContext
1111

12+
/**
13+
* `testContext` wrapped with AppCompat theme.
14+
*
15+
* Useful for views that uses theme attributes, for example.
16+
*/
1217
internal val appCompatContext: Context
1318
get() = ContextThemeWrapper(testContext, R.style.Theme_AppCompat)

components/feature/readerview/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ android {
1919
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2020
}
2121
}
22+
23+
testOptions.unitTests.includeAndroidResources = true
2224
}
2325

2426
dependencies {
@@ -37,7 +39,7 @@ dependencies {
3739

3840
testImplementation project(':support-test')
3941
testImplementation Dependencies.androidx_test_core
40-
testImplementation Dependencies.testing_junit
42+
testImplementation Dependencies.androidx_test_junit
4143
testImplementation Dependencies.testing_robolectric
4244
testImplementation Dependencies.testing_mockito
4345
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# TODO remove and enable globally
2+
android.enableUnitTestBinaryResources=true

0 commit comments

Comments
 (0)