@@ -12,9 +12,8 @@ import screens.LoginScreen
1212import screens.MainScreen
1313import screens.ManageAccountsDialog
1414import screens.StartScreen
15- import screens.TrustCertificate
1615
17- class LoginScreenTest : TestCase (
16+ class LoginTest : TestCase (
1817 kaspressoBuilder = Kaspresso .Builder .advanced {
1918 flakySafetyParams = FlakySafetyParams .custom(
2019 timeoutMs = 20_000L,
@@ -30,20 +29,20 @@ class LoginScreenTest : TestCase(
3029 @get:Rule
3130 val activityRule = ActivityScenarioRule (SplashActivity ::class .java)
3231
32+ @get:Rule
33+ val permissionRule: GrantPermissionRule = GrantPermissionRule .grant(
34+ android.Manifest .permission.READ_EXTERNAL_STORAGE ,
35+ android.Manifest .permission.WRITE_EXTERNAL_STORAGE
36+ )
3337
3438 @Test
35- fun loginApp () {
36- before {
37- adbServer.performCmd(" adb" , listOf (" reverse" , " tcp:9200" , " tcp:9200" ))
38- }.after {
39- adbServer.performCmd(" adb" , listOf (" shell" , " am" , " force-stop" , " com.android.chrome" ))
40- adbServer.performCmd(" adb" , listOf (" reverse" , " --remove" , " tcp:9200" ))
41- }.run {
39+ fun loginAndRemoveAccount () {
40+ run {
4241 step(" set opencloud url" ) {
4342 StartScreen {
4443 hostUrlInput {
4544 isVisible()
46- typeText(" https://localhost:9200 " )
45+ typeText(" https://cloud.rc.opencloud.rocks " )
4746 }
4847 checkServerButton {
4948 isVisible()
@@ -52,15 +51,6 @@ class LoginScreenTest : TestCase(
5251 }
5352 }
5453 }
55- step(" trust certificate" ) {
56- TrustCertificate {
57- yesBtn {
58- isVisible()
59- isClickable()
60- click()
61- }
62- }
63- }
6454 step(" login" ) {
6555 LoginScreen {
6656 username.isDisplayed()
@@ -69,11 +59,6 @@ class LoginScreenTest : TestCase(
6959 username.typeText(" alan" )
7060 password.typeText(" demo" )
7161 loginButton.click()
72- keepAccessForeverBtn {
73- isDisplayed()
74- isClickable()
75- click()
76- }
7762 }
7863 }
7964 step(" check personal space" ) {
0 commit comments