Skip to content

Commit fd6e46c

Browse files
authored
Merge pull request #4856 from wix/bugfix/fixedtests
Fixed android unittest
2 parents ec1b82f + 28b1a70 commit fd6e46c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

detox/android/detox/src/testFull/java/com/wix/detox/common/UIExtensionsTest.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import android.view.View
44
import android.view.ViewGroup
55
import android.widget.TextView
66
import com.wix.detox.UTHelpers.mockViewHierarchy
7+
import com.wix.detox.reactnative.ReactNativeInfo
78
import com.wix.detox.reactnative.ui.getAccessibilityLabel
89
import org.assertj.core.api.Assertions
910
import org.junit.Test
@@ -36,7 +37,8 @@ class UIExtensionsTest {
3637
fun `should return accessibility label according to children's content-description, recursively`() {
3738
val contentDescription1st = "cd.1"
3839
val contentDescription2nd = "cd.2"
39-
val expectedLabel = "$contentDescription1st, $contentDescription2nd"
40+
val expectedLabel =
41+
if (ReactNativeInfo.rnVersion().minor >= 81) "$contentDescription1st, $contentDescription2nd" else "$contentDescription1st $contentDescription2nd"
4042

4143

4244
val parent: ViewGroup = mock()

0 commit comments

Comments
 (0)