Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ class NavigationTest {
// Check profile is displayed
assertEquals(navController.currentDestination?.id, R.id.nav_profile)
// Extra UI check
composeTestRule.onNodeWithText(activity.getString(R.string.textfield_hint)).assertIsDisplayed()
composeTestRule
.onNodeWithText(activity.getString(R.string.textfield_hint))
.assertIsDisplayed()

// Press back
Espresso.pressBack()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,19 +138,23 @@ class UserInputTest {
}

private fun clickOnTextField() =
composeTestRule.onNodeWithContentDescription(activity.getString(R.string.textfield_desc))
composeTestRule
.onNodeWithContentDescription(activity.getString(R.string.textfield_desc))
.performClick()

private fun openEmojiSelector() =
composeTestRule.onNodeWithContentDescription(activity.getString(R.string.emoji_selector_bt_desc))
composeTestRule
.onNodeWithContentDescription(activity.getString(R.string.emoji_selector_bt_desc))
.performClick()

private fun assertEmojiSelectorIsDisplayed() =
composeTestRule.onNodeWithContentDescription(activity.getString(R.string.emoji_selector_desc))
composeTestRule
.onNodeWithContentDescription(activity.getString(R.string.emoji_selector_desc))
.assertIsDisplayed()

private fun assertEmojiSelectorDoesNotExist() =
composeTestRule.onNodeWithContentDescription(activity.getString(R.string.emoji_selector_desc))
composeTestRule
.onNodeWithContentDescription(activity.getString(R.string.emoji_selector_desc))
.assertDoesNotExist()

private fun findSendButton() = composeTestRule.onNodeWithText(activity.getString(R.string.send))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ fun ColumnScope.JetchatDrawer(onProfileClicked: (String) -> Unit, onChatClicked:
ChatItem("droidcon-nyc", false) { onChatClicked("droidcon-nyc") }
DrawerItemHeader("Recent Profiles")
ProfileItem("Ali Conors (you)", meProfile.photo) { onProfileClicked(meProfile.userId) }
ProfileItem("Taylor Brooks", colleagueProfile.photo) { onProfileClicked(colleagueProfile.userId) }
ProfileItem("Taylor Brooks", colleagueProfile.photo) {
onProfileClicked(colleagueProfile.userId)
}
}

@Composable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,9 @@ class ConversationUiState(
}

@Immutable
data class Message(val author: String, val content: String, val timestamp: String, val image: Int? = null)
data class Message(
val author: String,
val content: String,
val timestamp: String,
val image: Int? = null
)
3 changes: 1 addition & 2 deletions Jetchat/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ subprojects {
target '**/*.kt'
targetExclude("$buildDir/**/*.kt")
targetExclude('bin/**/*.kt')

ktlint(Versions.ktlint)
ktlint(Versions.ktlint).userData([android: "true"])
licenseHeaderFile rootProject.file('spotless/copyright.kt')
}
}
Expand Down