Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 141 additions & 0 deletions .idea/androidTestResultsUserPreferences.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions .idea/runConfigurations/Open_Screenshot_Report___internalDebug.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion .idea/runConfigurations/_app___testInternalDebugUnitTest.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions .idea/runConfigurations/executeScreenshotTests___internalDebug.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions .idea/runConfigurations/recordScreenshotTests___internalDebug.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,9 @@ This project uses the `generateNavDrawerItems` method in the `ComposeActivity` t
* cancelOnTouchOutside (Boolean)

## LaunchPad Development
Uncomment mavenLocal in main build.gradle.kts to test local library changes.
Uncomment mavenLocal in main build.gradle.kts to test local library changes.

## Compose UI Testing x Karumi Shots
* Requires API 30+
* Must re-install app prior to running any tests to get updated Manifest
* Complete setup can be found here <https://confluence.bottlerocketapps.com/display/BKB/Screenshot+Testing%3A+Compose+UI+x+Karumi>
11 changes: 10 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ plugins {
kotlin(Config.ApplyPlugins.Kotlin.ANDROID)
id(Config.ApplyPlugins.KSP)
id(Config.ApplyPlugins.PARCELIZE)
id(Config.ApplyPlugins.KARUMI_SHOT_TESTING)
}

extra.set("jacocoCoverageThreshold", 0.30.toBigDecimal()) // module specific code coverage verification threshold
Expand Down Expand Up @@ -34,7 +35,10 @@ android {
targetSdk = Config.AndroidSdkVersions.TARGET_SDK
versionCode = BuildInfoManager.APP_VERSION.versionCode
versionName = BuildInfoManager.APP_VERSION.versionName
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

// testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

testInstrumentationRunner = "com.karumi.shot.ShotTestRunner"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
Expand Down Expand Up @@ -127,6 +131,10 @@ android {
testOptions {
unitTests.isIncludeAndroidResources = true
}
shot {
applicationId = "com.bottlerocketstudios.brarchitecture.test"
// tolerance = 1.1
}
}

// Declare configurations per variant to use in the dependencies block below. See :data module for examples if needed here in the :app module.
Expand Down Expand Up @@ -178,4 +186,5 @@ dependencies {
espressoDependencies()
extJunitRunnerDependencies()
androidxCoreDependencies()
composeTestDependencies()
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions app/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.bottlerocketstudios.brarchitecture.test"
android:sharedUserId="com.bottlerocketstudios.brarchitecture.uid">

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.bottlerocketstudios.brarchitecture

import com.karumi.shot.ScreenshotTest

/**
* For later use to create extension functions to speed up development of UI tests
*
* Please see the Confluence page for setup, troubleshooting and more information on Compose UI x Karumi screenshot testing.
*
* https://confluence.bottlerocketapps.com/display/BKB/Screenshot+Testing%3A+Compose+UI+x+Karumi
*/
open class BaseUIScreenshotTest : ScreenshotTest
Loading