Compare commits

..

1 Commits

Author SHA1 Message Date
58b363b8dc ci: Instrumentation tests coverage in ci.
Some checks failed
Check PR code / EspressoReports (pull_request) Has been cancelled
2025-03-20 09:45:20 +01:00

View File

@ -33,10 +33,13 @@ import java.io.File
import java.io.IOException
import java.util.Locale
val defaultUrl = (System.getenv("SELFOSS_URL") ?: "").ifEmpty { "http://10.0.2.2:8888" }
fun performLogin(someUrl: String? = null) {
Log.i("AUTOMATION", "The url used will be ${if (!someUrl.isNullOrEmpty()) someUrl else defaultUrl}")
onView(withId(R.id.urlView)).perform(click()).perform(
typeTextIntoFocusedView(
if (!someUrl.isNullOrEmpty()) someUrl else "http://10.0.2.2:8888",
if (!someUrl.isNullOrEmpty()) someUrl else defaultUrl,
),
)
onView(withId(R.id.signInButton)).perform(click())