From 4eddf4e74b219d3b021bdae01a0d0b182dbf6007 Mon Sep 17 00:00:00 2001 From: Honza Rychnovsky Date: Tue, 18 Oct 2022 15:08:36 +0200 Subject: [PATCH] [#598] Refactoring ScreenshotTest to a separate test module * Temporary enable FTL test * Enable emulator.wft tests for ui-integration-test module on CI * Test Fladle configuration for ui-integration-test module * Fix Fladle for ui-integration-test module * Rename ui-integration-test module flade configuration * Disable again FTL action from PRs * Clear support for FTL from ui-integration-test module * Refactor the emulator.wtf support across our modules. * [#598] Refactoring ScreenshotTest to a separate test module - Created a new com.android.test module - Moved our ScreenShotTest to the separate module - Enabled the new module for emulator.wtf service - Cleaned up the app module from ScreenShotTest - Updated Architecture and Setup documentation * Exclude pure test modules from Detekt check * Improved run configurations - Changed common emulator.wtf run configuration name to align with the rest of our configurations - Added configuration for the new screenshot tests module - Updated documentation * Linked code TODO * Disabled self-instrumenting - As it appeared to be the way how to leverage the app module Gradle settings in this new module - App name is taken from app module settings - Screenshot tests works with pseudolocales again --- .github/workflows/pull-request.yml | 2 +- ...latorWtf.xml => test_with_emulatorWtf.xml} | 3 +- .../ui_screenshot_test_connectedCheck.xml | 57 ++++++++++++++ app/build.gradle.kts | 26 +------ build.gradle.kts | 6 ++ docs/Architecture.md | 16 ++-- docs/Setup.md | 18 ++--- settings.gradle.kts | 1 + .../co/electriccoin/zcash/ui/MainActivity.kt | 3 - .../co/electriccoin/zcash/ui/Navigation.kt | 11 --- .../src/main/res/ui/about/values/strings.xml | 1 + ui-screenshot-test/build.gradle.kts | 77 +++++++++++++++++++ .../src/main/AndroidManifest.xml | 4 + .../zcash/ui/screenshot}/ScreenshotTest.kt | 4 +- 14 files changed, 172 insertions(+), 57 deletions(-) rename .idea/runConfigurations/{testOnEmulatorWtf.xml => test_with_emulatorWtf.xml} (82%) create mode 100644 .idea/runConfigurations/ui_screenshot_test_connectedCheck.xml create mode 100644 ui-screenshot-test/build.gradle.kts create mode 100644 ui-screenshot-test/src/main/AndroidManifest.xml rename {app/src/androidTest/java/co/electriccoin/zcash/app => ui-screenshot-test/src/main/java/co/electroniccoin/zcash/ui/screenshot}/ScreenshotTest.kt (99%) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 73e4f384..c3ac8ed9 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -294,7 +294,7 @@ jobs: ORG_GRADLE_PROJECT_ZCASH_DEBUG_APP_NAME_SUFFIX: "" ORG_GRADLE_PROJECT_ZCASH_EMULATOR_WTF_API_KEY: ${{ secrets.EMULATOR_WTF_API_KEY }} run: | - ./gradlew testDebugWithEmulatorWtf :app:testZcashmainnetDebugWithEmulatorWtf :ui-integration-test:testZcashmainnetDebugWithEmulatorWtf + ./gradlew testDebugWithEmulatorWtf :app:testZcashmainnetDebugWithEmulatorWtf :ui-integration-test:testZcashmainnetDebugWithEmulatorWtf :ui-screenshot-test:testZcashmainnetDebugWithEmulatorWtf - name: Collect Artifacts if: ${{ always() }} timeout-minutes: 1 diff --git a/.idea/runConfigurations/testOnEmulatorWtf.xml b/.idea/runConfigurations/test_with_emulatorWtf.xml similarity index 82% rename from .idea/runConfigurations/testOnEmulatorWtf.xml rename to .idea/runConfigurations/test_with_emulatorWtf.xml index 6e37f486..baf5a365 100644 --- a/.idea/runConfigurations/testOnEmulatorWtf.xml +++ b/.idea/runConfigurations/test_with_emulatorWtf.xml @@ -1,5 +1,5 @@ - +