From 63e0f97dcd5faa2a0a9eb95d825010d514c18767 Mon Sep 17 00:00:00 2001 From: Ruben Sousa Date: Wed, 19 Jun 2024 23:22:48 +0200 Subject: [PATCH] Remove screen recorder rule for small modules since it just slows down tests --- dpadrecyclerview-compose/build.gradle | 1 - .../compose/DpadComposeFocusViewHolderTest.kt | 4 ---- .../dpadrecyclerview/compose/DpadComposeViewHolderTest.kt | 4 ---- dpadrecyclerview-testing/build.gradle | 1 - .../rubensousa/dpadrecyclerview/testing/RecyclerViewTest.kt | 5 ----- 5 files changed, 15 deletions(-) diff --git a/dpadrecyclerview-compose/build.gradle b/dpadrecyclerview-compose/build.gradle index 139993c0..6a198a00 100644 --- a/dpadrecyclerview-compose/build.gradle +++ b/dpadrecyclerview-compose/build.gradle @@ -18,7 +18,6 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunnerArguments useTestStorageService: 'true' testInstrumentationRunnerArguments additionalTestOutputDir: 'storage/emulated/0/recordings/com.rubensousa.dpadrecyclerview.compose.test' - testInstrumentationRunnerArguments listener: 'com.rubensousa.dpadrecyclerview.testfixtures.recording.TestRecordingListener' } buildTypes { diff --git a/dpadrecyclerview-compose/src/androidTest/java/com/rubensousa/dpadrecyclerview/compose/DpadComposeFocusViewHolderTest.kt b/dpadrecyclerview-compose/src/androidTest/java/com/rubensousa/dpadrecyclerview/compose/DpadComposeFocusViewHolderTest.kt index 03a1b605..2c29a141 100644 --- a/dpadrecyclerview-compose/src/androidTest/java/com/rubensousa/dpadrecyclerview/compose/DpadComposeFocusViewHolderTest.kt +++ b/dpadrecyclerview-compose/src/androidTest/java/com/rubensousa/dpadrecyclerview/compose/DpadComposeFocusViewHolderTest.kt @@ -32,7 +32,6 @@ import com.rubensousa.dpadrecyclerview.DpadRecyclerView import com.rubensousa.dpadrecyclerview.ExtraLayoutSpaceStrategy import com.rubensousa.dpadrecyclerview.compose.test.ComposeFocusTestActivity import com.rubensousa.dpadrecyclerview.testfixtures.DpadFocusEvent -import com.rubensousa.dpadrecyclerview.testfixtures.recording.ScreenRecorderRule import com.rubensousa.dpadrecyclerview.testing.KeyEvents import com.rubensousa.dpadrecyclerview.testing.R import com.rubensousa.dpadrecyclerview.testing.actions.DpadRecyclerViewActions @@ -43,9 +42,6 @@ import org.junit.Test class DpadComposeFocusViewHolderTest { - @get:Rule - val screenRecorderRule = ScreenRecorderRule() - @get:Rule val composeTestRule = createAndroidComposeRule() diff --git a/dpadrecyclerview-compose/src/androidTest/java/com/rubensousa/dpadrecyclerview/compose/DpadComposeViewHolderTest.kt b/dpadrecyclerview-compose/src/androidTest/java/com/rubensousa/dpadrecyclerview/compose/DpadComposeViewHolderTest.kt index f801d6f6..2ed41239 100644 --- a/dpadrecyclerview-compose/src/androidTest/java/com/rubensousa/dpadrecyclerview/compose/DpadComposeViewHolderTest.kt +++ b/dpadrecyclerview-compose/src/androidTest/java/com/rubensousa/dpadrecyclerview/compose/DpadComposeViewHolderTest.kt @@ -30,7 +30,6 @@ import com.rubensousa.dpadrecyclerview.DpadRecyclerView import com.rubensousa.dpadrecyclerview.ExtraLayoutSpaceStrategy import com.rubensousa.dpadrecyclerview.compose.test.ViewFocusTestActivity import com.rubensousa.dpadrecyclerview.testfixtures.DpadFocusEvent -import com.rubensousa.dpadrecyclerview.testfixtures.recording.ScreenRecorderRule import com.rubensousa.dpadrecyclerview.testing.KeyEvents import com.rubensousa.dpadrecyclerview.testing.R import com.rubensousa.dpadrecyclerview.testing.actions.DpadRecyclerViewActions @@ -40,9 +39,6 @@ import org.junit.Test class DpadComposeViewHolderTest { - @get:Rule - val screenRecorderRule = ScreenRecorderRule() - @get:Rule val composeTestRule = createAndroidComposeRule() diff --git a/dpadrecyclerview-testing/build.gradle b/dpadrecyclerview-testing/build.gradle index 1700baa5..db3ca459 100644 --- a/dpadrecyclerview-testing/build.gradle +++ b/dpadrecyclerview-testing/build.gradle @@ -17,7 +17,6 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunnerArguments useTestStorageService: 'true' testInstrumentationRunnerArguments additionalTestOutputDir: 'storage/emulated/0/recordings/com.rubensousa.dpadrecyclerview.testing.test' - testInstrumentationRunnerArguments listener: 'com.rubensousa.dpadrecyclerview.testfixtures.recording.TestRecordingListener' multiDexEnabled true } diff --git a/dpadrecyclerview-testing/src/androidTest/java/com/rubensousa/dpadrecyclerview/testing/RecyclerViewTest.kt b/dpadrecyclerview-testing/src/androidTest/java/com/rubensousa/dpadrecyclerview/testing/RecyclerViewTest.kt index 7df68b9e..c781f5b2 100644 --- a/dpadrecyclerview-testing/src/androidTest/java/com/rubensousa/dpadrecyclerview/testing/RecyclerViewTest.kt +++ b/dpadrecyclerview-testing/src/androidTest/java/com/rubensousa/dpadrecyclerview/testing/RecyclerViewTest.kt @@ -24,17 +24,12 @@ import androidx.test.espresso.ViewAssertion import androidx.test.espresso.ViewInteraction import androidx.test.espresso.matcher.ViewMatchers import com.google.common.truth.Truth.assertThat -import com.rubensousa.dpadrecyclerview.testfixtures.recording.ScreenRecorderRule -import org.junit.Rule abstract class RecyclerViewTest { private lateinit var subPositionFragment: FragmentScenario private lateinit var gridFragment: FragmentScenario - @get:Rule - val screenRecordingRule = ScreenRecorderRule() - protected fun onGridFragment(block: (fragment: DpadGridFragment) -> Unit) { gridFragment.onFragment { fragment -> block(fragment)