Skip to content

Commit 550cabb

Browse files
committed
feat: added thread in tests of FileDetailsFragmentTest
1 parent 1a78153 commit 550cabb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

owncloudApp/src/androidTest/java/com/owncloud/android/files/details/FileDetailsFragmentTest.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ class FileDetailsFragmentTest {
9595

9696
@Test
9797
fun show_space_personal_when_it_has_value() {
98+
Thread.sleep(1000)
9899
R.id.fdSpace.assertVisibility(ViewMatchers.Visibility.VISIBLE)
99100
R.id.fdSpaceLabel.assertVisibility(ViewMatchers.Visibility.VISIBLE)
100101
R.id.fdIconSpace.assertVisibility(ViewMatchers.Visibility.VISIBLE)
@@ -103,6 +104,7 @@ class FileDetailsFragmentTest {
103104
R.id.fdSpaceLabel.withText(R.string.space_label)
104105
onView(withId(R.id.fdIconSpace))
105106
.check(matches(withDrawable(R.drawable.ic_spaces)))
107+
Thread.sleep(500)
106108
}
107109

108110
@Test
@@ -116,16 +118,18 @@ class FileDetailsFragmentTest {
116118

117119
@Test
118120
fun show_space_not_personal_when_it_has_value() {
121+
Thread.sleep(1000)
119122
every { fileDetailsViewModel.currentFile } returns currentFileWithoutPersonalSpace
120-
123+
Thread.sleep(500)
121124
R.id.fdSpace.assertVisibility(ViewMatchers.Visibility.VISIBLE)
122125
R.id.fdSpaceLabel.assertVisibility(ViewMatchers.Visibility.VISIBLE)
123126
R.id.fdIconSpace.assertVisibility(ViewMatchers.Visibility.VISIBLE)
124-
127+
Thread.sleep(500)
125128
R.id.fdSpace.withText(currentFileWithoutPersonalSpace.value?.space?.name.toString())
126129
R.id.fdSpaceLabel.withText(R.string.space_label)
127130
onView(withId(R.id.fdIconSpace))
128131
.check(matches(withDrawable(R.drawable.ic_spaces)))
132+
Thread.sleep(500)
129133
}
130134

131135
@Test

0 commit comments

Comments
 (0)