DroidKaigi / conference-app-2023

The Official Conference App for DroidKaigi 2023
Apache License 2.0
645 stars 206 forks source link

[Android] Enable to get version name from BuildConfig on AboutScreen #1113

Closed syarihu closed 1 year ago

syarihu commented 1 year ago

Issue

Overview (Required)

Detail

Links

Screenshot (Optional if screenshot test is present or unrelated to UI)

Before After
github-actions[bot] commented 1 year ago

Hi @syarihu! Codes seem to be unformatted. To resolve this issue, please run ./gradlew detekt --auto-correct and fix the results of ./gradlew lintDebug.. Thank you for your contribution.

takahirom commented 1 year ago

We've attempted this. However, there's an issue where the tests can't recognize the Dagger Module of the app-android module. I believe the tests will fail. 😭 https://github.com/DroidKaigi/conference-app-2023/pull/782

syarihu commented 1 year ago

@takahirom Thanks for sharing about your previous issues. I have created a BuildConfigProviderModule that provides an empty BuildConfigProvider that can override the Provider using BindsOptionalOf in the data module. Then, by overriding that setting in the AppModule, app-android was able to return values from BuildConfig while providing an empty BuildConfigProvider in the test. I think this also makes all the test code PASS. In my environment, I passed all of them. What do you think of this?

github-actions[bot] commented 1 year ago
Snapshot diff report File name Image
AboutScreenTest.chec
kScrollShot_3_compar
e.png
AboutScreenTest.chec
kScrollShot_2_compar
e.png
github-actions[bot] commented 1 year ago

Test Results

211 tests   211 :heavy_check_mark:  7m 49s :stopwatch: βŸβ€„11 suitesβ€ƒβ€ƒβŸβ€„βŸβ€„0 :zzz: βŸβ€„11 filesβ€„β€‚β€ƒβ€ƒβŸβ€„βŸβ€„0 :x:

Results for commit 4db99a16.

takahirom commented 1 year ago

@matsumo0922 For your reference, the issue is fixed now! πŸ‘

syarihu commented 1 year ago

Thanks for your review and merge!