diff --git a/presentation/src/test/java/com/anytypeio/anytype/presentation/collections/CollectionCreateAndAddObjectTest.kt b/presentation/src/test/java/com/anytypeio/anytype/presentation/collections/CollectionCreateAndAddObjectTest.kt index 6adc505e6f..ea9023efe4 100644 --- a/presentation/src/test/java/com/anytypeio/anytype/presentation/collections/CollectionCreateAndAddObjectTest.kt +++ b/presentation/src/test/java/com/anytypeio/anytype/presentation/collections/CollectionCreateAndAddObjectTest.kt @@ -21,6 +21,7 @@ import com.anytypeio.anytype.presentation.sets.subscription.DefaultDataViewSubsc import com.anytypeio.anytype.test_utils.MockDataFactory import kotlin.test.assertIs import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.test.advanceTimeBy import kotlinx.coroutines.test.advanceUntilIdle import kotlinx.coroutines.test.runTest import net.lachlanmckee.timberjunit.TimberTestRule @@ -185,7 +186,7 @@ class CollectionCreateAndAddObjectTest: ObjectSetViewModelTestSetup() { templateId = newObjectTemplate ) - advanceUntilIdle() + advanceTimeBy(300) val spaceId = SpaceId(mockObjectCollection.spaceId) val command = Command.CreateObject( prefilled = mapOf(filters[0].relation to filters[0].value, filters[1].relation to filters[1].value), diff --git a/presentation/src/test/java/com/anytypeio/anytype/presentation/home/ParseWidgetTest.kt b/presentation/src/test/java/com/anytypeio/anytype/presentation/home/ParseWidgetTest.kt index ae1097f8cf..0a4ba3cdfe 100644 --- a/presentation/src/test/java/com/anytypeio/anytype/presentation/home/ParseWidgetTest.kt +++ b/presentation/src/test/java/com/anytypeio/anytype/presentation/home/ParseWidgetTest.kt @@ -92,7 +92,12 @@ class ParseWidgetTest { ) val widgetContent = Block.Content.Widget( - layout = Block.Content.Widget.Layout.values().random() + layout = listOf( + Block.Content.Widget.Layout.TREE, + Block.Content.Widget.Layout.LIST, + Block.Content.Widget.Layout.LINK, + Block.Content.Widget.Layout.COMPACT_LIST + ).random() ) val firstWidgetLink = StubLinkToObjectBlock(