Browse Source

Create dedicated module for notification troubleshoot.

pull/2596/head
Benoit Marty 6 months ago committed by Benoit Marty
parent
commit
cb435c523b
  1. 1
      features/preferences/impl/build.gradle.kts
  2. 12
      features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/PreferencesFlowNode.kt
  3. 8
      features/preferences/impl/src/main/res/values-be/translations.xml
  4. 8
      features/preferences/impl/src/main/res/values-cs/translations.xml
  5. 8
      features/preferences/impl/src/main/res/values-de/translations.xml
  6. 8
      features/preferences/impl/src/main/res/values-fr/translations.xml
  7. 8
      features/preferences/impl/src/main/res/values-hu/translations.xml
  8. 8
      features/preferences/impl/src/main/res/values-in/translations.xml
  9. 8
      features/preferences/impl/src/main/res/values-ru/translations.xml
  10. 8
      features/preferences/impl/src/main/res/values-sk/translations.xml
  11. 8
      features/preferences/impl/src/main/res/values/localazy.xml
  12. 1
      libraries/permissions/impl/build.gradle.kts
  13. 6
      libraries/permissions/impl/src/main/kotlin/io/element/android/libraries/permissions/impl/troubleshoot/NotificationTroubleshootCheckPermissionTest.kt
  14. 1
      libraries/permissions/impl/src/test/kotlin/io/element/android/libraries/permissions/impl/troubleshoot/NotificationTroubleshootCheckPermissionTestTest.kt
  15. 1
      libraries/push/impl/build.gradle.kts
  16. 6
      libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/troubleshoot/CurrentPushProviderTest.kt
  17. 6
      libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/troubleshoot/NotificationTest.kt
  18. 6
      libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/troubleshoot/PushLoopbackTest.kt
  19. 6
      libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/troubleshoot/PushProvidersTest.kt
  20. 2
      libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/troubleshoot/CurrentPushProviderTestTest.kt
  21. 2
      libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/troubleshoot/NotificationTestTest.kt
  22. 2
      libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/troubleshoot/PushLoopbackTestTest.kt
  23. 2
      libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/troubleshoot/PushProvidersTestTest.kt
  24. 1
      libraries/pushproviders/firebase/build.gradle.kts
  25. 8
      libraries/pushproviders/firebase/src/main/kotlin/io/element/android/libraries/pushproviders/firebase/troubleshoot/FirebaseAvailabilityTest.kt
  26. 8
      libraries/pushproviders/firebase/src/main/kotlin/io/element/android/libraries/pushproviders/firebase/troubleshoot/FirebaseTokenTest.kt
  27. 2
      libraries/pushproviders/firebase/src/test/kotlin/io/element/android/libraries/pushproviders/firebase/troubleshoot/FirebaseAvailabilityTestTest.kt
  28. 2
      libraries/pushproviders/firebase/src/test/kotlin/io/element/android/libraries/pushproviders/firebase/troubleshoot/FirebaseTokenTestTest.kt
  29. 1
      libraries/pushproviders/unifiedpush/build.gradle.kts
  30. 8
      libraries/pushproviders/unifiedpush/src/main/kotlin/io/element/android/libraries/pushproviders/unifiedpush/troubleshoot/UnifiedPushTest.kt
  31. 2
      libraries/pushproviders/unifiedpush/src/test/kotlin/io/element/android/libraries/pushproviders/unifiedpush/troubleshoot/UnifiedPushTestTest.kt
  32. 28
      libraries/troubleshoot/api/build.gradle.kts
  33. 35
      libraries/troubleshoot/api/src/main/kotlin/io/element/android/libraries/troubleshoot/api/NotificationTroubleShootEntryPoint.kt
  34. 2
      libraries/troubleshoot/api/src/main/kotlin/io/element/android/libraries/troubleshoot/api/test/NotificationTroubleshootTest.kt
  35. 2
      libraries/troubleshoot/api/src/main/kotlin/io/element/android/libraries/troubleshoot/api/test/NotificationTroubleshootTestDelegate.kt
  36. 2
      libraries/troubleshoot/api/src/main/kotlin/io/element/android/libraries/troubleshoot/api/test/NotificationTroubleshootTestState.kt
  37. 2
      libraries/troubleshoot/api/src/main/kotlin/io/element/android/libraries/troubleshoot/api/test/TestFilterData.kt
  38. 58
      libraries/troubleshoot/impl/build.gradle.kts
  39. 44
      libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/DefaultNotificationTroubleShootEntryPoint.kt
  40. 2
      libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootNotificationsEvents.kt
  41. 12
      libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootNotificationsNode.kt
  42. 2
      libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootNotificationsPresenter.kt
  43. 2
      libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootNotificationsState.kt
  44. 4
      libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootNotificationsStateProvider.kt
  45. 7
      libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootNotificationsView.kt
  46. 8
      libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootTestSuite.kt
  47. 4
      libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootTestSuiteState.kt
  48. 11
      libraries/troubleshoot/impl/src/main/res/values-be/translations.xml
  49. 11
      libraries/troubleshoot/impl/src/main/res/values-cs/translations.xml
  50. 11
      libraries/troubleshoot/impl/src/main/res/values-de/translations.xml
  51. 11
      libraries/troubleshoot/impl/src/main/res/values-fr/translations.xml
  52. 11
      libraries/troubleshoot/impl/src/main/res/values-hu/translations.xml
  53. 11
      libraries/troubleshoot/impl/src/main/res/values-ru/translations.xml
  54. 11
      libraries/troubleshoot/impl/src/main/res/values-sk/translations.xml
  55. 11
      libraries/troubleshoot/impl/src/main/res/values/localazy.xml
  56. 6
      libraries/troubleshoot/impl/src/test/kotlin/io/element/android/libraries/troubleshoot/impl/FakeNotificationTroubleshootTest.kt
  57. 8
      libraries/troubleshoot/impl/src/test/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootNotificationsPresenterTests.kt
  58. 14
      libraries/troubleshoot/impl/src/test/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootNotificationsViewTest.kt
  59. 1
      plugins/src/main/kotlin/extension/DependencyHandleScope.kt
  60. 7
      tools/localazy/config.json

1
features/preferences/impl/build.gradle.kts

