diff --git a/README.md b/README.md index 34c369b..1d032e1 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +Kherkin Logo Text + # Kherkin Kherkin ([Kotlin](https://kotlinlang.org/) + [Gherkin](https://cucumber.io/docs/gherkin/)) is an instrumentation testing framework that simplifies writing UI tests for Android. The Gherkin-like syntax makes it easier to build the test scenarios as a collaboration between developers and non-developers. Predefined step definitions allow for writing tests without having to fiddle with the [Espresso testing framework](https://developer.android.com/training/testing/espresso) or the [Jetpack Compose testing APIs](https://developer.android.com/develop/ui/compose/testing). Tests can start from any activity without navigating the entire application. @@ -203,3 +205,7 @@ Please see the [contributing file](CONTRIBUTING.md) on how to contribute to this ## Code of Conduct Help us make this project open and inclusive. Please follow our [Code of Conduct](CODE_OF_CONDUCT.md). + +

+ Kherkin Logo +

diff --git a/sampleapp/src/androidTest/java/com/progressive/sampleapp/tests/compose/TestScrollSteps.kt b/sampleapp/src/androidTest/java/com/progressive/sampleapp/tests/compose/TestScrollSteps.kt index 58dc37a..d1a02d5 100644 --- a/sampleapp/src/androidTest/java/com/progressive/sampleapp/tests/compose/TestScrollSteps.kt +++ b/sampleapp/src/androidTest/java/com/progressive/sampleapp/tests/compose/TestScrollSteps.kt @@ -17,13 +17,13 @@ class TestScrollSteps : SampleBaseIntegrationTestCase() { fun testScrollOnNode() { Given.IRenderScreen(BasicComposeScreen(), composeTestRule) When.IScrollOnNodeUntillISee("Scroll Box", "Scroll Item 9", composeTestRule) - Then.IShouldSeeNodeWithText("Scroll Item 9", "Item 9", composeTestRule) + Then.IShouldSeeNodeWithText("Scroll Item 9", "Scroll item 9", composeTestRule) } @Test fun testScrollOnNodeWithText() { Given.IRenderScreen(BasicComposeScreen(), composeTestRule) - When.IScrollOnNodeUntillISeeText("Scroll Box", "Item 9", composeTestRule) - Then.IShouldSeeNodeWithText("Scroll Item 9", "Item 9", composeTestRule) + When.IScrollOnNodeUntillISeeText("Scroll Box", "Scroll item 9", composeTestRule) + Then.IShouldSeeNodeWithText("Scroll Item 9", "Scroll item 9", composeTestRule) } } \ No newline at end of file diff --git a/sampleapp/src/main/ic_launcher-playstore.png b/sampleapp/src/main/ic_launcher-playstore.png new file mode 100644 index 0000000..9a89a9a Binary files /dev/null and b/sampleapp/src/main/ic_launcher-playstore.png differ diff --git a/sampleapp/src/main/java/com/progressive/sampleapp/activities/compose/BasicComposeActivity.kt b/sampleapp/src/main/java/com/progressive/sampleapp/activities/compose/BasicComposeActivity.kt index 55ba040..85a0ada 100644 --- a/sampleapp/src/main/java/com/progressive/sampleapp/activities/compose/BasicComposeActivity.kt +++ b/sampleapp/src/main/java/com/progressive/sampleapp/activities/compose/BasicComposeActivity.kt @@ -4,6 +4,7 @@ import android.content.Intent import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent +import androidx.compose.foundation.Image import androidx.compose.foundation.background import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.PaddingValues @@ -35,6 +36,7 @@ import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalFocusManager import androidx.compose.ui.platform.LocalSoftwareKeyboardController import androidx.compose.ui.platform.testTag +import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.AnnotatedString import androidx.compose.ui.text.LinkAnnotation @@ -92,6 +94,7 @@ fun SmallTopAppBar() { ScrollBoxes() NavigateButton() Link() + Logo() } } } @@ -194,16 +197,16 @@ private fun TextFieldPrefilled() { private fun ScrollBoxes() { Column( modifier = Modifier - .background(Color.LightGray) - .size(100.dp) - .padding(20.dp) + .size(120.dp) + .padding(10.dp, 4.dp) .verticalScroll(rememberScrollState()) + .background(Color.LightGray) .testTag("Scroll Box") ) { repeat(10) { - Text("Item $it", + Text("Scroll item $it", modifier = Modifier - .padding(2.dp) + .padding(8.dp, 4.dp) .testTag("Scroll Item $it") ) } @@ -260,6 +263,17 @@ private fun Link() { } } +@Composable +private fun Logo() { + Image( + painter = painterResource(id = R.drawable.kherkin_logo), + contentDescription = stringResource(id = R.string.kherkin_logo_content_description), + modifier = Modifier + .size(120.dp) + .testTag("Logo") + ) +} + @Preview(showBackground = true) @Composable private fun DefaultPreview() { diff --git a/sampleapp/src/main/res/drawable/ic_launcher_foreground.xml b/sampleapp/src/main/res/drawable/ic_launcher_foreground.xml index 2b068d1..2567b2e 100644 --- a/sampleapp/src/main/res/drawable/ic_launcher_foreground.xml +++ b/sampleapp/src/main/res/drawable/ic_launcher_foreground.xml @@ -1,30 +1,32 @@ - - - - - - - - - - \ No newline at end of file + android:viewportWidth="1000" + android:viewportHeight="1000"> + > + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sampleapp/src/main/res/drawable/kherkin_logo.xml b/sampleapp/src/main/res/drawable/kherkin_logo.xml new file mode 100644 index 0000000..9bc25c3 --- /dev/null +++ b/sampleapp/src/main/res/drawable/kherkin_logo.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sampleapp/src/main/res/drawable/kherkin_wordmark.xml b/sampleapp/src/main/res/drawable/kherkin_wordmark.xml new file mode 100644 index 0000000..45929b3 --- /dev/null +++ b/sampleapp/src/main/res/drawable/kherkin_wordmark.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sampleapp/src/main/res/layout/fragment_main.xml b/sampleapp/src/main/res/layout/fragment_main.xml index 1f8e5e2..ed8a7d4 100644 --- a/sampleapp/src/main/res/layout/fragment_main.xml +++ b/sampleapp/src/main/res/layout/fragment_main.xml @@ -142,4 +142,15 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/buttonNav" /> + + \ No newline at end of file diff --git a/sampleapp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/sampleapp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index eca70cf..7353dbd 100644 --- a/sampleapp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/sampleapp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -1,5 +1,5 @@ - - + + \ No newline at end of file diff --git a/sampleapp/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/sampleapp/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml index eca70cf..7353dbd 100644 --- a/sampleapp/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ b/sampleapp/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -1,5 +1,5 @@ - - + + \ No newline at end of file diff --git a/sampleapp/src/main/res/mipmap-anydpi-v33/ic_launcher.xml b/sampleapp/src/main/res/mipmap-anydpi-v33/ic_launcher.xml deleted file mode 100644 index 6f3b755..0000000 --- a/sampleapp/src/main/res/mipmap-anydpi-v33/ic_launcher.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/sampleapp/src/main/res/mipmap-hdpi/ic_launcher.webp b/sampleapp/src/main/res/mipmap-hdpi/ic_launcher.webp index c209e78..c59b93a 100644 Binary files a/sampleapp/src/main/res/mipmap-hdpi/ic_launcher.webp and b/sampleapp/src/main/res/mipmap-hdpi/ic_launcher.webp differ diff --git a/sampleapp/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/sampleapp/src/main/res/mipmap-hdpi/ic_launcher_round.webp index b2dfe3d..abd076a 100644 Binary files a/sampleapp/src/main/res/mipmap-hdpi/ic_launcher_round.webp and b/sampleapp/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ diff --git a/sampleapp/src/main/res/mipmap-mdpi/ic_launcher.webp b/sampleapp/src/main/res/mipmap-mdpi/ic_launcher.webp index 4f0f1d6..5ebab4e 100644 Binary files a/sampleapp/src/main/res/mipmap-mdpi/ic_launcher.webp and b/sampleapp/src/main/res/mipmap-mdpi/ic_launcher.webp differ diff --git a/sampleapp/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/sampleapp/src/main/res/mipmap-mdpi/ic_launcher_round.webp index 62b611d..63e4de0 100644 Binary files a/sampleapp/src/main/res/mipmap-mdpi/ic_launcher_round.webp and b/sampleapp/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ diff --git a/sampleapp/src/main/res/mipmap-xhdpi/ic_launcher.webp b/sampleapp/src/main/res/mipmap-xhdpi/ic_launcher.webp index 948a307..ca753f4 100644 Binary files a/sampleapp/src/main/res/mipmap-xhdpi/ic_launcher.webp and b/sampleapp/src/main/res/mipmap-xhdpi/ic_launcher.webp differ diff --git a/sampleapp/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/sampleapp/src/main/res/mipmap-xhdpi/ic_launcher_round.webp index 1b9a695..da8c233 100644 Binary files a/sampleapp/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and b/sampleapp/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ diff --git a/sampleapp/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/sampleapp/src/main/res/mipmap-xxhdpi/ic_launcher.webp index 28d4b77..22a8b3d 100644 Binary files a/sampleapp/src/main/res/mipmap-xxhdpi/ic_launcher.webp and b/sampleapp/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ diff --git a/sampleapp/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/sampleapp/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp index 9287f50..791487b 100644 Binary files a/sampleapp/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and b/sampleapp/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ diff --git a/sampleapp/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/sampleapp/src/main/res/mipmap-xxxhdpi/ic_launcher.webp index aa7d642..2683ab2 100644 Binary files a/sampleapp/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and b/sampleapp/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ diff --git a/sampleapp/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/sampleapp/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp index 9126ae3..97abf05 100644 Binary files a/sampleapp/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and b/sampleapp/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ diff --git a/sampleapp/src/main/res/values/ic_launcher_background.xml b/sampleapp/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 0000000..4e823a0 --- /dev/null +++ b/sampleapp/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + #3DDC84 + \ No newline at end of file diff --git a/sampleapp/src/main/res/values/strings.xml b/sampleapp/src/main/res/values/strings.xml index 8dae7a8..e5279df 100644 --- a/sampleapp/src/main/res/values/strings.xml +++ b/sampleapp/src/main/res/values/strings.xml @@ -115,4 +115,5 @@ Final Compose Activity + Kherkin Logo \ No newline at end of file