Skip to content

Commit

Permalink
Refactor Scroll.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
ILIYANGERMANOV committed Jun 12, 2022
1 parent e9dc8de commit 39effa5
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions app/src/androidTest/java/com/ivy/wallet/compose/util/Scroll.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,23 @@ package com.ivy.wallet.compose.util
import androidx.compose.ui.test.*


fun <T> T.scroll(
fun scroll(
container: SemanticsNodeInteraction,
toIndex: Int
): T {
) {
container.performScrollToIndex(index = toIndex)
return this
}

fun <T> T.scroll(
fun scroll(
container: SemanticsNodeInteraction,
toKey: String
): T {
) {
container.performScrollToKey(key = toKey)
return this
}

fun <T> T.scroll(
fun scroll(
container: SemanticsNodeInteraction,
toMatcher: SemanticsMatcher
): T {
) {
container.performScrollToNode(toMatcher)
return this
}

0 comments on commit 39effa5

Please sign in to comment.