Skip to content

Commit

Permalink
Bump release version to 0.4.0 (#45)
Browse files Browse the repository at this point in the history
* test: πŸ’ modify typo for tests

* chore: πŸ€– update version code and version name

* test: πŸ’ add missing tests

* test: πŸ’ modify test typo
  • Loading branch information
ricky9667 authored Sep 14, 2024
1 parent 9987edc commit 6337d4e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ android {
applicationId = "com.rickyhu.hushkeyboard"
minSdk = 26
targetSdk = 34
versionCode = 2
versionName = "0.3.0"
versionCode = 3
versionName = "0.4.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fun Step1Section(
onClick = onSectionButtonClicked,
modifier = Modifier
.fillMaxWidth()
.testTag("SetupKeyboardButtonOutlined")
.testTag("EnableKeyboardButtonOutlined")
) {
Text(text = stringResource(R.string.intro_enable_keyboard_button))
}
Expand All @@ -53,7 +53,7 @@ fun Step1Section(
onClick = onSectionButtonClicked,
modifier = Modifier
.fillMaxWidth()
.testTag("SetupKeyboardButtonFilled")
.testTag("EnableKeyboardButtonFilled")
) {
Text(text = stringResource(R.string.intro_enable_keyboard_button))
}
Expand Down
14 changes: 14 additions & 0 deletions app/src/test/java/com/rickyhu/hushkeyboard/ui/HomeScreenUiTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import androidx.compose.ui.test.assertIsEnabled
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.performClick
import androidx.compose.ui.test.performTextInput
import com.rickyhu.hushkeyboard.home.HomeScreen
import org.junit.Assert.assertTrue
import org.junit.Before
Expand Down Expand Up @@ -69,4 +70,17 @@ class HomeScreenUiTest {

assertTrue(isSettingsButtonClicked)
}

@Test
fun `The textField should be displayed and should be enabled to enter text`() {
composeTestRule
.onNodeWithText("Type here")
.assertExists()
.assertIsEnabled()
.performTextInput("Test input")

composeTestRule
.onNodeWithText("Test input")
.assertExists()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class IntroductionScreenUiTest {
}

composeTestRule
.onNodeWithTag("SetupKeyboardButtonFilled")
.onNodeWithTag("EnableKeyboardButtonFilled")
.assertExists()
.assertIsEnabled()
.assertHasClickAction()
Expand All @@ -52,7 +52,7 @@ class IntroductionScreenUiTest {
}

composeTestRule
.onNodeWithTag("SetupKeyboardButtonOutlined")
.onNodeWithTag("EnableKeyboardButtonOutlined")
.assertExists()
.assertIsEnabled()
.assertHasClickAction()
Expand All @@ -70,7 +70,7 @@ class IntroductionScreenUiTest {
}

composeTestRule
.onNodeWithTag("SetupKeyboardButtonFilled")
.onNodeWithTag("EnableKeyboardButtonFilled")
.performClick()

assertTrue(isEnableKeyboardButtonClicked)
Expand Down

0 comments on commit 6337d4e

Please sign in to comment.