@ -49,6 +49,7 @@ dependencies { @@ -49,6 +49,7 @@ dependencies {
implementation(projects.libraries.pushstore.api)
implementation(projects.libraries.indicator.api)
implementation(projects.libraries.preferences.api)
implementation(projects.libraries.troubleshoot.api)
implementation(projects.libraries.testtags)
implementation(projects.libraries.uiStrings)
implementation(projects.libraries.matrixui)

12
features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/PreferencesFlowNode.kt

@ -24,6 +24,7 @@ import com.bumble.appyx.core.node.Node @@ -24,6 +24,7 @@ import com.bumble.appyx.core.node.Node
import com.bumble.appyx.core.plugin.Plugin
import com.bumble.appyx.core.plugin.plugins
import com.bumble.appyx.navmodel.backstack.BackStack
import com.bumble.appyx.navmodel.backstack.operation.pop
import com.bumble.appyx.navmodel.backstack.operation.push
import dagger.assisted.Assisted
import dagger.assisted.AssistedInject
@ -39,7 +40,6 @@ import io.element.android.features.preferences.impl.developer.DeveloperSettingsN @@ -39,7 +40,6 @@ import io.element.android.features.preferences.impl.developer.DeveloperSettingsN
import io.element.android.features.preferences.impl.developer.tracing.ConfigureTracingNode
import io.element.android.features.preferences.impl.notifications.NotificationSettingsNode
import io.element.android.features.preferences.impl.notifications.edit.EditDefaultNotificationSettingNode
import io.element.android.features.preferences.impl.notifications.troubleshoot.TroubleshootNotificationsNode
import io.element.android.features.preferences.impl.root.PreferencesRootNode
import io.element.android.features.preferences.impl.user.editprofile.EditUserProfileNode
import io.element.android.libraries.architecture.BackstackView
@ -48,6 +48,7 @@ import io.element.android.libraries.architecture.createNode @@ -48,6 +48,7 @@ import io.element.android.libraries.architecture.createNode
import io.element.android.libraries.di.SessionScope
import io.element.android.libraries.matrix.api.core.RoomId
import io.element.android.libraries.matrix.api.user.MatrixUser
import io.element.android.libraries.troubleshoot.api.NotificationTroubleShootEntryPoint
import kotlinx.parcelize.Parcelize
@ContributesNode(SessionScope::class)
@ -55,6 +56,7 @@ class PreferencesFlowNode @AssistedInject constructor( @@ -55,6 +56,7 @@ class PreferencesFlowNode @AssistedInject constructor(
@Assisted buildContext: BuildContext,
@Assisted plugins: List<Plugin>,
private val lockScreenEntryPoint: LockScreenEntryPoint,
private val notificationTroubleShootEntryPoint: NotificationTroubleShootEntryPoint,
private val logoutEntryPoint: LogoutEntryPoint,
) : BaseFlowNode<PreferencesFlowNode.NavTarget>(
backstack = BackStack(
@ -189,7 +191,13 @@ class PreferencesFlowNode @AssistedInject constructor( @@ -189,7 +191,13 @@ class PreferencesFlowNode @AssistedInject constructor(
createNode<NotificationSettingsNode>(buildContext, listOf(notificationSettingsCallback))
}
NavTarget.TroubleshootNotifications -> {
createNode<TroubleshootNotificationsNode>(buildContext)
notificationTroubleShootEntryPoint.nodeBuilder(this, buildContext)
.callback(object : NotificationTroubleShootEntryPoint.Callback {
override fun onDone() {
backstack.pop()
}
})
.build()
}
is NavTarget.EditDefaultNotificationSetting -> {
val callback = object : EditDefaultNotificationSettingNode.Callback {

8
features/preferences/impl/src/main/res/values-be/translations.xml

@ -51,12 +51,4 @@ @@ -51,12 +51,4 @@
<string name="screen_notification_settings_title">"Апавяшчэнні"</string>
<string name="troubleshoot_notifications_entry_point_section">"Выпраўленне непаладак"</string>
<string name="troubleshoot_notifications_entry_point_title">"Выпраўленне непаладак з апавяшчэннямі"</string>
<string name="troubleshoot_notifications_screen_action">"Запусціць тэсты"</string>
<string name="troubleshoot_notifications_screen_action_again">"Запусціце тэсты яшчэ раз"</string>
<string name="troubleshoot_notifications_screen_failure">"Некаторыя тэсты не ўдаліся. Калі ласка, праглядзіце дэталі."</string>
<string name="troubleshoot_notifications_screen_notice">"Запусціце тэсты, каб выявіць праблемы ў вашай канфігурацыі, з-за якіх апавяшчэння могуць паводзіць сябе не так, як чакалася."</string>
<string name="troubleshoot_notifications_screen_quick_fix_action">"Спроба выпраўлення"</string>
<string name="troubleshoot_notifications_screen_success">"Усе тэсты паспяхова пройдзены."</string>
<string name="troubleshoot_notifications_screen_title">"Выпраўленне непаладак з апавяшчэннямі"</string>
<string name="troubleshoot_notifications_screen_waiting">"Некаторыя тэсты патрабуюць вашай увагі. Калі ласка, праглядзіце дэталі."</string>
</resources>

8
features/preferences/impl/src/main/res/values-cs/translations.xml

@ -53,12 +53,4 @@ Pokud budete pokračovat, některá nastavení se mohou změnit."</string> @@ -53,12 +53,4 @@ Pokud budete pokračovat, některá nastavení se mohou změnit."</string>
<string name="screen_notification_settings_title">"Oznámení"</string>
<string name="troubleshoot_notifications_entry_point_section">"Odstraňování problémů"</string>
<string name="troubleshoot_notifications_entry_point_title">"Odstraňování problémů s upozorněními"</string>
<string name="troubleshoot_notifications_screen_action">"Spustit testy"</string>
<string name="troubleshoot_notifications_screen_action_again">"Spustit testy znovu"</string>
<string name="troubleshoot_notifications_screen_failure">"Některé testy selhaly. Zkontrolujte prosím podrobnosti."</string>
<string name="troubleshoot_notifications_screen_notice">"Spusťte testy, abyste zjistili jakýkoli problém ve vaší konfiguraci, který může způsobit, že se oznámení nebudou chovat podle očekávání."</string>
<string name="troubleshoot_notifications_screen_quick_fix_action">"Pokus o opravu"</string>
<string name="troubleshoot_notifications_screen_success">"Všechny testy proběhly úspěšně."</string>
<string name="troubleshoot_notifications_screen_title">"Odstraňování problémů s upozorněními"</string>
<string name="troubleshoot_notifications_screen_waiting">"Některé testy vyžadují vaši pozornost. Zkontrolujte prosím podrobnosti."</string>
</resources>

8
features/preferences/impl/src/main/res/values-de/translations.xml

@ -51,12 +51,4 @@ Wenn du fortfährst, können sich einige deiner Einstellungen ändern."</string> @@ -51,12 +51,4 @@ Wenn du fortfährst, können sich einige deiner Einstellungen ändern."</string>
<string name="screen_notification_settings_title">"Benachrichtigungen"</string>
<string name="troubleshoot_notifications_entry_point_section">"Fehlerbehebung"</string>
<string name="troubleshoot_notifications_entry_point_title">"Fehlerbehebung für Benachrichtigungen"</string>
<string name="troubleshoot_notifications_screen_action">"Tests durchführen"</string>
<string name="troubleshoot_notifications_screen_action_again">"Tests erneut durchführen"</string>
<string name="troubleshoot_notifications_screen_failure">"Einige Tests sind fehlgeschlagen. Bitte überprüfe die Details."</string>
<string name="troubleshoot_notifications_screen_notice">"Führe die Tests durch, um Probleme zu erkennen, die dazu führen können, dass sich die Benachrichtigungen nicht wie erwartet verhalten."</string>
<string name="troubleshoot_notifications_screen_quick_fix_action">"Versuche das Problem zu beheben"</string>
<string name="troubleshoot_notifications_screen_success">"Alle Tests wurden erfolgreich bestanden."</string>
<string name="troubleshoot_notifications_screen_title">"Fehlerbehebung für Benachrichtigungen"</string>
<string name="troubleshoot_notifications_screen_waiting">"Einige Tests erfordern deine Aufmerksamkeit. Bitte überprüfe die Details."</string>
</resources>

8
features/preferences/impl/src/main/res/values-fr/translations.xml

@ -51,12 +51,4 @@ Si vous continuez, il est possible que certains de vos paramètres soient modifi @@ -51,12 +51,4 @@ Si vous continuez, il est possible que certains de vos paramètres soient modifi
<string name="screen_notification_settings_title">"Notifications"</string>
<string name="troubleshoot_notifications_entry_point_section">"Dépannage"</string>
<string name="troubleshoot_notifications_entry_point_title">"Résoudre les problèmes liés aux notifications"</string>
<string name="troubleshoot_notifications_screen_action">"Exécuter les tests"</string>
<string name="troubleshoot_notifications_screen_action_again">"Relancer les tests"</string>
<string name="troubleshoot_notifications_screen_failure">"Certains tests ont échoué. Veuillez vérifier les détails."</string>
<string name="troubleshoot_notifications_screen_notice">"Exécuter les tests pour détecter tout problème dans votre configuration susceptible de provoquer un dysfonctionnement des notifications."</string>
<string name="troubleshoot_notifications_screen_quick_fix_action">"Tenter de corriger"</string>
<string name="troubleshoot_notifications_screen_success">"Tous les tests ont réussi."</string>
<string name="troubleshoot_notifications_screen_title">"Dépanner les notifications"</string>
<string name="troubleshoot_notifications_screen_waiting">"Certains tests nécessitent votre attention. Veuillez vérifier les détails."</string>
</resources>

8
features/preferences/impl/src/main/res/values-hu/translations.xml

@ -51,12 +51,4 @@ Ha folytatja, egyes beállítások megváltozhatnak."</string> @@ -51,12 +51,4 @@ Ha folytatja, egyes beállítások megváltozhatnak."</string>
<string name="screen_notification_settings_title">"Értesítések"</string>
<string name="troubleshoot_notifications_entry_point_section">"Hibaelhárítás"</string>
<string name="troubleshoot_notifications_entry_point_title">"Értesítések hibaelhárítása"</string>
<string name="troubleshoot_notifications_screen_action">"Tesztek futtatása"</string>
<string name="troubleshoot_notifications_screen_action_again">"Tesztek újbóli futtatása"</string>
<string name="troubleshoot_notifications_screen_failure">"Egyes tesztek sikertelenek voltak. Ellenőrizze a részleteket."</string>
<string name="troubleshoot_notifications_screen_notice">"A tesztek futtatása, hogy észlelje a konfigurációban felmerülő olyan problémákat, amelyek miatt az értesítések nem az elvárt módon viselkednek."</string>
<string name="troubleshoot_notifications_screen_quick_fix_action">"Kísérlet a javításra"</string>
<string name="troubleshoot_notifications_screen_success">"Minden teszt sikeresen lezajlott."</string>
<string name="troubleshoot_notifications_screen_title">"Értesítések hibaelhárítása"</string>
<string name="troubleshoot_notifications_screen_waiting">"Egyes tesztek a figyelmét igénylik. Ellenőrizze a részleteket."</string>
</resources>

8
features/preferences/impl/src/main/res/values-in/translations.xml

@ -53,12 +53,4 @@ Jika Anda melanjutkan, beberapa pengaturan Anda dapat berubah."</string> @@ -53,12 +53,4 @@ Jika Anda melanjutkan, beberapa pengaturan Anda dapat berubah."</string>
<string name="screen_notification_settings_title">"Notifikasi"</string>
<string name="troubleshoot_notifications_entry_point_section">"Pemecahan masalah"</string>
<string name="troubleshoot_notifications_entry_point_title">"Pecahkan masalah notifikasi"</string>
<string name="troubleshoot_notifications_screen_action">"Jalankan tes"</string>
<string name="troubleshoot_notifications_screen_action_again">"Jalankan tes lagi"</string>
<string name="troubleshoot_notifications_screen_failure">"Beberapa tes gagal. Silakan periksa detailnya."</string>
<string name="troubleshoot_notifications_screen_notice">"Jalankan pengujian untuk mendeteksi masalah apa pun dalam konfigurasi Anda yang mungkin membuat notifikasi tidak berperilaku seperti yang diharapkan."</string>
<string name="troubleshoot_notifications_screen_quick_fix_action">"Mencoba untuk memperbaiki"</string>
<string name="troubleshoot_notifications_screen_success">"Semua tes berhasil dilalui."</string>
<string name="troubleshoot_notifications_screen_title">"Pecahkan masalah notifikasi"</string>
<string name="troubleshoot_notifications_screen_waiting">"Beberapa tes membutuhkan perhatian Anda. Silakan periksa detailnya."</string>
</resources>

8
features/preferences/impl/src/main/res/values-ru/translations.xml

@ -51,12 +51,4 @@ @@ -51,12 +51,4 @@
<string name="screen_notification_settings_title">"Уведомления"</string>
<string name="troubleshoot_notifications_entry_point_section">"Устранение неполадок"</string>
<string name="troubleshoot_notifications_entry_point_title">"Уведомления об устранении неполадок"</string>
<string name="troubleshoot_notifications_screen_action">"Выполнение тестов"</string>
<string name="troubleshoot_notifications_screen_action_again">"Повторное выполнение тестов"</string>
<string name="troubleshoot_notifications_screen_failure">"Некоторые тесты провалились. Пожалуйста, проверьте детали."</string>
<string name="troubleshoot_notifications_screen_notice">"Выполните тесты, чтобы обнаружить любую проблему в конфигурации, из-за которой уведомления могут работать не так, как ожидалось."</string>
<string name="troubleshoot_notifications_screen_quick_fix_action">"Попытка исправить"</string>
<string name="troubleshoot_notifications_screen_success">"Все тесты прошли успешно."</string>
<string name="troubleshoot_notifications_screen_title">"Уведомления об устранении неполадок"</string>
<string name="troubleshoot_notifications_screen_waiting">"Некоторые тесты требуют вашего внимания. Пожалуйста, проверьте детали."</string>
</resources>

8
features/preferences/impl/src/main/res/values-sk/translations.xml

@ -53,12 +53,4 @@ Ak budete pokračovať, niektoré z vašich nastavení sa môžu zmeniť."</stri @@ -53,12 +53,4 @@ Ak budete pokračovať, niektoré z vašich nastavení sa môžu zmeniť."</stri
<string name="screen_notification_settings_title">"Oznámenia"</string>
<string name="troubleshoot_notifications_entry_point_section">"Riešenie problémov"</string>
<string name="troubleshoot_notifications_entry_point_title">"Oznámenia riešení problémov"</string>
<string name="troubleshoot_notifications_screen_action">"Spustiť testy"</string>
<string name="troubleshoot_notifications_screen_action_again">"Spustiť testy znova"</string>
<string name="troubleshoot_notifications_screen_failure">"Niektoré testy zlyhali. Skontrolujte prosím podrobnosti."</string>
<string name="troubleshoot_notifications_screen_notice">"Spustite testy, aby ste zistili akýkoľvek problém vo vašej konfigurácii, ktorý môže spôsobiť, že sa upozornenia nebudú správať podľa očakávania."</string>
<string name="troubleshoot_notifications_screen_quick_fix_action">"Pokus o opravu"</string>
<string name="troubleshoot_notifications_screen_success">"Všetky testy prebehli úspešne."</string>
<string name="troubleshoot_notifications_screen_title">"Oznámenia riešení problémov"</string>
<string name="troubleshoot_notifications_screen_waiting">"Niektoré testy si vyžadujú vašu pozornosť. Prosím skontrolujte podrobnosti."</string>
</resources>

8
features/preferences/impl/src/main/res/values/localazy.xml

@ -51,12 +51,4 @@ If you proceed, some of your settings may change."</string> @@ -51,12 +51,4 @@ If you proceed, some of your settings may change."</string>
<string name="screen_notification_settings_title">"Notifications"</string>
<string name="troubleshoot_notifications_entry_point_section">"Troubleshoot"</string>
<string name="troubleshoot_notifications_entry_point_title">"Troubleshoot notifications"</string>
<string name="troubleshoot_notifications_screen_action">"Run tests"</string>
<string name="troubleshoot_notifications_screen_action_again">"Run tests again"</string>
<string name="troubleshoot_notifications_screen_failure">"Some tests failed. Please check the details."</string>
<string name="troubleshoot_notifications_screen_notice">"Run the tests to detect any issue in your configuration that may make notifications not behave as expected."</string>
<string name="troubleshoot_notifications_screen_quick_fix_action">"Attempt to fix"</string>
<string name="troubleshoot_notifications_screen_success">"All tests passed successfully."</string>
<string name="troubleshoot_notifications_screen_title">"Troubleshoot notifications"</string>
<string name="troubleshoot_notifications_screen_waiting">"Some tests require your attention. Please check the details."</string>
</resources>

1
libraries/permissions/impl/build.gradle.kts

@ -46,6 +46,7 @@ dependencies { @@ -46,6 +46,7 @@ dependencies {
implementation(projects.libraries.architecture)
implementation(projects.libraries.matrix.api)
implementation(projects.libraries.matrixui)
implementation(projects.libraries.troubleshoot.api)
implementation(projects.libraries.designsystem)
implementation(projects.libraries.uiStrings)
implementation(projects.services.toolbox.api)

6
libraries/permissions/impl/src/main/kotlin/io/element/android/libraries/permissions/impl/troubleshoot/NotificationTroubleshootCheckPermissionTest.kt

@ -19,13 +19,13 @@ package io.element.android.libraries.permissions.impl.troubleshoot @@ -19,13 +19,13 @@ package io.element.android.libraries.permissions.impl.troubleshoot
import android.Manifest
import android.os.Build
import com.squareup.anvil.annotations.ContributesMultibinding
import io.element.android.libraries.core.notifications.NotificationTroubleshootTest
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestDelegate
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import io.element.android.libraries.di.AppScope
import io.element.android.libraries.permissions.api.PermissionStateProvider
import io.element.android.libraries.permissions.impl.R
import io.element.android.libraries.permissions.impl.action.PermissionActions
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTest
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestDelegate
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestState
import io.element.android.services.toolbox.api.sdk.BuildVersionSdkIntProvider
import io.element.android.services.toolbox.api.strings.StringProvider
import kotlinx.coroutines.CoroutineScope

1
libraries/permissions/impl/src/test/kotlin/io/element/android/libraries/permissions/impl/troubleshoot/NotificationTroubleshootCheckPermissionTestTest.kt

@ -19,7 +19,6 @@ package io.element.android.libraries.permissions.impl.troubleshoot @@ -19,7 +19,6 @@ package io.element.android.libraries.permissions.impl.troubleshoot
import android.os.Build
import app.cash.turbine.test
import com.google.common.truth.Truth.assertThat
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import io.element.android.libraries.permissions.impl.FakePermissionStateProvider
import io.element.android.libraries.permissions.impl.action.FakePermissionActions
import io.element.android.services.toolbox.test.sdk.FakeBuildVersionSdkIntProvider

1
libraries/push/impl/build.gradle.kts

@ -53,6 +53,7 @@ dependencies { @@ -53,6 +53,7 @@ dependencies {
implementation(projects.libraries.matrix.api)
implementation(projects.libraries.matrixui)
implementation(projects.libraries.uiStrings)
implementation(projects.libraries.troubleshoot.api)
api(projects.libraries.pushproviders.api)
api(projects.libraries.pushstore.api)
api(projects.libraries.push.api)

6
libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/troubleshoot/CurrentPushProviderTest.kt

@ -17,12 +17,12 @@ @@ -17,12 +17,12 @@
package io.element.android.libraries.push.impl.troubleshoot
import com.squareup.anvil.annotations.ContributesMultibinding
import io.element.android.libraries.core.notifications.NotificationTroubleshootTest
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestDelegate
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import io.element.android.libraries.di.AppScope
import io.element.android.libraries.push.api.GetCurrentPushProvider
import io.element.android.libraries.push.impl.R
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTest
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestDelegate
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestState
import io.element.android.services.toolbox.api.strings.StringProvider
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.StateFlow

6
libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/troubleshoot/NotificationTest.kt

@ -17,13 +17,13 @@ @@ -17,13 +17,13 @@
package io.element.android.libraries.push.impl.troubleshoot
import com.squareup.anvil.annotations.ContributesMultibinding
import io.element.android.libraries.core.notifications.NotificationTroubleshootTest
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestDelegate
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import io.element.android.libraries.di.AppScope
import io.element.android.libraries.push.impl.R
import io.element.android.libraries.push.impl.notifications.NotificationDisplayer
import io.element.android.libraries.push.impl.notifications.factories.NotificationCreator
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTest
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestDelegate
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestState
import io.element.android.services.toolbox.api.strings.StringProvider
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.StateFlow

6
libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/troubleshoot/PushLoopbackTest.kt

@ -17,13 +17,13 @@ @@ -17,13 +17,13 @@
package io.element.android.libraries.push.impl.troubleshoot
import com.squareup.anvil.annotations.ContributesMultibinding
import io.element.android.libraries.core.notifications.NotificationTroubleshootTest
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestDelegate
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import io.element.android.libraries.di.AppScope
import io.element.android.libraries.push.api.PushService
import io.element.android.libraries.push.api.gateway.PushGatewayFailure
import io.element.android.libraries.push.impl.R
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTest
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestDelegate
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestState
import io.element.android.services.toolbox.api.strings.StringProvider
import io.element.android.services.toolbox.api.systemclock.SystemClock
import kotlinx.coroutines.CompletableDeferred

6
libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/troubleshoot/PushProvidersTest.kt

@ -17,12 +17,12 @@ @@ -17,12 +17,12 @@
package io.element.android.libraries.push.impl.troubleshoot
import com.squareup.anvil.annotations.ContributesMultibinding
import io.element.android.libraries.core.notifications.NotificationTroubleshootTest
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestDelegate
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import io.element.android.libraries.di.AppScope
import io.element.android.libraries.push.impl.R
import io.element.android.libraries.pushproviders.api.PushProvider
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTest
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestDelegate
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestState
import io.element.android.services.toolbox.api.strings.StringProvider
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.StateFlow

2
libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/troubleshoot/CurrentPushProviderTestTest.kt

@ -18,8 +18,8 @@ package io.element.android.libraries.push.impl.troubleshoot @@ -18,8 +18,8 @@ package io.element.android.libraries.push.impl.troubleshoot
import app.cash.turbine.test
import com.google.common.truth.Truth.assertThat
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import io.element.android.libraries.push.test.FakeGetCurrentPushProvider
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestState
import io.element.android.services.toolbox.test.strings.FakeStringProvider
import kotlinx.coroutines.launch
import kotlinx.coroutines.test.runTest

2
libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/troubleshoot/NotificationTestTest.kt

@ -18,9 +18,9 @@ package io.element.android.libraries.push.impl.troubleshoot @@ -18,9 +18,9 @@ package io.element.android.libraries.push.impl.troubleshoot
import app.cash.turbine.test
import com.google.common.truth.Truth.assertThat
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import io.element.android.libraries.push.impl.notifications.fake.MockkNotificationCreator
import io.element.android.libraries.push.impl.notifications.fake.MockkNotificationDisplayer
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestState
import io.element.android.services.toolbox.test.strings.FakeStringProvider
import kotlinx.coroutines.launch
import kotlinx.coroutines.test.runTest

2
libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/troubleshoot/PushLoopbackTestTest.kt

@ -18,11 +18,11 @@ package io.element.android.libraries.push.impl.troubleshoot @@ -18,11 +18,11 @@ package io.element.android.libraries.push.impl.troubleshoot
import app.cash.turbine.test
import com.google.common.truth.Truth.assertThat
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import io.element.android.libraries.matrix.test.AN_EXCEPTION
import io.element.android.libraries.matrix.test.A_FAILURE_REASON
import io.element.android.libraries.push.api.gateway.PushGatewayFailure
import io.element.android.libraries.push.test.FakePushService
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestState
import io.element.android.services.toolbox.test.strings.FakeStringProvider
import io.element.android.services.toolbox.test.systemclock.FakeSystemClock
import kotlinx.coroutines.launch

2
libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/troubleshoot/PushProvidersTestTest.kt

@ -18,8 +18,8 @@ package io.element.android.libraries.push.impl.troubleshoot @@ -18,8 +18,8 @@ package io.element.android.libraries.push.impl.troubleshoot
import app.cash.turbine.test
import com.google.common.truth.Truth.assertThat
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import io.element.android.libraries.pushproviders.test.FakePushProvider
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestState
import io.element.android.services.toolbox.test.strings.FakeStringProvider
import kotlinx.coroutines.launch
import kotlinx.coroutines.test.runTest

1
libraries/pushproviders/firebase/build.gradle.kts

@ -41,6 +41,7 @@ dependencies { @@ -41,6 +41,7 @@ dependencies {
implementation(projects.libraries.di)
implementation(projects.libraries.matrix.api)
implementation(projects.libraries.uiStrings)
implementation(projects.libraries.troubleshoot.api)
implementation(projects.services.toolbox.api)
implementation(projects.libraries.pushstore.api)

8
libraries/pushproviders/firebase/src/main/kotlin/io/element/android/libraries/pushproviders/firebase/troubleshoot/FirebaseAvailabilityTest.kt

@ -17,14 +17,14 @@ @@ -17,14 +17,14 @@
package io.element.android.libraries.pushproviders.firebase.troubleshoot
import com.squareup.anvil.annotations.ContributesMultibinding
import io.element.android.libraries.core.notifications.NotificationTroubleshootTest
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestDelegate
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import io.element.android.libraries.core.notifications.TestFilterData
import io.element.android.libraries.di.AppScope
import io.element.android.libraries.pushproviders.firebase.FirebaseConfig
import io.element.android.libraries.pushproviders.firebase.IsPlayServiceAvailable
import io.element.android.libraries.pushproviders.firebase.R
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTest
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestDelegate
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestState
import io.element.android.libraries.troubleshoot.api.test.TestFilterData
import io.element.android.services.toolbox.api.strings.StringProvider
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.StateFlow

8
libraries/pushproviders/firebase/src/main/kotlin/io/element/android/libraries/pushproviders/firebase/troubleshoot/FirebaseTokenTest.kt

@ -17,15 +17,15 @@ @@ -17,15 +17,15 @@
package io.element.android.libraries.pushproviders.firebase.troubleshoot
import com.squareup.anvil.annotations.ContributesMultibinding
import io.element.android.libraries.core.notifications.NotificationTroubleshootTest
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestDelegate
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import io.element.android.libraries.core.notifications.TestFilterData
import io.element.android.libraries.di.AppScope
import io.element.android.libraries.pushproviders.firebase.FirebaseConfig
import io.element.android.libraries.pushproviders.firebase.FirebaseStore
import io.element.android.libraries.pushproviders.firebase.FirebaseTroubleshooter
import io.element.android.libraries.pushproviders.firebase.R
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTest
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestDelegate
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestState
import io.element.android.libraries.troubleshoot.api.test.TestFilterData
import io.element.android.services.toolbox.api.strings.StringProvider
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.StateFlow

2
libraries/pushproviders/firebase/src/test/kotlin/io/element/android/libraries/pushproviders/firebase/troubleshoot/FirebaseAvailabilityTestTest.kt

@ -18,8 +18,8 @@ package io.element.android.libraries.pushproviders.firebase.troubleshoot @@ -18,8 +18,8 @@ package io.element.android.libraries.pushproviders.firebase.troubleshoot
import app.cash.turbine.test
import com.google.common.truth.Truth.assertThat
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import io.element.android.libraries.pushproviders.firebase.IsPlayServiceAvailable
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestState
import io.element.android.services.toolbox.test.strings.FakeStringProvider
import kotlinx.coroutines.launch
import kotlinx.coroutines.test.runTest

2
libraries/pushproviders/firebase/src/test/kotlin/io/element/android/libraries/pushproviders/firebase/troubleshoot/FirebaseTokenTestTest.kt

@ -18,9 +18,9 @@ package io.element.android.libraries.pushproviders.firebase.troubleshoot @@ -18,9 +18,9 @@ package io.element.android.libraries.pushproviders.firebase.troubleshoot
import app.cash.turbine.test
import com.google.common.truth.Truth.assertThat
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import io.element.android.libraries.pushproviders.firebase.FakeFirebaseTroubleshooter
import io.element.android.libraries.pushproviders.firebase.InMemoryFirebaseStore
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestState
import io.element.android.services.toolbox.test.strings.FakeStringProvider
import kotlinx.coroutines.launch
import kotlinx.coroutines.test.runTest

1
libraries/pushproviders/unifiedpush/build.gradle.kts

@ -33,6 +33,7 @@ dependencies { @@ -33,6 +33,7 @@ dependencies {
implementation(projects.libraries.core)
implementation(projects.libraries.matrix.api)
implementation(projects.libraries.uiStrings)
api(projects.libraries.troubleshoot.api)
implementation(projects.libraries.pushstore.api)
implementation(projects.libraries.pushproviders.api)

8
libraries/pushproviders/unifiedpush/src/main/kotlin/io/element/android/libraries/pushproviders/unifiedpush/troubleshoot/UnifiedPushTest.kt

@ -17,14 +17,14 @@ @@ -17,14 +17,14 @@
package io.element.android.libraries.pushproviders.unifiedpush.troubleshoot
import com.squareup.anvil.annotations.ContributesMultibinding
import io.element.android.libraries.core.notifications.NotificationTroubleshootTest
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestDelegate
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import io.element.android.libraries.core.notifications.TestFilterData
import io.element.android.libraries.di.AppScope
import io.element.android.libraries.pushproviders.unifiedpush.R
import io.element.android.libraries.pushproviders.unifiedpush.UnifiedPushConfig
import io.element.android.libraries.pushproviders.unifiedpush.UnifiedPushDistributorProvider
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTest
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestDelegate
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestState
import io.element.android.libraries.troubleshoot.api.test.TestFilterData
import io.element.android.services.toolbox.api.strings.StringProvider
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.StateFlow

2
libraries/pushproviders/unifiedpush/src/test/kotlin/io/element/android/libraries/pushproviders/unifiedpush/troubleshoot/UnifiedPushTestTest.kt

@ -18,8 +18,8 @@ package io.element.android.libraries.pushproviders.unifiedpush.troubleshoot @@ -18,8 +18,8 @@ package io.element.android.libraries.pushproviders.unifiedpush.troubleshoot
import app.cash.turbine.test
import com.google.common.truth.Truth.assertThat
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import io.element.android.libraries.pushproviders.api.Distributor
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestState
import io.element.android.services.toolbox.test.strings.FakeStringProvider
import kotlinx.coroutines.launch
import kotlinx.coroutines.test.runTest

28
libraries/troubleshoot/api/build.gradle.kts

@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
/*
* Copyright (c) 2023 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
id("io.element.android-library")
}
android {
namespace = "io.element.android.libraries.troubleshoot.api"
}
dependencies {
implementation(projects.libraries.architecture)
implementation(libs.androidx.corektx)
implementation(libs.coroutines.core)
}

35
libraries/troubleshoot/api/src/main/kotlin/io/element/android/libraries/troubleshoot/api/NotificationTroubleShootEntryPoint.kt

@ -0,0 +1,35 @@ @@ -0,0 +1,35 @@
/*
* Copyright (c) 2023 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.libraries.troubleshoot.api
import com.bumble.appyx.core.modality.BuildContext
import com.bumble.appyx.core.node.Node
import com.bumble.appyx.core.plugin.Plugin
import io.element.android.libraries.architecture.FeatureEntryPoint
interface NotificationTroubleShootEntryPoint : FeatureEntryPoint {
fun nodeBuilder(parentNode: Node, buildContext: BuildContext): NodeBuilder
interface NodeBuilder {
fun callback(callback: Callback): NodeBuilder
fun build(): Node
}
interface Callback : Plugin {
fun onDone()
}
}

2
libraries/core/src/main/kotlin/io/element/android/libraries/core/notifications/NotificationTroubleshootTest.kt → libraries/troubleshoot/api/src/main/kotlin/io/element/android/libraries/troubleshoot/api/test/NotificationTroubleshootTest.kt

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.element.android.libraries.core.notifications
package io.element.android.libraries.troubleshoot.api.test
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.StateFlow

2
libraries/core/src/main/kotlin/io/element/android/libraries/core/notifications/NotificationTroubleshootTestDelegate.kt → libraries/troubleshoot/api/src/main/kotlin/io/element/android/libraries/troubleshoot/api/test/NotificationTroubleshootTestDelegate.kt

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.element.android.libraries.core.notifications
package io.element.android.libraries.troubleshoot.api.test
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.MutableStateFlow

2
libraries/core/src/main/kotlin/io/element/android/libraries/core/notifications/NotificationTroubleshootTestState.kt → libraries/troubleshoot/api/src/main/kotlin/io/element/android/libraries/troubleshoot/api/test/NotificationTroubleshootTestState.kt

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.element.android.libraries.core.notifications
package io.element.android.libraries.troubleshoot.api.test
data class NotificationTroubleshootTestState(
val name: String,

2
libraries/core/src/main/kotlin/io/element/android/libraries/core/notifications/TestFilterData.kt → libraries/troubleshoot/api/src/main/kotlin/io/element/android/libraries/troubleshoot/api/test/TestFilterData.kt

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.element.android.libraries.core.notifications
package io.element.android.libraries.troubleshoot.api.test
data class TestFilterData(
val currentPushProviderName: String?,

58
libraries/troubleshoot/impl/build.gradle.kts

@ -0,0 +1,58 @@ @@ -0,0 +1,58 @@
/*
* Copyright (c) 2023 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
id("io.element.android-compose-library")
alias(libs.plugins.anvil)
alias(libs.plugins.kotlin.serialization)
}
android {
namespace = "io.element.android.libraries.troubleshoot.impl"
testOptions {
unitTests {
isIncludeAndroidResources = true
}
}
}
anvil {
generateDaggerFactories.set(true)
}
dependencies {
implementation(projects.anvilannotations)
anvil(projects.anvilcodegen)
implementation(libs.dagger)
implementation(projects.libraries.architecture)
implementation(projects.libraries.designsystem)
implementation(projects.libraries.di)
api(projects.libraries.troubleshoot.api)
api(projects.libraries.push.api)
implementation(projects.services.analytics.api)
testImplementation(libs.test.junit)
testImplementation(libs.test.robolectric)
testImplementation(libs.molecule.runtime)
testImplementation(libs.test.truth)
testImplementation(libs.test.turbine)
testImplementation(libs.coroutines.test)
testImplementation(projects.services.analytics.test)
testImplementation(projects.tests.testutils)
testImplementation(projects.libraries.push.test)
testImplementation(libs.androidx.compose.ui.test.junit)
testReleaseImplementation(libs.androidx.compose.ui.test.manifest)
}

44
libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/DefaultNotificationTroubleShootEntryPoint.kt

@ -0,0 +1,44 @@ @@ -0,0 +1,44 @@
/*
* Copyright (c) 2024 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.libraries.troubleshoot.impl
import com.bumble.appyx.core.modality.BuildContext
import com.bumble.appyx.core.node.Node
import com.bumble.appyx.core.plugin.Plugin
import com.squareup.anvil.annotations.ContributesBinding
import io.element.android.libraries.architecture.createNode
import io.element.android.libraries.di.AppScope
import io.element.android.libraries.troubleshoot.api.NotificationTroubleShootEntryPoint
import javax.inject.Inject
@ContributesBinding(AppScope::class)
class DefaultNotificationTroubleShootEntryPoint @Inject constructor() : NotificationTroubleShootEntryPoint {
override fun nodeBuilder(parentNode: Node, buildContext: BuildContext): NotificationTroubleShootEntryPoint.NodeBuilder {
val plugins = ArrayList<Plugin>()
return object : NotificationTroubleShootEntryPoint.NodeBuilder {
override fun callback(callback: NotificationTroubleShootEntryPoint.Callback): NotificationTroubleShootEntryPoint.NodeBuilder {
plugins += callback
return this
}
override fun build(): Node {
return parentNode.createNode<TroubleshootNotificationsNode>(buildContext, plugins)
}
}
}
}

2
features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/troubleshoot/TroubleshootNotificationsEvents.kt → libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootNotificationsEvents.kt

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.element.android.features.preferences.impl.notifications.troubleshoot
package io.element.android.libraries.troubleshoot.impl
sealed interface TroubleshootNotificationsEvents {
data object StartTests : TroubleshootNotificationsEvents

12
features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/troubleshoot/TroubleshootNotificationsNode.kt → libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootNotificationsNode.kt

@ -14,18 +14,20 @@ @@ -14,18 +14,20 @@
* limitations under the License.
*/
package io.element.android.features.preferences.impl.notifications.troubleshoot
package io.element.android.libraries.troubleshoot.impl
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import com.bumble.appyx.core.modality.BuildContext
import com.bumble.appyx.core.node.Node
import com.bumble.appyx.core.plugin.Plugin
import com.bumble.appyx.core.plugin.plugins
import dagger.assisted.Assisted
import dagger.assisted.AssistedInject
import im.vector.app.features.analytics.plan.MobileScreen
import io.element.android.anvilannotations.ContributesNode
import io.element.android.libraries.di.SessionScope
import io.element.android.libraries.troubleshoot.api.NotificationTroubleShootEntryPoint
import io.element.android.services.analytics.api.ScreenTracker
@ContributesNode(SessionScope::class)
@ -35,13 +37,19 @@ class TroubleshootNotificationsNode @AssistedInject constructor( @@ -35,13 +37,19 @@ class TroubleshootNotificationsNode @AssistedInject constructor(
private val presenter: TroubleshootNotificationsPresenter,
private val screenTracker: ScreenTracker,
) : Node(buildContext, plugins = plugins) {
private fun onDone() {
plugins<NotificationTroubleShootEntryPoint.Callback>().forEach {
it.onDone()
}
}
@Composable
override fun View(modifier: Modifier) {
screenTracker.TrackScreen(MobileScreen.ScreenName.NotificationTroubleshoot)
val state = presenter.present()
TroubleshootNotificationsView(
state = state,
onBackPressed = ::navigateUp,
onBackPressed = ::onDone,
modifier = modifier,
)
}

2
features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/troubleshoot/TroubleshootNotificationsPresenter.kt → libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootNotificationsPresenter.kt

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.element.android.features.preferences.impl.notifications.troubleshoot
package io.element.android.libraries.troubleshoot.impl
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect

2
features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/troubleshoot/TroubleshootNotificationsState.kt → libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootNotificationsState.kt

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.element.android.features.preferences.impl.notifications.troubleshoot
package io.element.android.libraries.troubleshoot.impl
data class TroubleshootNotificationsState(
val testSuiteState: TroubleshootTestSuiteState,

4
features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/troubleshoot/TroubleshootNotificationsStateProvider.kt → libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootNotificationsStateProvider.kt

@ -14,10 +14,10 @@ @@ -14,10 +14,10 @@
* limitations under the License.
*/
package io.element.android.features.preferences.impl.notifications.troubleshoot
package io.element.android.libraries.troubleshoot.impl
import androidx.compose.ui.tooling.preview.PreviewParameterProvider
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestState
import kotlinx.collections.immutable.toImmutableList
open class TroubleshootNotificationsStateProvider : PreviewParameterProvider<TroubleshootNotificationsState> {

7
features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/troubleshoot/TroubleshootNotificationsView.kt → libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootNotificationsView.kt

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.element.android.features.preferences.impl.notifications.troubleshoot
package io.element.android.libraries.troubleshoot.impl
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.size
@ -27,10 +27,7 @@ import androidx.compose.ui.unit.dp @@ -27,10 +27,7 @@ import androidx.compose.ui.unit.dp
import androidx.lifecycle.Lifecycle
import io.element.android.compound.theme.ElementTheme
import io.element.android.compound.tokens.generated.CompoundIcons
import io.element.android.features.preferences.impl.R
import io.element.android.libraries.architecture.AsyncAction
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState.Status
import io.element.android.libraries.designsystem.components.list.ListItemContent
import io.element.android.libraries.designsystem.components.preferences.PreferencePage
import io.element.android.libraries.designsystem.preview.ElementPreview
@ -41,6 +38,8 @@ import io.element.android.libraries.designsystem.theme.components.Icon @@ -41,6 +38,8 @@ import io.element.android.libraries.designsystem.theme.components.Icon
import io.element.android.libraries.designsystem.theme.components.ListItem
import io.element.android.libraries.designsystem.theme.components.Text
import io.element.android.libraries.designsystem.utils.OnLifecycleEvent
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestState
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestState.Status
@Composable
fun TroubleshootNotificationsView(

8
features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/troubleshoot/TroubleshootTestSuite.kt → libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootTestSuite.kt

@ -14,14 +14,14 @@ @@ -14,14 +14,14 @@
* limitations under the License.
*/
package io.element.android.features.preferences.impl.notifications.troubleshoot
package io.element.android.libraries.troubleshoot.impl
import im.vector.app.features.analytics.plan.NotificationTroubleshoot
import io.element.android.libraries.architecture.AsyncAction
import io.element.android.libraries.core.notifications.NotificationTroubleshootTest
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import io.element.android.libraries.core.notifications.TestFilterData
import io.element.android.libraries.push.api.GetCurrentPushProvider
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTest
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestState
import io.element.android.libraries.troubleshoot.api.test.TestFilterData
import io.element.android.services.analytics.api.AnalyticsService
import kotlinx.collections.immutable.toImmutableList
import kotlinx.coroutines.CoroutineScope

4
features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/troubleshoot/TroubleshootTestSuiteState.kt → libraries/troubleshoot/impl/src/main/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootTestSuiteState.kt

@ -14,10 +14,10 @@ @@ -14,10 +14,10 @@
* limitations under the License.
*/
package io.element.android.features.preferences.impl.notifications.troubleshoot
package io.element.android.libraries.troubleshoot.impl
import io.element.android.libraries.architecture.AsyncAction
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestState
import kotlinx.collections.immutable.ImmutableList
data class TroubleshootTestSuiteState(

11
libraries/troubleshoot/impl/src/main/res/values-be/translations.xml

@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="troubleshoot_notifications_screen_action">"Запусціць тэсты"</string>
<string name="troubleshoot_notifications_screen_action_again">"Запусціце тэсты яшчэ раз"</string>
<string name="troubleshoot_notifications_screen_failure">"Некаторыя тэсты не ўдаліся. Калі ласка, праглядзіце дэталі."</string>
<string name="troubleshoot_notifications_screen_notice">"Запусціце тэсты, каб выявіць праблемы ў вашай канфігурацыі, з-за якіх апавяшчэння могуць паводзіць сябе не так, як чакалася."</string>
<string name="troubleshoot_notifications_screen_quick_fix_action">"Спроба выпраўлення"</string>
<string name="troubleshoot_notifications_screen_success">"Усе тэсты паспяхова пройдзены."</string>
<string name="troubleshoot_notifications_screen_title">"Выпраўленне непаладак з апавяшчэннямі"</string>
<string name="troubleshoot_notifications_screen_waiting">"Некаторыя тэсты патрабуюць вашай увагі. Калі ласка, праглядзіце дэталі."</string>
</resources>

11
libraries/troubleshoot/impl/src/main/res/values-cs/translations.xml

@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="troubleshoot_notifications_screen_action">"Spustit testy"</string>
<string name="troubleshoot_notifications_screen_action_again">"Spustit testy znovu"</string>
<string name="troubleshoot_notifications_screen_failure">"Některé testy selhaly. Zkontrolujte prosím podrobnosti."</string>
<string name="troubleshoot_notifications_screen_notice">"Spusťte testy, abyste zjistili jakýkoli problém ve vaší konfiguraci, který může způsobit, že se oznámení nebudou chovat podle očekávání."</string>
<string name="troubleshoot_notifications_screen_quick_fix_action">"Pokus o opravu"</string>
<string name="troubleshoot_notifications_screen_success">"Všechny testy proběhly úspěšně."</string>
<string name="troubleshoot_notifications_screen_title">"Odstraňování problémů s upozorněními"</string>
<string name="troubleshoot_notifications_screen_waiting">"Některé testy vyžadují vaši pozornost. Zkontrolujte prosím podrobnosti."</string>
</resources>

11
libraries/troubleshoot/impl/src/main/res/values-de/translations.xml

@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="troubleshoot_notifications_screen_action">"Tests durchführen"</string>
<string name="troubleshoot_notifications_screen_action_again">"Tests erneut durchführen"</string>
<string name="troubleshoot_notifications_screen_failure">"Einige Tests sind fehlgeschlagen. Bitte überprüfe die Details."</string>
<string name="troubleshoot_notifications_screen_notice">"Führe die Tests durch, um Probleme zu erkennen, die dazu führen können, dass sich die Benachrichtigungen nicht wie erwartet verhalten."</string>
<string name="troubleshoot_notifications_screen_quick_fix_action">"Versuche das Problem zu beheben"</string>
<string name="troubleshoot_notifications_screen_success">"Alle Tests wurden erfolgreich bestanden."</string>
<string name="troubleshoot_notifications_screen_title">"Fehlerbehebung für Benachrichtigungen"</string>
<string name="troubleshoot_notifications_screen_waiting">"Einige Tests erfordern deine Aufmerksamkeit. Bitte überprüfe die Details."</string>
</resources>

11
libraries/troubleshoot/impl/src/main/res/values-fr/translations.xml

@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="troubleshoot_notifications_screen_action">"Exécuter les tests"</string>
<string name="troubleshoot_notifications_screen_action_again">"Relancer les tests"</string>
<string name="troubleshoot_notifications_screen_failure">"Certains tests ont échoué. Veuillez vérifier les détails."</string>
<string name="troubleshoot_notifications_screen_notice">"Exécuter les tests pour détecter tout problème dans votre configuration susceptible de provoquer un dysfonctionnement des notifications."</string>
<string name="troubleshoot_notifications_screen_quick_fix_action">"Tenter de corriger"</string>
<string name="troubleshoot_notifications_screen_success">"Tous les tests ont réussi."</string>
<string name="troubleshoot_notifications_screen_title">"Dépanner les notifications"</string>
<string name="troubleshoot_notifications_screen_waiting">"Certains tests nécessitent votre attention. Veuillez vérifier les détails."</string>
</resources>

11
libraries/troubleshoot/impl/src/main/res/values-hu/translations.xml

@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="troubleshoot_notifications_screen_action">"Tesztek futtatása"</string>
<string name="troubleshoot_notifications_screen_action_again">"Tesztek újbóli futtatása"</string>
<string name="troubleshoot_notifications_screen_failure">"Egyes tesztek sikertelenek voltak. Ellenőrizze a részleteket."</string>
<string name="troubleshoot_notifications_screen_notice">"A tesztek futtatása, hogy észlelje a konfigurációban felmerülő olyan problémákat, amelyek miatt az értesítések nem az elvárt módon viselkednek."</string>
<string name="troubleshoot_notifications_screen_quick_fix_action">"Kísérlet a javításra"</string>
<string name="troubleshoot_notifications_screen_success">"Minden teszt sikeresen lezajlott."</string>
<string name="troubleshoot_notifications_screen_title">"Értesítések hibaelhárítása"</string>
<string name="troubleshoot_notifications_screen_waiting">"Egyes tesztek a figyelmét igénylik. Ellenőrizze a részleteket."</string>
</resources>

11
libraries/troubleshoot/impl/src/main/res/values-ru/translations.xml

@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="troubleshoot_notifications_screen_action">"Выполнение тестов"</string>
<string name="troubleshoot_notifications_screen_action_again">"Повторное выполнение тестов"</string>
<string name="troubleshoot_notifications_screen_failure">"Некоторые тесты провалились. Пожалуйста, проверьте детали."</string>
<string name="troubleshoot_notifications_screen_notice">"Выполните тесты, чтобы обнаружить любую проблему в конфигурации, из-за которой уведомления могут работать не так, как ожидалось."</string>
<string name="troubleshoot_notifications_screen_quick_fix_action">"Попытка исправить"</string>
<string name="troubleshoot_notifications_screen_success">"Все тесты прошли успешно."</string>
<string name="troubleshoot_notifications_screen_title">"Уведомления об устранении неполадок"</string>
<string name="troubleshoot_notifications_screen_waiting">"Некоторые тесты требуют вашего внимания. Пожалуйста, проверьте детали."</string>
</resources>

11
libraries/troubleshoot/impl/src/main/res/values-sk/translations.xml

@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="troubleshoot_notifications_screen_action">"Spustiť testy"</string>
<string name="troubleshoot_notifications_screen_action_again">"Spustiť testy znova"</string>
<string name="troubleshoot_notifications_screen_failure">"Niektoré testy zlyhali. Skontrolujte prosím podrobnosti."</string>
<string name="troubleshoot_notifications_screen_notice">"Spustite testy, aby ste zistili akýkoľvek problém vo vašej konfigurácii, ktorý môže spôsobiť, že sa upozornenia nebudú správať podľa očakávania."</string>
<string name="troubleshoot_notifications_screen_quick_fix_action">"Pokus o opravu"</string>
<string name="troubleshoot_notifications_screen_success">"Všetky testy prebehli úspešne."</string>
<string name="troubleshoot_notifications_screen_title">"Oznámenia riešení problémov"</string>
<string name="troubleshoot_notifications_screen_waiting">"Niektoré testy si vyžadujú vašu pozornosť. Prosím skontrolujte podrobnosti."</string>
</resources>

11
libraries/troubleshoot/impl/src/main/res/values/localazy.xml

@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="troubleshoot_notifications_screen_action">"Run tests"</string>
<string name="troubleshoot_notifications_screen_action_again">"Run tests again"</string>
<string name="troubleshoot_notifications_screen_failure">"Some tests failed. Please check the details."</string>
<string name="troubleshoot_notifications_screen_notice">"Run the tests to detect any issue in your configuration that may make notifications not behave as expected."</string>
<string name="troubleshoot_notifications_screen_quick_fix_action">"Attempt to fix"</string>
<string name="troubleshoot_notifications_screen_success">"All tests passed successfully."</string>
<string name="troubleshoot_notifications_screen_title">"Troubleshoot notifications"</string>
<string name="troubleshoot_notifications_screen_waiting">"Some tests require your attention. Please check the details."</string>
</resources>

6
features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/notifications/troubleshoot/FakeNotificationTroubleshootTest.kt → libraries/troubleshoot/impl/src/test/kotlin/io/element/android/libraries/troubleshoot/impl/FakeNotificationTroubleshootTest.kt

@ -14,10 +14,10 @@ @@ -14,10 +14,10 @@
* limitations under the License.
*/
package io.element.android.features.preferences.impl.notifications.troubleshoot
package io.element.android.libraries.troubleshoot.impl
import io.element.android.libraries.core.notifications.NotificationTroubleshootTest
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTest
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestState
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow

8
features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/notifications/troubleshoot/TroubleshootNotificationsPresenterTests.kt → libraries/troubleshoot/impl/src/test/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootNotificationsPresenterTests.kt

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 New Vector Ltd
* Copyright (c) 2024 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -14,16 +14,16 @@ @@ -14,16 +14,16 @@
* limitations under the License.
*/
package io.element.android.features.preferences.impl.notifications.troubleshoot
package io.element.android.libraries.troubleshoot.impl
import app.cash.molecule.RecompositionMode
import app.cash.molecule.moleculeFlow
import app.cash.turbine.test
import com.google.common.truth.Truth.assertThat
import io.element.android.libraries.architecture.AsyncAction
import io.element.android.libraries.core.notifications.NotificationTroubleshootTest
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import io.element.android.libraries.push.test.FakeGetCurrentPushProvider
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTest
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTestState
import io.element.android.services.analytics.test.FakeAnalyticsService
import kotlinx.coroutines.test.runTest
import org.junit.Test

14
features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/notifications/troubleshoot/TroubleshootNotificationsViewTest.kt → libraries/troubleshoot/impl/src/test/kotlin/io/element/android/libraries/troubleshoot/impl/TroubleshootNotificationsViewTest.kt

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.element.android.features.preferences.impl.notifications.troubleshoot
package io.element.android.libraries.troubleshoot.impl
import androidx.activity.ComponentActivity
import androidx.compose.ui.test.junit4.AndroidComposeTestRule
@ -69,7 +69,11 @@ class TroubleshootNotificationsViewTest { @@ -69,7 +69,11 @@ class TroubleshootNotificationsViewTest {
val eventsRecorder = EventsRecorder<TroubleshootNotificationsEvents>()
rule.setTroubleshootNotificationsView(
aTroubleshootNotificationsState(
tests = listOf(aTroubleshootTestStateFailure(hasQuickFix = false)),
tests = listOf(
aTroubleshootTestStateFailure(
hasQuickFix = false
)
),
eventSink = eventsRecorder
),
)
@ -88,7 +92,11 @@ class TroubleshootNotificationsViewTest { @@ -88,7 +92,11 @@ class TroubleshootNotificationsViewTest {
val eventsRecorder = EventsRecorder<TroubleshootNotificationsEvents>()
rule.setTroubleshootNotificationsView(
aTroubleshootNotificationsState(
tests = listOf(aTroubleshootTestStateFailure(hasQuickFix = true)),
tests = listOf(
aTroubleshootTestStateFailure(
hasQuickFix = true
)
),
eventSink = eventsRecorder
),
)

1
plugins/src/main/kotlin/extension/DependencyHandleScope.kt

@ -114,6 +114,7 @@ fun DependencyHandlerScope.allLibrariesImpl() { @@ -114,6 +114,7 @@ fun DependencyHandlerScope.allLibrariesImpl() {
implementation(project(":libraries:voicerecorder:impl"))
implementation(project(":libraries:mediaplayer:impl"))
implementation(project(":libraries:mediaviewer:impl"))
implementation(project(":libraries:troubleshoot:impl"))
}
fun DependencyHandlerScope.allServicesImpl() {

7
tools/localazy/config.json

@ -205,7 +205,12 @@ @@ -205,7 +205,12 @@
"screen_edit_profile_.*",
"screen_notification_settings_.*",
"screen_blocked_users_.*",
"troubleshoot_notifications_entry_point_.*",
"troubleshoot_notifications_entry_point_.*"
]
},
{
"name" : ":libraries:troubleshoot:impl",
"includeRegex" : [
"troubleshoot_notifications_screen_.*"
]
},

Loading…
Cancel
Save