-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix android tests #217
Fix android tests #217
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,9 @@ package com.yasinkacmaz.jetflix.ui.moviedetail.credits | |
import androidx.compose.material.icons.Icons | ||
import androidx.compose.material.icons.rounded.Man | ||
import androidx.compose.material.icons.rounded.Woman | ||
import androidx.compose.runtime.Stable | ||
|
||
data class Credits(val cast: List<Person>, val crew: List<Person>) | ||
data class Credits(@Stable val cast: List<Person>, @Stable val crew: List<Person>) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lists in Kotlin are mutable so Compose won't know these are immutable w/ the @stable annotation. This helped the assertPeople() check get a little bit further (manages to scroll to the 2nd position, but then hangs reading the text values) |
||
|
||
data class Person(val name: String, val role: String, val profilePhotoUrl: String?, val gender: Gender) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ compose_paging = { module = "androidx.paging:paging-compose", version = "1.0.0-a | |
compose_activity = { module = "androidx.activity:activity-compose", version = "1.7.0-alpha01" } | ||
compose_viewModel = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version = "2.6.0-alpha02" } | ||
compose_navigation = { module = "androidx.navigation:navigation-compose", version = "2.6.0-alpha02" } | ||
compose_navigation_testing = { module = "androidx.navigation:navigation-testing", version = "2.6.0-alpha03" } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this testing artifact is needed for the testing.navController in the latest Compose libs |
||
compose_hiltNavigation = { module = "androidx.hilt:hilt-navigation-compose", version = "1.0.0" } | ||
compose_constraintLayout = { module = "androidx.constraintlayout:constraintlayout-compose", version = "1.1.0-alpha04" } | ||
accompanist_pager = { module = "com.google.accompanist:accompanist-pager", version.ref = "accompanist" } | ||
|
@@ -60,4 +61,4 @@ compose = [ | |
accompanist = ["accompanist_pager", "accompanist_flowLayout"] | ||
io = ["okhttp", "retrofit", "serializationConverter", "jsonSerialization"] | ||
test = ["junit", "mockK", "strikt", "coroutinesTest"] | ||
androidTest = ["compose_uiTest", "compose_uiTestJunit", "junitExt" ] | ||
androidTest = ["compose_uiTest", "compose_uiTestJunit", "junitExt", "compose_navigation_testing"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you don't set the URL to null, you'll get a ComposeIdleException because Coil never goes into idle.