From 264f49b02c656a8994c19fcac4d6a9be49439e42 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Fri, 5 Nov 2021 14:41:01 +0000 Subject: [PATCH] moving settings robots to their own pacakge --- .../java/im/vector/app/EspressoExt.kt | 11 +- .../im/vector/app/ui/robot/ElementRobot.kt | 1 + .../im/vector/app/ui/robot/SettingsRobot.kt | 205 ------------------ .../robot/settings/SettingsAdvancedRobot.kt | 47 ++++ .../ui/robot/settings/SettingsGeneralRobot.kt | 50 +++++ .../ui/robot/settings/SettingsHelpRobot.kt | 40 ++++ .../settings/SettingsNotificationsRobot.kt | 52 +++++ .../settings/SettingsPreferencesRobot.kt | 38 ++++ .../app/ui/robot/settings/SettingsRobot.kt | 60 +++++ .../robot/settings/SettingsSecurityRobot.kt | 37 ++++ 10 files changed, 334 insertions(+), 207 deletions(-) delete mode 100644 vector/src/androidTest/java/im/vector/app/ui/robot/SettingsRobot.kt create mode 100644 vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsAdvancedRobot.kt create mode 100644 vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsGeneralRobot.kt create mode 100644 vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsHelpRobot.kt create mode 100644 vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsNotificationsRobot.kt create mode 100644 vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsPreferencesRobot.kt create mode 100644 vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsRobot.kt create mode 100644 vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsSecurityRobot.kt diff --git a/vector/src/androidTest/java/im/vector/app/EspressoExt.kt b/vector/src/androidTest/java/im/vector/app/EspressoExt.kt index 3890ef8ad7..1cefa55e23 100644 --- a/vector/src/androidTest/java/im/vector/app/EspressoExt.kt +++ b/vector/src/androidTest/java/im/vector/app/EspressoExt.kt @@ -18,7 +18,9 @@ package im.vector.app import android.app.Activity import android.view.View +import androidx.annotation.StringRes import androidx.lifecycle.Observer +import androidx.test.espresso.Espresso import androidx.test.espresso.IdlingRegistry import androidx.test.espresso.IdlingResource import androidx.test.espresso.PerformException @@ -32,6 +34,7 @@ import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation import androidx.test.runner.lifecycle.ActivityLifecycleCallback import androidx.test.runner.lifecycle.ActivityLifecycleMonitorRegistry import androidx.test.runner.lifecycle.Stage +import com.adevinta.android.barista.interaction.BaristaClickInteractions import org.hamcrest.Matcher import org.hamcrest.Matchers import org.hamcrest.StringDescription @@ -95,8 +98,6 @@ fun waitForView(viewMatcher: Matcher, timeout: Long = 10_000, waitForDispl } } - - fun initialSyncIdlingResource(session: Session): IdlingResource { val res = object : IdlingResource, Observer { private var callback: IdlingResource.ResourceCallback? = null @@ -209,3 +210,9 @@ fun allSecretsKnownIdling(session: Session): IdlingResource { return res } + +fun clickOnAndGoBack(@StringRes name: Int, block: () -> Unit) { + BaristaClickInteractions.clickOn(name) + block() + Espresso.pressBack() +} diff --git a/vector/src/androidTest/java/im/vector/app/ui/robot/ElementRobot.kt b/vector/src/androidTest/java/im/vector/app/ui/robot/ElementRobot.kt index d242d26aad..9a7f8da7e6 100644 --- a/vector/src/androidTest/java/im/vector/app/ui/robot/ElementRobot.kt +++ b/vector/src/androidTest/java/im/vector/app/ui/robot/ElementRobot.kt @@ -31,6 +31,7 @@ import im.vector.app.features.createdirect.CreateDirectRoomActivity import im.vector.app.features.home.HomeActivity import im.vector.app.features.login.LoginActivity import im.vector.app.initialSyncIdlingResource +import im.vector.app.ui.robot.settings.SettingsRobot import im.vector.app.withIdlingResource class ElementRobot { diff --git a/vector/src/androidTest/java/im/vector/app/ui/robot/SettingsRobot.kt b/vector/src/androidTest/java/im/vector/app/ui/robot/SettingsRobot.kt deleted file mode 100644 index 5b3a786361..0000000000 --- a/vector/src/androidTest/java/im/vector/app/ui/robot/SettingsRobot.kt +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright (c) 2021 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 im.vector.app.ui.robot - -import androidx.annotation.StringRes -import androidx.test.espresso.Espresso.onView -import androidx.test.espresso.Espresso.pressBack -import androidx.test.espresso.matcher.ViewMatchers -import com.adevinta.android.barista.interaction.BaristaClickInteractions.clickOn -import com.adevinta.android.barista.interaction.BaristaDialogInteractions.clickDialogNegativeButton -import com.adevinta.android.barista.interaction.BaristaDialogInteractions.clickDialogPositiveButton -import im.vector.app.BuildConfig -import im.vector.app.R -import im.vector.app.espresso.tools.clickOnPreference -import im.vector.app.waitForView - -class SettingsRobot { - - fun general(block: SettingsGeneralRobot.() -> Unit) { - clickOnAndGoBack(R.string.settings_general_title) { block(SettingsGeneralRobot()) } - } - - fun notifications(block: SettingsNotificationsRobot.() -> Unit) { - clickOnAndGoBack(R.string.settings_notifications) { block(SettingsNotificationsRobot()) } - } - - fun preferences(block: SettingsPreferencesRobot.() -> Unit) { - clickOnAndGoBack(R.string.settings_preferences) { block(SettingsPreferencesRobot()) } - } - - fun voiceAndVideo(block: () -> Unit = {}) { - clickOnAndGoBack(R.string.preference_voice_and_video) { block() } - } - - fun ignoredUsers(block: () -> Unit = {}) { - clickOnAndGoBack(R.string.settings_ignored_users) { block() } - } - - fun securityAndPrivacy(block: SettingsSecurityRobot.() -> Unit) { - clickOnAndGoBack(R.string.settings_security_and_privacy) { block(SettingsSecurityRobot()) } - } - - fun labs(block: () -> Unit = {}) { - clickOnAndGoBack(R.string.room_settings_labs_pref_title) { block() } - } - - fun advancedSettings(block: SettingsAdvancedRobot.() -> Unit) { - clickOnAndGoBack(R.string.settings_advanced_settings) { block(SettingsAdvancedRobot()) } - } - - fun helpAndAbout(block: SettingsHelpRobot.() -> Unit) { - clickOnAndGoBack(R.string.preference_root_help_about) { block(SettingsHelpRobot()) } - } -} - -class SettingsGeneralRobot { - - fun crawl() { - clickOn(R.string.settings_profile_picture) - clickDialogPositiveButton() - clickOn(R.string.settings_display_name) - clickDialogNegativeButton() - clickOn(R.string.settings_password) - clickDialogNegativeButton() - clickOn(R.string.settings_emails_and_phone_numbers_title) - pressBack() - clickOn(R.string.settings_discovery_manage) - clickOn(R.string.add_identity_server) - pressBack() - pressBack() - // Homeserver - clickOnPreference(R.string.settings_home_server) - pressBack() - // Identity server - clickOnPreference(R.string.settings_identity_server) - pressBack() - // Deactivate account - clickOnPreference(R.string.settings_deactivate_my_account) - pressBack() - } -} - -class SettingsNotificationsRobot { - - fun crawl() { - if (BuildConfig.USE_NOTIFICATION_SETTINGS_V2) { - clickOn(R.string.settings_notification_default) - pressBack() - clickOn(R.string.settings_notification_mentions_and_keywords) - // TODO Test adding a keyword? - pressBack() - clickOn(R.string.settings_notification_other) - pressBack() - } else { - clickOn(R.string.settings_notification_advanced) - pressBack() - } - /* - clickOn(R.string.settings_noisy_notifications_preferences) - TODO Cannot go back - pressBack() - clickOn(R.string.settings_silent_notifications_preferences) - pressBack() - clickOn(R.string.settings_call_notifications_preferences) - pressBack() - */ - clickOnPreference(R.string.settings_notification_troubleshoot) - pressBack() - } -} - -class SettingsHelpRobot { - - fun crawl() { - /* - clickOn(R.string.settings_app_info_link_title) - Cannot go back... - pressBack() - clickOn(R.string.settings_copyright) - pressBack() - clickOn(R.string.settings_app_term_conditions) - pressBack() - clickOn(R.string.settings_privacy_policy) - pressBack() - */ - clickOn(R.string.settings_third_party_notices) - clickDialogPositiveButton() - } -} - -class SettingsAdvancedRobot { - - fun crawl() { - clickOnPreference(R.string.settings_notifications_targets) - pressBack() - - clickOnPreference(R.string.settings_push_rules) - pressBack() - - /* TODO P2 test developer screens - // Enable developer mode - clickOnSwitchPreference("SETTINGS_DEVELOPER_MODE_PREFERENCE_KEY") - - clickOnPreference(R.string.settings_account_data) - clickOn("m.push_rules") - pressBack() - pressBack() - clickOnPreference(R.string.settings_key_requests) - pressBack() - - // Disable developer mode - clickOnSwitchPreference("SETTINGS_DEVELOPER_MODE_PREFERENCE_KEY") - */ - } -} - -class SettingsSecurityRobot { - - fun crawl() { - clickOnPreference(R.string.settings_active_sessions_show_all) - pressBack() - - clickOnPreference(R.string.encryption_message_recovery) - // TODO go deeper here - pressBack() - /* Cannot exit - clickOnPreference(R.string.encryption_export_e2e_room_keys) - pressBack() - */ - } -} - -class SettingsPreferencesRobot { - - fun crawl() { - clickOn(R.string.settings_interface_language) - onView(ViewMatchers.isRoot()) - .perform(waitForView(ViewMatchers.withText("Dansk (Danmark)"))) - pressBack() - clickOn(R.string.settings_theme) - clickDialogNegativeButton() - clickOn(R.string.font_size) - clickDialogNegativeButton() - } -} - -fun clickOnAndGoBack(@StringRes name: Int, block: () -> Unit) { - clickOn(name) - block() - pressBack() -} diff --git a/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsAdvancedRobot.kt b/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsAdvancedRobot.kt new file mode 100644 index 0000000000..79ab4e8cd7 --- /dev/null +++ b/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsAdvancedRobot.kt @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2021 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 im.vector.app.ui.robot.settings + +import androidx.test.espresso.Espresso +import im.vector.app.R +import im.vector.app.espresso.tools.clickOnPreference + +class SettingsAdvancedRobot { + + fun crawl() { + clickOnPreference(R.string.settings_notifications_targets) + Espresso.pressBack() + + clickOnPreference(R.string.settings_push_rules) + Espresso.pressBack() + + /* TODO P2 test developer screens + // Enable developer mode + clickOnSwitchPreference("SETTINGS_DEVELOPER_MODE_PREFERENCE_KEY") + + clickOnPreference(R.string.settings_account_data) + clickOn("m.push_rules") + pressBack() + pressBack() + clickOnPreference(R.string.settings_key_requests) + pressBack() + + // Disable developer mode + clickOnSwitchPreference("SETTINGS_DEVELOPER_MODE_PREFERENCE_KEY") + */ + } +} diff --git a/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsGeneralRobot.kt b/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsGeneralRobot.kt new file mode 100644 index 0000000000..067544f543 --- /dev/null +++ b/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsGeneralRobot.kt @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2021 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 im.vector.app.ui.robot.settings + +import androidx.test.espresso.Espresso +import com.adevinta.android.barista.interaction.BaristaClickInteractions +import com.adevinta.android.barista.interaction.BaristaDialogInteractions +import im.vector.app.R +import im.vector.app.espresso.tools.clickOnPreference + +class SettingsGeneralRobot { + + fun crawl() { + BaristaClickInteractions.clickOn(R.string.settings_profile_picture) + BaristaDialogInteractions.clickDialogPositiveButton() + BaristaClickInteractions.clickOn(R.string.settings_display_name) + BaristaDialogInteractions.clickDialogNegativeButton() + BaristaClickInteractions.clickOn(R.string.settings_password) + BaristaDialogInteractions.clickDialogNegativeButton() + BaristaClickInteractions.clickOn(R.string.settings_emails_and_phone_numbers_title) + Espresso.pressBack() + BaristaClickInteractions.clickOn(R.string.settings_discovery_manage) + BaristaClickInteractions.clickOn(R.string.add_identity_server) + Espresso.pressBack() + Espresso.pressBack() + // Homeserver + clickOnPreference(R.string.settings_home_server) + Espresso.pressBack() + // Identity server + clickOnPreference(R.string.settings_identity_server) + Espresso.pressBack() + // Deactivate account + clickOnPreference(R.string.settings_deactivate_my_account) + Espresso.pressBack() + } +} diff --git a/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsHelpRobot.kt b/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsHelpRobot.kt new file mode 100644 index 0000000000..868f48ed91 --- /dev/null +++ b/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsHelpRobot.kt @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2021 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 im.vector.app.ui.robot.settings + +import com.adevinta.android.barista.interaction.BaristaClickInteractions +import com.adevinta.android.barista.interaction.BaristaDialogInteractions +import im.vector.app.R + +class SettingsHelpRobot { + + fun crawl() { + /* + clickOn(R.string.settings_app_info_link_title) + Cannot go back... + pressBack() + clickOn(R.string.settings_copyright) + pressBack() + clickOn(R.string.settings_app_term_conditions) + pressBack() + clickOn(R.string.settings_privacy_policy) + pressBack() + */ + BaristaClickInteractions.clickOn(R.string.settings_third_party_notices) + BaristaDialogInteractions.clickDialogPositiveButton() + } +} 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 new file mode 100644 index 0000000000..07e3e40576 --- /dev/null +++ b/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsNotificationsRobot.kt @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2021 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 im.vector.app.ui.robot.settings + +import androidx.test.espresso.Espresso +import com.adevinta.android.barista.interaction.BaristaClickInteractions +import im.vector.app.BuildConfig +import im.vector.app.R +import im.vector.app.espresso.tools.clickOnPreference + +class SettingsNotificationsRobot { + + fun crawl() { + if (BuildConfig.USE_NOTIFICATION_SETTINGS_V2) { + BaristaClickInteractions.clickOn(R.string.settings_notification_default) + Espresso.pressBack() + BaristaClickInteractions.clickOn(R.string.settings_notification_mentions_and_keywords) + // TODO Test adding a keyword? + Espresso.pressBack() + BaristaClickInteractions.clickOn(R.string.settings_notification_other) + Espresso.pressBack() + } else { + BaristaClickInteractions.clickOn(R.string.settings_notification_advanced) + Espresso.pressBack() + } + /* + clickOn(R.string.settings_noisy_notifications_preferences) + TODO Cannot go back + pressBack() + clickOn(R.string.settings_silent_notifications_preferences) + pressBack() + clickOn(R.string.settings_call_notifications_preferences) + pressBack() + */ + clickOnPreference(R.string.settings_notification_troubleshoot) + Espresso.pressBack() + } +} diff --git a/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsPreferencesRobot.kt b/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsPreferencesRobot.kt new file mode 100644 index 0000000000..39fc5d1610 --- /dev/null +++ b/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsPreferencesRobot.kt @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2021 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 im.vector.app.ui.robot.settings + +import androidx.test.espresso.Espresso +import androidx.test.espresso.matcher.ViewMatchers +import com.adevinta.android.barista.interaction.BaristaClickInteractions +import com.adevinta.android.barista.interaction.BaristaDialogInteractions +import im.vector.app.R +import im.vector.app.waitForView + +class SettingsPreferencesRobot { + + fun crawl() { + BaristaClickInteractions.clickOn(R.string.settings_interface_language) + Espresso.onView(ViewMatchers.isRoot()) + .perform(waitForView(ViewMatchers.withText("Dansk (Danmark)"))) + Espresso.pressBack() + BaristaClickInteractions.clickOn(R.string.settings_theme) + BaristaDialogInteractions.clickDialogNegativeButton() + BaristaClickInteractions.clickOn(R.string.font_size) + BaristaDialogInteractions.clickDialogNegativeButton() + } +} diff --git a/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsRobot.kt b/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsRobot.kt new file mode 100644 index 0000000000..3482df8c86 --- /dev/null +++ b/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsRobot.kt @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2021 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 im.vector.app.ui.robot.settings + +import im.vector.app.R +import im.vector.app.clickOnAndGoBack + +class SettingsRobot { + + fun general(block: SettingsGeneralRobot.() -> Unit) { + clickOnAndGoBack(R.string.settings_general_title) { block(SettingsGeneralRobot()) } + } + + fun notifications(block: SettingsNotificationsRobot.() -> Unit) { + clickOnAndGoBack(R.string.settings_notifications) { block(SettingsNotificationsRobot()) } + } + + fun preferences(block: SettingsPreferencesRobot.() -> Unit) { + clickOnAndGoBack(R.string.settings_preferences) { block(SettingsPreferencesRobot()) } + } + + fun voiceAndVideo(block: () -> Unit = {}) { + clickOnAndGoBack(R.string.preference_voice_and_video) { block() } + } + + fun ignoredUsers(block: () -> Unit = {}) { + clickOnAndGoBack(R.string.settings_ignored_users) { block() } + } + + fun securityAndPrivacy(block: SettingsSecurityRobot.() -> Unit) { + clickOnAndGoBack(R.string.settings_security_and_privacy) { block(SettingsSecurityRobot()) } + } + + fun labs(block: () -> Unit = {}) { + clickOnAndGoBack(R.string.room_settings_labs_pref_title) { block() } + } + + fun advancedSettings(block: SettingsAdvancedRobot.() -> Unit) { + clickOnAndGoBack(R.string.settings_advanced_settings) { block(SettingsAdvancedRobot()) } + } + + fun helpAndAbout(block: SettingsHelpRobot.() -> Unit) { + clickOnAndGoBack(R.string.preference_root_help_about) { block(SettingsHelpRobot()) } + } +} + diff --git a/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsSecurityRobot.kt b/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsSecurityRobot.kt new file mode 100644 index 0000000000..f2607bbc1c --- /dev/null +++ b/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsSecurityRobot.kt @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2021 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 im.vector.app.ui.robot.settings + +import androidx.test.espresso.Espresso +import im.vector.app.R +import im.vector.app.espresso.tools.clickOnPreference + +class SettingsSecurityRobot { + + fun crawl() { + clickOnPreference(R.string.settings_active_sessions_show_all) + Espresso.pressBack() + + clickOnPreference(R.string.encryption_message_recovery) + // TODO go deeper here + Espresso.pressBack() + /* Cannot exit + clickOnPreference(R.string.encryption_export_e2e_room_keys) + pressBack() + */ + } +}