Adding steps to enable screen recording

This commit is contained in:
ifernandezdiaz
2025-07-14 15:10:42 -03:00
parent e20c8149e8
commit 7bedb1f4fd
3 changed files with 17 additions and 1 deletions

View File

@@ -19,6 +19,11 @@ class LoginPage(composeTestRule: ComposeTestRule) : Page(composeTestRule){
private val continueButton by lazy { getElement("ContinueButton") }
private val loginWithMasterPasswordButton by lazy { getElement("LogInWithMasterPasswordButton") }
private val regionSelectorButton by lazy { getElement("RegionSelectorDropdown") }
private val openSettingsButton by lazy { getElement("AppSettingsButton") }
private val otherSettingsButton by lazy { getElement("OtherSettingsButton") }
private val allowScreenCaptureToggle by lazy { getElement("AllowScreenCaptureSwitch") }
private val goBackButton by lazy { getElement("CloseButton") }
/**
* Enters the master password in the password field
@@ -44,4 +49,13 @@ class LoginPage(composeTestRule: ComposeTestRule) : Page(composeTestRule){
.performClick()
return EnvironmentSettingsPage(composeTestRule)
}
fun turnOnScreenRecording() : LoginPage {
openSettingsButton.performClick()
otherSettingsButton.performClick()
allowScreenCaptureToggle.performClick()
goBackButton.performClick()
goBackButton.performClick()
return this
}
}

View File

@@ -13,6 +13,7 @@ class RealDeviceE2ETests : BaseE2ETest() {
fun testVaultLockUnlockFlow() {
MainPage(composeTestRule)
.startLogin()
.turnOnScreenRecording()
.openEnvironmentSettings()
.setupEnvironment(testData.baseUrl)
.performLogin(testData.email, testData.password)

View File

@@ -326,7 +326,8 @@ private fun LandingScreenContent(
icon = rememberVectorPainter(id = BitwardenDrawable.ic_cog),
modifier = Modifier
.standardHorizontalMargin()
.fillMaxWidth(),
.fillMaxWidth()
.testTag("AppSettingsButton"),
)
Spacer(modifier = Modifier.height(height = 12.dp))