test(account-manager): Added Account Manager test module.
This commit is contained in:
parent
6601ba1676
commit
c2ac5b0657
|
@ -84,6 +84,7 @@ Core libraries coordinates can be found under [coordinates section](#coordinates
|
|||
| me.proton.core:account-manager-domain |
|
||||
| me.proton.core:account-manager-presentation |
|
||||
| me.proton.core:account-manager-presentation-compose |
|
||||
| me.proton.core:account-manager-test |
|
||||
| me.proton.core:account-recovery |
|
||||
| me.proton.core:account-recovery-dagger |
|
||||
| me.proton.core:account-recovery-data |
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
public final class me/proton/core/accountmanager/test/BuildConfig {
|
||||
public static final field BUILD_TYPE Ljava/lang/String;
|
||||
public static final field DEBUG Z
|
||||
public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String;
|
||||
public fun <init> ()V
|
||||
}
|
||||
|
||||
public final class me/proton/core/accountmanager/test/robot/AccountSettingsRobot {
|
||||
public static final field INSTANCE Lme/proton/core/accountmanager/test/robot/AccountSettingsRobot;
|
||||
public final fun clickPasswordManagement ()V
|
||||
public final fun clickRecoveryEmail ()V
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
* Copyright (c) 2023 Proton AG
|
||||
* This file is part of Proton AG and ProtonCore.
|
||||
*
|
||||
* ProtonCore is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ProtonCore is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with ProtonCore. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import studio.forface.easygradle.dsl.android.retrofit
|
||||
import studio.forface.easygradle.dsl.api
|
||||
import studio.forface.easygradle.dsl.`coroutines-core`
|
||||
import studio.forface.easygradle.dsl.implementation
|
||||
import studio.forface.easygradle.dsl.`kotlin-test`
|
||||
import studio.forface.easygradle.dsl.`kotlin-test-junit`
|
||||
|
||||
plugins {
|
||||
protonAndroidLibrary
|
||||
}
|
||||
|
||||
protonCoverage.disabled.set(true)
|
||||
|
||||
publishOption.shouldBePublishedAsLib = true
|
||||
|
||||
android {
|
||||
namespace = "me.proton.core.accountmanager.test"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(
|
||||
project(Module.quark),
|
||||
junit
|
||||
)
|
||||
|
||||
implementation(
|
||||
project(Module.androidInstrumentedTest),
|
||||
project(Module.accountManagerPresentation),
|
||||
project(Module.accountManagerPresentationCompose),
|
||||
`androidx-test-monitor`,
|
||||
`compose-ui-test-junit`,
|
||||
`coroutines-core`,
|
||||
fusion,
|
||||
`kotlin-test`,
|
||||
`kotlin-test-junit`,
|
||||
retrofit,
|
||||
uiautomator
|
||||
)
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Copyright (c) 2024 Proton AG
|
||||
* This file is part of Proton AG and ProtonCore.
|
||||
*
|
||||
* ProtonCore is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ProtonCore is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with ProtonCore. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.proton.core.accountmanager.test.robot
|
||||
|
||||
import me.proton.core.accountmanager.presentation.R
|
||||
import me.proton.test.fusion.Fusion
|
||||
|
||||
public object AccountSettingsRobot {
|
||||
|
||||
private val passwordManagement =
|
||||
Fusion.node.withText(R.string.account_settings_list_item_password_header)
|
||||
private val recoveryEmail =
|
||||
Fusion.node.withText(R.string.account_settings_list_item_recovery_header)
|
||||
|
||||
public fun clickPasswordManagement() {
|
||||
passwordManagement.click()
|
||||
}
|
||||
|
||||
public fun clickRecoveryEmail() {
|
||||
recoveryEmail.click()
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue