Skip to content

Commit

Permalink
Remove screen recorder rule for small modules since it just slows dow…
Browse files Browse the repository at this point in the history
…n tests
  • Loading branch information
rubensousa committed Jun 19, 2024
1 parent e95db21 commit 63e0f97
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion dpadrecyclerview-compose/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -43,9 +42,6 @@ import org.junit.Test

class DpadComposeFocusViewHolderTest {

@get:Rule
val screenRecorderRule = ScreenRecorderRule()

@get:Rule
val composeTestRule = createAndroidComposeRule<ComposeFocusTestActivity>()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -40,9 +39,6 @@ import org.junit.Test

class DpadComposeViewHolderTest {

@get:Rule
val screenRecorderRule = ScreenRecorderRule()

@get:Rule
val composeTestRule = createAndroidComposeRule<ViewFocusTestActivity>()

Expand Down
1 change: 0 additions & 1 deletion dpadrecyclerview-testing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<DpadSubPositionFragment>
private lateinit var gridFragment: FragmentScenario<DpadGridFragment>

@get:Rule
val screenRecordingRule = ScreenRecorderRule()

protected fun onGridFragment(block: (fragment: DpadGridFragment) -> Unit) {
gridFragment.onFragment { fragment ->
block(fragment)
Expand Down

0 comments on commit 63e0f97

Please sign in to comment.