Unverified Commit aaf1bedd authored by Lucio Maciel's avatar Lucio Maciel Committed by GitHub

Merge pull request #1614 from RocketChat/project/fix-building-error

[FIX] Building error
parents 8c31dff7 4a534c96
...@@ -24,35 +24,44 @@ class ChatRoomFragmentTest { ...@@ -24,35 +24,44 @@ class ChatRoomFragmentTest {
@Before @Before
fun stubAllExternalIntents() { fun stubAllExternalIntents() {
val activityIntent = InstrumentationRegistry.getTargetContext().chatRoomIntent("id", "name", "type", false, 0L) val activityIntent = InstrumentationRegistry.getTargetContext()
.chatRoomIntent("id", "name", "type", false, 0L)
activityRule.launchActivity(activityIntent) activityRule.launchActivity(activityIntent)
intending(not(isInternal())).respondWith(ActivityResult(Activity.RESULT_OK, null)) intending(not(isInternal())).respondWith(ActivityResult(Activity.RESULT_OK, null))
} }
@Test @Test
fun showFileSelection_nonNullFiltersAreApplied() { fun showFileSelection_nonNullFiltersAreApplied() {
val fragment = activityRule.activity.supportFragmentManager.findFragmentByTag(ChatRoomActivity.TAG_CHAT_ROOM_FRAGMENT) as ChatRoomFragment val fragment =
activityRule.activity.supportFragmentManager.findFragmentByTag("ChatRoomFragment") as ChatRoomFragment
val filters = arrayOf("image/*") val filters = arrayOf("image/*")
fragment.showFileSelection(filters) fragment.showFileSelection(filters)
intended(allOf( intended(
allOf(
hasAction(Intent.ACTION_GET_CONTENT), hasAction(Intent.ACTION_GET_CONTENT),
hasType("*/*"), hasType("*/*"),
hasCategories(setOf(Intent.CATEGORY_OPENABLE)), hasCategories(setOf(Intent.CATEGORY_OPENABLE)),
hasExtra(Intent.EXTRA_MIME_TYPES, filters))) hasExtra(Intent.EXTRA_MIME_TYPES, filters)
)
)
} }
@Test @Test
fun showFileSelection_nullFiltersAreNotApplied() { fun showFileSelection_nullFiltersAreNotApplied() {
val fragment = activityRule.activity.supportFragmentManager.findFragmentByTag(ChatRoomActivity.TAG_CHAT_ROOM_FRAGMENT) as ChatRoomFragment val fragment =
activityRule.activity.supportFragmentManager.findFragmentByTag("ChatRoomFragment") as ChatRoomFragment
fragment.showFileSelection(null) fragment.showFileSelection(null)
intended(allOf( intended(
allOf(
hasAction(Intent.ACTION_GET_CONTENT), hasAction(Intent.ACTION_GET_CONTENT),
hasType("*/*"), hasType("*/*"),
hasCategories(setOf(Intent.CATEGORY_OPENABLE)), hasCategories(setOf(Intent.CATEGORY_OPENABLE)),
not(hasExtraWithKey(Intent.EXTRA_MIME_TYPES)))) not(hasExtraWithKey(Intent.EXTRA_MIME_TYPES))
)
)
} }
} }
\ No newline at end of file
...@@ -35,6 +35,7 @@ import chat.rocket.android.server.domain.MultiServerTokenRepository ...@@ -35,6 +35,7 @@ import chat.rocket.android.server.domain.MultiServerTokenRepository
import chat.rocket.android.server.domain.PermissionsRepository import chat.rocket.android.server.domain.PermissionsRepository
import chat.rocket.android.server.domain.RoomRepository import chat.rocket.android.server.domain.RoomRepository
import chat.rocket.android.server.domain.SettingsRepository import chat.rocket.android.server.domain.SettingsRepository
import chat.rocket.android.server.domain.TokenRepository
import chat.rocket.android.server.domain.UsersRepository import chat.rocket.android.server.domain.UsersRepository
import chat.rocket.android.server.infraestructure.JobSchedulerInteractorImpl import chat.rocket.android.server.infraestructure.JobSchedulerInteractorImpl
import chat.rocket.android.server.infraestructure.MemoryActiveUsersRepository import chat.rocket.android.server.infraestructure.MemoryActiveUsersRepository
...@@ -57,7 +58,6 @@ import chat.rocket.common.model.TimestampAdapter ...@@ -57,7 +58,6 @@ import chat.rocket.common.model.TimestampAdapter
import chat.rocket.common.util.CalendarISO8601Converter import chat.rocket.common.util.CalendarISO8601Converter
import chat.rocket.common.util.Logger import chat.rocket.common.util.Logger
import chat.rocket.common.util.PlatformLogger import chat.rocket.common.util.PlatformLogger
import chat.rocket.core.TokenRepository
import chat.rocket.core.internal.AttachmentAdapterFactory import chat.rocket.core.internal.AttachmentAdapterFactory
import chat.rocket.core.internal.ReactionsAdapter import chat.rocket.core.internal.ReactionsAdapter
import com.facebook.drawee.backends.pipeline.DraweeConfig import com.facebook.drawee.backends.pipeline.DraweeConfig
......
...@@ -10,7 +10,7 @@ buildscript { ...@@ -10,7 +10,7 @@ buildscript {
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.3.0-alpha06' classpath 'com.android.tools.build:gradle:3.3.0-alpha05'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:${versions.dokka}" classpath "org.jetbrains.dokka:dokka-gradle-plugin:${versions.dokka}"
classpath 'com.google.gms:google-services:4.0.2' classpath 'com.google.gms:google-services:4.0.2'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment