Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#69] Create HomeScreen UnitTest #71

Merged
merged 3 commits into from
Feb 1, 2023

Conversation

Wadeewee
Copy link
Contributor

@Wadeewee Wadeewee commented Jan 11, 2023

#69

What happened 👀

Create HomeScreen as UnitTest by using Robolectric

Insight 📝

  • Add testImplementation org.robolectric:robolectric:4.8.2 to use the Roborectric.
  • Add testOptions to includeAndroidResources for UnitTest.
  • Add robolectric.properties to simulate the device.
  • Create HomeScreenTest.
  • We will define testTag to allow modified element to be found in tests. For more info, Please have a look on this
  • Separate the error stream for getMyCoins and getTrendingCoins as it can happen at the same time, Also it can happen whenever we refresh too, So, I think it would be better to separate them out from the base one in BaseViewModel (TBD).

Proof Of Work 📹

Screen.Recording.2566-01-11.at.16.17.34.mov

@Wadeewee Wadeewee self-assigned this Jan 11, 2023
@Wadeewee Wadeewee linked an issue Jan 11, 2023 that may be closed by this pull request
@Wadeewee Wadeewee marked this pull request as draft January 11, 2023 09:30
@Wadeewee Wadeewee marked this pull request as ready for review January 11, 2023 09:34
@Wadeewee Wadeewee changed the base branch from develop to bug/72-migrate-workflows-setup-ruby-action January 13, 2023 03:05
@github-actions
Copy link

github-actions bot commented Jan 13, 2023

8 Warnings
⚠️ /home/runner/.gradle/caches/transforms-3/a2235db1cc299fbbf57e2fc61a3eddd1/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.
⚠️ 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
⚠️ app/src/main/AndroidManifest.xml#L13 - Attribute networkSecurityConfig is only used in API level 24 and higher (current min is 23)
⚠️ app/src/main/java/co/nimblehq/compose/crypto/ui/common/Toaster.kt#L16 - Toast created but not shown: did you forget to call show() ?
⚠️ app/src/main/res/drawable/ic_back.xml#L8 - Attribute fillType is only used in API level 24 and higher (current min is 23)
⚠️ 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)
⚠️ 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)
⚠️ app/src/main/res/navigation/nav_graph_main.xml#L2 - The resource R.navigation.nav_graph_main appears to be unused

CoroutineTemplate Jacoco report:

Generated by 🚫 Danger

Base automatically changed from bug/72-migrate-workflows-setup-ruby-action to develop January 16, 2023 06:15
@hoangnguyen92dn hoangnguyen92dn self-requested a review January 16, 2023 06:17
@hoangnguyen92dn
Copy link
Contributor

Except comments from Lucas, the rest LGTM 🚀

Copy link
Member

@luongvo luongvo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM @Wadeewee 💪

@hoangnguyen92dn hoangnguyen92dn merged commit 3a40ac2 into develop Feb 1, 2023
@hoangnguyen92dn hoangnguyen92dn deleted the chore/69-create-home-screen-unit-test branch February 1, 2023 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Chore] Create HomeScreen UnitTest
3 participants