Benoit Marty
6 months ago
committed by
Benoit Marty
60 changed files with 355 additions and 141 deletions
@ -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) |
||||
} |
@ -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() |
||||
} |
||||
} |
@ -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) |
||||
} |
@ -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) |
||||
} |
||||
} |
||||
} |
||||
} |
@ -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> |
@ -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> |
@ -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> |
@ -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> |
@ -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> |
@ -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> |
@ -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> |
@ -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> |
Loading…
Reference in new issue