|
|
@ -230,6 +230,7 @@ class ComposeActivityTest { |
|
|
|
NodeInfoPleromaUploadLimits( 100, 100, 100, 100 )) |
|
|
|
NodeInfoPleromaUploadLimits( 100, 100, 100, 100 )) |
|
|
|
} |
|
|
|
} |
|
|
|
setupActivity() |
|
|
|
setupActivity() |
|
|
|
|
|
|
|
shadowOf(getMainLooper()).idle() |
|
|
|
assertEquals(true, activity.viewModel.hasNoAttachmentLimits) |
|
|
|
assertEquals(true, activity.viewModel.hasNoAttachmentLimits) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -240,6 +241,7 @@ class ComposeActivityTest { |
|
|
|
NodeInfoPleromaUploadLimits( 100, 100, 100, 100 )) |
|
|
|
NodeInfoPleromaUploadLimits( 100, 100, 100, 100 )) |
|
|
|
} |
|
|
|
} |
|
|
|
setupActivity() |
|
|
|
setupActivity() |
|
|
|
|
|
|
|
shadowOf(getMainLooper()).idle() |
|
|
|
assertArrayEquals(arrayOf("text/markdown", "text/bbcode"), activity.supportedFormattingSyntax.toTypedArray()) |
|
|
|
assertArrayEquals(arrayOf("text/markdown", "text/bbcode"), activity.supportedFormattingSyntax.toTypedArray()) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -250,6 +252,7 @@ class ComposeActivityTest { |
|
|
|
NodeInfoPleromaUploadLimits( Long.MAX_VALUE, Long.MAX_VALUE, Long.MAX_VALUE, Long.MAX_VALUE )) |
|
|
|
NodeInfoPleromaUploadLimits( Long.MAX_VALUE, Long.MAX_VALUE, Long.MAX_VALUE, Long.MAX_VALUE )) |
|
|
|
} |
|
|
|
} |
|
|
|
setupActivity() |
|
|
|
setupActivity() |
|
|
|
|
|
|
|
shadowOf(getMainLooper()).idle() |
|
|
|
assertEquals(Long.MAX_VALUE, activity.viewModel.instanceMetadata.value!!.imageLimit) |
|
|
|
assertEquals(Long.MAX_VALUE, activity.viewModel.instanceMetadata.value!!.imageLimit) |
|
|
|
assertEquals(Long.MAX_VALUE, activity.viewModel.instanceMetadata.value!!.videoLimit) |
|
|
|
assertEquals(Long.MAX_VALUE, activity.viewModel.instanceMetadata.value!!.videoLimit) |
|
|
|
} |
|
|
|
} |
|
|
@ -258,6 +261,7 @@ class ComposeActivityTest { |
|
|
|
fun whenPixelfedInNodeInfo_haveCustomUploadLimits() { |
|
|
|
fun whenPixelfedInNodeInfo_haveCustomUploadLimits() { |
|
|
|
nodeinfoResponseCallback = { getPixelfedNodeinfo( 1024 * 1024 ) } |
|
|
|
nodeinfoResponseCallback = { getPixelfedNodeinfo( 1024 * 1024 ) } |
|
|
|
setupActivity() |
|
|
|
setupActivity() |
|
|
|
|
|
|
|
shadowOf(getMainLooper()).idle() |
|
|
|
assertEquals(1024 * 1024 * 1024, activity.viewModel.instanceMetadata.value!!.imageLimit) |
|
|
|
assertEquals(1024 * 1024 * 1024, activity.viewModel.instanceMetadata.value!!.imageLimit) |
|
|
|
assertEquals(1024 * 1024 * 1024, activity.viewModel.instanceMetadata.value!!.videoLimit) |
|
|
|
assertEquals(1024 * 1024 * 1024, activity.viewModel.instanceMetadata.value!!.videoLimit) |
|
|
|
assertArrayEquals(emptyArray(), activity.supportedFormattingSyntax.toTypedArray()) // pixelfed has no formatting |
|
|
|
assertArrayEquals(emptyArray(), activity.supportedFormattingSyntax.toTypedArray()) // pixelfed has no formatting |
|
|
@ -267,6 +271,7 @@ class ComposeActivityTest { |
|
|
|
fun whenMastodonInNodeinfo_butItsAGlitch() { |
|
|
|
fun whenMastodonInNodeinfo_butItsAGlitch() { |
|
|
|
nodeinfoResponseCallback = { getMastodonNodeinfo( "3.1.0+glitch" ) } |
|
|
|
nodeinfoResponseCallback = { getMastodonNodeinfo( "3.1.0+glitch" ) } |
|
|
|
setupActivity() |
|
|
|
setupActivity() |
|
|
|
|
|
|
|
shadowOf(getMainLooper()).idle() |
|
|
|
assertArrayEquals(arrayOf("text/markdown", "text/html"), activity.supportedFormattingSyntax.toTypedArray()) |
|
|
|
assertArrayEquals(arrayOf("text/markdown", "text/html"), activity.supportedFormattingSyntax.toTypedArray()) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -274,6 +279,7 @@ class ComposeActivityTest { |
|
|
|
fun whenMastodonInNodeinfo_butItsBoringVanilla() { |
|
|
|
fun whenMastodonInNodeinfo_butItsBoringVanilla() { |
|
|
|
nodeinfoResponseCallback = { getMastodonNodeinfo( "3.1.0" ) } |
|
|
|
nodeinfoResponseCallback = { getMastodonNodeinfo( "3.1.0" ) } |
|
|
|
setupActivity() |
|
|
|
setupActivity() |
|
|
|
|
|
|
|
shadowOf(getMainLooper()).idle() |
|
|
|
assertArrayEquals(emptyArray(), activity.supportedFormattingSyntax.toTypedArray()) |
|
|
|
assertArrayEquals(emptyArray(), activity.supportedFormattingSyntax.toTypedArray()) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|