From d1e2a903b444e3d33fa01fa355b4d29469e00245 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 13 Jun 2022 16:36:32 +0200 Subject: [PATCH] Add test for the notification settings. --- .../ui/robot/settings/SettingsNotificationsRobot.kt | 10 ++++++++++ vector/src/main/res/values/strings.xml | 2 +- .../src/main/res/xml/vector_settings_notifications.xml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsNotificationsRobot.kt b/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsNotificationsRobot.kt index 0f54983fcb..5858e78a2a 100644 --- a/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsNotificationsRobot.kt +++ b/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsNotificationsRobot.kt @@ -17,6 +17,7 @@ package im.vector.app.ui.robot.settings import androidx.test.espresso.Espresso.pressBack +import com.adevinta.android.barista.assertion.BaristaVisibilityAssertions.assertDisplayed import com.adevinta.android.barista.interaction.BaristaClickInteractions.clickOn import im.vector.app.R import im.vector.app.espresso.tools.clickOnPreference @@ -41,6 +42,15 @@ class SettingsNotificationsRobot { clickOn(R.string.settings_call_notifications_preferences) pressBack() */ + // Email notification. No Emails are configured so we show go to the screen to add email + clickOnPreference(R.string.settings_notification_emails_no_emails) + assertDisplayed(R.string.settings_emails_and_phone_numbers_title) + pressBack() + + // Display the notification method change dialog + clickOnPreference(R.string.settings_notification_method) + pressBack() + clickOnPreference(R.string.settings_notification_troubleshoot) // Give time for the tests to perform Thread.sleep(12_000) diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index e8dbdfb644..38a3f3c935 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -3073,7 +3073,7 @@ Choose how to receive notifications Google Services Background synchronization - Notification method + Notification method Available methods No other method than Google Play Service found. No other method than background synchronization found. diff --git a/vector/src/main/res/xml/vector_settings_notifications.xml b/vector/src/main/res/xml/vector_settings_notifications.xml index 21590dc0ad..6ca2811a72 100644 --- a/vector/src/main/res/xml/vector_settings_notifications.xml +++ b/vector/src/main/res/xml/vector_settings_notifications.xml @@ -55,7 +55,7 @@ android:dependency="SETTINGS_ENABLE_THIS_DEVICE_PREFERENCE_KEY" android:key="SETTINGS_UNIFIED_PUSH_RE_REGISTER_KEY" android:persistent="false" - android:title="@string/settings_unifiedpush_reregister" /> + android:title="@string/settings_notification_method" />