Closed Wadeewee closed 1 year ago
8 Warnings | |
---|---|
:warning: | /home/runner/.gradle/caches/transforms-3/fc63d10724654858d2ee5b467b86b5a7/transformed/jetified-dagger-lint-aar-2.43.2/jars/lint.jar#L0 - Lint found an issue registry (dagger.lint.DaggerIssueRegistry ) which requires a newer API level. That means that the custom lint checks are intended for a newer lint version; please upgrade. |
:warning: | app/src/main/AndroidManifest.xml#L10 - On SDK version 23 and up, your app data will be automatically backed up and restored on app install. Consider adding the attribute android:fullBackupContent to specify an @xml resource which configures which files to backup, or just set android:fullBackupOnly=true . More info: https://developer.android.com/guide/topics/data/autobackup |
:warning: | app/src/main/AndroidManifest.xml#L13 - Attribute networkSecurityConfig is only used in API level 24 and higher (current min is 23) |
:warning: | app/src/main/java/co/nimblehq/compose/crypto/ui/common/Toaster.kt#L16 - Toast created but not shown: did you forget to call show() ? |
:warning: | app/src/main/res/drawable/ic_back.xml#L8 - Attribute fillType is only used in API level 24 and higher (current min is 23) |
:warning: | app/src/main/res/drawable/ic_fire_opal_arrow_down.xml#L8 - Attribute fillType is only used in API level 24 and higher (current min is 23) |
:warning: | app/src/main/res/drawable/ic_guppie_green_arrow_up.xml#L8 - Attribute fillType is only used in API level 24 and higher (current min is 23) |
:warning: | app/src/main/res/navigation/nav_graph_main.xml#L2 - The resource R.navigation.nav_graph_main appears to be unused |
Generated by :no_entry_sign: Danger
Another concern is we need to omit the last two test cases from HomeScreenTest
:
@Test
fun `When pulled to refresh and load MyCoins successfully, it render the UI properly`()
@Test
fun `When pulled to refresh and load TrendingCoins successfully, it render the UI properly`()
It seems like the PullRefreshIndicator
doesn't show when we perform this action:
onRoot().performTouchInput { swipeDown() }
That's why we can't test these test cases. Please let me know if you have any insight into this, the problem is similar to my above concern, I guess 🙏
https://github.com/nimblehq/jetpack-compose-crypto/issues/74
What happened 👀
Create HomeScreen as UI Test.
Insight 📝
Add
testInstrumentationRunner
indefaultConfig
Add dependencies libs for
UI Test
:androidx.compose.ui:ui-test-junit4
io.mockk:mockk-android
io.mockk:mockk-agent-android
io.kotest:kotest-assertions-core
To use
mockk-agent-android
, we need to upgrade the version ofMocck
to1.12.3
if not, we will get this error:Add
packagingOptions
and set thejniLibs
touseLegacyPackaging
=true
to fix this error:Add
CoroutineTestRule
.Add
BaseScreenTest
.Add
MockUtil
.Proof Of Work 📹
https://user-images.githubusercontent.com/28002315/215425411-e0179896-f9cc-4458-a79a-a528b232631c.mov