Test the legals screen (#4709)

This commit is contained in:
Benoit Marty 2022-01-26 18:00:49 +01:00
parent 5989d6b82a
commit 891367752b
4 changed files with 35 additions and 8 deletions

View File

@ -72,8 +72,8 @@ class UiAllScreensSanityTest {
securityAndPrivacy { crawl() } securityAndPrivacy { crawl() }
labs() labs()
advancedSettings { crawl() } advancedSettings { crawl() }
// TODO Rework this part (Legals, etc.) helpAndAbout { crawl() }
// helpAndAbout { crawl() } legals { crawl() }
} }
elementRobot.newDirectMessage { elementRobot.newDirectMessage {

View File

@ -16,10 +16,6 @@
package im.vector.app.ui.robot.settings package im.vector.app.ui.robot.settings
import com.adevinta.android.barista.interaction.BaristaClickInteractions.clickOn
import com.adevinta.android.barista.interaction.BaristaDialogInteractions.clickDialogPositiveButton
import im.vector.app.R
class SettingsHelpRobot { class SettingsHelpRobot {
fun crawl() { fun crawl() {
@ -34,7 +30,5 @@ class SettingsHelpRobot {
clickOn(R.string.settings_privacy_policy) clickOn(R.string.settings_privacy_policy)
pressBack() pressBack()
*/ */
clickOn(R.string.settings_third_party_notices)
clickDialogPositiveButton()
} }
} }

View File

@ -0,0 +1,29 @@
/*
* 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.clickOn
import com.adevinta.android.barista.interaction.BaristaDialogInteractions.clickDialogPositiveButton
import im.vector.app.R
class SettingsLegalsRobot {
fun crawl() {
clickOn(R.string.settings_third_party_notices)
clickDialogPositiveButton()
}
}

View File

@ -64,4 +64,8 @@ class SettingsRobot {
fun helpAndAbout(block: SettingsHelpRobot.() -> Unit) { fun helpAndAbout(block: SettingsHelpRobot.() -> Unit) {
clickOnAndGoBack(R.string.preference_root_help_about) { block(SettingsHelpRobot()) } clickOnAndGoBack(R.string.preference_root_help_about) { block(SettingsHelpRobot()) }
} }
fun legals(block: SettingsLegalsRobot.() -> Unit) {
clickOnAndGoBack(R.string.preference_root_legals) { block(SettingsLegalsRobot()) }
}
} }