Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo App: Screenshot testing #1158

Closed
wants to merge 15 commits into from
Closed
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
Empty file added Image
Empty file.
Empty file added PIL
Empty file.
1,570 changes: 1,570 additions & 0 deletions Test Results - Tests_in_'com_google_android_fhir_datacapture'.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Binary file not shown.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1,570 changes: 1,570 additions & 0 deletions Test Results - Tests_in_'com_google_android_fhir_datacapture:pixel24'.html

Large diffs are not rendered by default.

1,970 changes: 1,970 additions & 0 deletions Test Results - Tests_in_'com_google_android_fhir_datacapture_test'.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1,970 changes: 1,970 additions & 0 deletions Test Results - Tests_in_'com_google_android_fhir_datacapturetest-api21'.html

Large diffs are not rendered by default.

1,970 changes: 1,970 additions & 0 deletions Test Results - Tests_in_'com_google_android_fhir_datacapturetest-lenovo'.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ buildscript {
classpath(Plugins.androidGradlePlugin)
classpath(Plugins.kotlinGradlePlugin)
classpath(Plugins.navSafeArgsGradlePlugin)
classpath(Plugins.fbScreenshotPlugin)
}
}

Expand Down
10 changes: 10 additions & 0 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,20 @@ object Dependencies {
const val runner = "androidx.test:runner:${Versions.AndroidxTest.runner}"
const val workTestingRuntimeKtx =
"androidx.work:work-testing:${Versions.Androidx.workRuntimeKtx}"
const val screenshotPlugin =
"com.facebook.testing.screenshot:plugin:${Versions.AndroidxTest.facebookScreenshotPlugin}"
const val screenShotTestRunner = "com.google.android.fhir.demo.screenshots.ScreenShotTestRunner"
}

object Espresso {
const val espressoCore = "androidx.test.espresso:espresso-core:${Versions.espresso}"
}

// const val screenshotPlugin =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicated above

// "com.facebook.testing.screenshot:plugin:${Versions.Androidx.facebookScreenshotPlugin}"
// const val screenShotTestRunner =
// "com.google.android.fhir.demo.screenshots.ScreenShotTestRunner"

const val androidJunitRunner = "androidx.test.runner.AndroidJUnitRunner"
const val flexBox = "com.google.android.flexbox:flexbox:${Versions.flexBox}"
const val junit = "junit:junit:${Versions.junit}"
Expand Down Expand Up @@ -198,6 +206,7 @@ object Dependencies {
const val rules = "1.1.0"
const val runner = "1.1.0"
const val fragmentVersion = "1.3.6"
const val facebookScreenshotPlugin = "0.14.0"
}

const val espresso = "3.3.0"
Expand All @@ -206,6 +215,7 @@ object Dependencies {
const val mockitoKotlin = "3.2.0"
const val mockitoInline = "4.0.0"
const val robolectric = "4.5.1"
// const val facebookScreenshotPlugin = "0.14.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicates l:209


object Mlkit {
const val barcodeScanning = "16.1.1"
Expand Down
5 changes: 5 additions & 0 deletions buildSrc/src/main/kotlin/LicenseeConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ fun Project.configureLicensee() {
because("Multi-licensed under Apache. https://github.com/jboss-javassist/javassist")
}

allowDependency("com.facebook", "com.facebook.testing.screenshot", "0.14.0") {
because("https://github.com/facebook/screenshot-tests-for-android/blob/main/LICENSE")
}

// xpp3 (HAPI FHIR transitive dep)
allowDependency("xpp3", "xpp3_xpath", "1.1.4c") {
because("Custom license, essentially BSD-5. https://fedoraproject.org/wiki/Licensing/xpp")
Expand Down Expand Up @@ -143,4 +147,5 @@ private val nonStandardLicenseUrls =
// BSD-3
"https://opensource.org/licenses/BSD-3-Clause",
"https://www.opensource.org/licenses/bsd-license.php",
"https://github.com/facebook/screenshot-tests-for-android/blob/master/LICENSE"
)
5 changes: 4 additions & 1 deletion buildSrc/src/main/kotlin/Plugins.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ object Plugins {
const val kotlin = "kotlin"
const val navSafeArgs = "androidx.navigation.safeargs.kotlin"
const val spotless = "com.diffplug.spotless"
const val screenshotPlugin = "com.facebook.testing.screenshot"
}

// classpath plugins
Expand All @@ -34,9 +35,11 @@ object Plugins {
"org.jetbrains.kotlin:kotlin-gradle-plugin:${Dependencies.Versions.Kotlin.stdlib}"
const val navSafeArgsGradlePlugin =
"androidx.navigation:navigation-safe-args-gradle-plugin:${Dependencies.Versions.Androidx.navigation}"

const val fbScreenshotPlugin =
"com.facebook.testing.screenshot:plugin:${Versions.fbScreenshotPlugin}"
object Versions {
const val androidGradlePlugin = "7.0.2"
const val buildTools = "30.0.2"
const val fbScreenshotPlugin = "0.14.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class QuestionnaireContainerFragment : Fragment() {
const val QUESTIONNAIRE_FRAGMENT_TAG = "questionnaire-fragment-tag"
const val QUESTIONNAIRE_RESPONSE_FILE_PATH_KEY = "questionnaire-response-file-path-key"

val LARGE_QUESTIONNAIRE_SET = setOf("Malaria Net Card Distribution Survey")
val LARGE_QUESTIONNAIRE_SET = setOf("Malaria Net Card Distribution Survey", "Test Question")
}

override fun onDestroyView() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ class QuestionnaireListFragment : Fragment() {
"Malaria Net Card Distribution Survey",
"A very large questionnaire for Malaria Net card distribution",
"malaria-net-card-distribution-survey.json",
),
QuestionnaireListItem(
"Test Question",
"Test",
"questionnaireLarge.json",
)
)
)
Expand Down
Loading