forked from melod1n/fast-messenger
fix dependency for userbanned screen and some simple tests for login module
This commit is contained in:
@@ -45,6 +45,8 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk = Configs.minSdk
|
minSdk = Configs.minSdk
|
||||||
|
|
||||||
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
@@ -92,6 +94,5 @@ dependencies {
|
|||||||
|
|
||||||
implementation(libs.rebugger)
|
implementation(libs.rebugger)
|
||||||
|
|
||||||
androidTestImplementation(libs.compose.ui.test.junit4)
|
androidTestImplementation(libs.bundles.compose.ui.test)
|
||||||
debugImplementation(libs.compose.ui.test.manifest)
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ import com.meloda.fast.auth.login.presentation.LoginScreen
|
|||||||
import org.junit.Rule
|
import org.junit.Rule
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
|
|
||||||
class LoginSignInTests {
|
class LoginScreenTest {
|
||||||
|
|
||||||
@get:Rule
|
@get:Rule
|
||||||
val composeTestRule = createComposeRule()
|
val composeTestRule = createComposeRule()
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
package com.meloda.fast.auth.login
|
||||||
|
|
||||||
|
import androidx.compose.ui.test.assertHasClickAction
|
||||||
|
import androidx.compose.ui.test.junit4.createComposeRule
|
||||||
|
import androidx.compose.ui.test.onNodeWithTag
|
||||||
|
import com.meloda.fast.auth.login.presentation.LogoScreen
|
||||||
|
import org.junit.Rule
|
||||||
|
import org.junit.Test
|
||||||
|
|
||||||
|
class LogoScreenTest {
|
||||||
|
|
||||||
|
@get:Rule
|
||||||
|
val composeTestRule = createComposeRule()
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun goNextButton_isClickable() {
|
||||||
|
composeTestRule.setContent {
|
||||||
|
LogoScreen()
|
||||||
|
}
|
||||||
|
|
||||||
|
composeTestRule.onNodeWithTag(testTag = "go_next_fab").assertHasClickAction()
|
||||||
|
}
|
||||||
|
}
|
||||||
+4
-1
@@ -24,6 +24,7 @@ import androidx.compose.runtime.getValue
|
|||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.platform.testTag
|
||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
import androidx.compose.ui.unit.LayoutDirection
|
import androidx.compose.ui.unit.LayoutDirection
|
||||||
@@ -121,7 +122,9 @@ fun LogoScreen(
|
|||||||
FloatingActionButton(
|
FloatingActionButton(
|
||||||
onClick = onGoNextButtonClicked,
|
onClick = onGoNextButtonClicked,
|
||||||
containerColor = MaterialTheme.colorScheme.secondaryContainer,
|
containerColor = MaterialTheme.colorScheme.secondaryContainer,
|
||||||
modifier = Modifier.align(Alignment.BottomCenter)
|
modifier = Modifier
|
||||||
|
.align(Alignment.BottomCenter)
|
||||||
|
.testTag("go_next_fab")
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
painter = painterResource(id = UiR.drawable.ic_arrow_end),
|
painter = painterResource(id = UiR.drawable.ic_arrow_end),
|
||||||
|
|||||||
@@ -58,5 +58,5 @@ dependencies {
|
|||||||
implementation(libs.androidx.navigation.compose)
|
implementation(libs.androidx.navigation.compose)
|
||||||
implementation(libs.kotlin.serialization)
|
implementation(libs.kotlin.serialization)
|
||||||
|
|
||||||
debugImplementation(libs.androidx.ui.tooling)
|
debugImplementation(libs.compose.ui.tooling)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ appcompat = "1.7.0"
|
|||||||
androidx-navigation = "2.8.0-beta05"
|
androidx-navigation = "2.8.0-beta05"
|
||||||
serialization = "1.7.1"
|
serialization = "1.7.1"
|
||||||
rebugger = "1.0.0-rc03"
|
rebugger = "1.0.0-rc03"
|
||||||
uiTooling = "1.6.8"
|
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
accompanist-permissions = { module = "com.google.accompanist:accompanist-permissions", version.ref = "accompanist" }
|
accompanist-permissions = { module = "com.google.accompanist:accompanist-permissions", version.ref = "accompanist" }
|
||||||
@@ -94,7 +93,6 @@ koin-android = { module = "io.insert-koin:koin-android", version.ref = "koin" }
|
|||||||
koin-android-test = { module = "io.insert-koin:koin-android-test", version.ref = "koin" }
|
koin-android-test = { module = "io.insert-koin:koin-android-test", version.ref = "koin" }
|
||||||
koin-androidx-compose = { module = "io.insert-koin:koin-androidx-compose", version.ref = "koin" }
|
koin-androidx-compose = { module = "io.insert-koin:koin-androidx-compose", version.ref = "koin" }
|
||||||
koin-androidx-compose-navigation = { module = "io.insert-koin:koin-androidx-compose-navigation", version.ref = "koin" }
|
koin-androidx-compose-navigation = { module = "io.insert-koin:koin-androidx-compose-navigation", version.ref = "koin" }
|
||||||
androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling", version.ref = "uiTooling" }
|
|
||||||
|
|
||||||
[bundles]
|
[bundles]
|
||||||
compose = [
|
compose = [
|
||||||
@@ -114,6 +112,7 @@ koin = [
|
|||||||
"koin-androidx-compose",
|
"koin-androidx-compose",
|
||||||
"koin-androidx-compose-navigation"
|
"koin-androidx-compose-navigation"
|
||||||
]
|
]
|
||||||
|
compose-ui-test = ["compose-ui-test-junit4", "compose-ui-test-manifest"]
|
||||||
|
|
||||||
[plugins]
|
[plugins]
|
||||||
com-android-application = { id = "com.android.application", version.ref = "agp" }
|
com-android-application = { id = "com.android.application", version.ref = "agp" }
|
||||||
|
|||||||
Reference in New Issue
Block a user