Review fixes

Change-Id: Iffd288c9a927f13069580c66a6ee3150abb63682
jdk/2pane_tests
Jonathan Koren 1 week ago
parent 825567f2c1
commit eeb171bec3

@ -20,5 +20,7 @@ import androidx.annotation.StringRes
import androidx.compose.ui.test.junit4.AndroidComposeTestRule import androidx.compose.ui.test.junit4.AndroidComposeTestRule
import kotlin.properties.ReadOnlyProperty import kotlin.properties.ReadOnlyProperty
fun AndroidComposeTestRule<*, *>.stringResource(@StringRes resId: Int) = fun AndroidComposeTestRule<*, *>.stringResource(
ReadOnlyProperty<Any, String> { _, _ -> activity.getString(resId) } @StringRes resId: Int,
): ReadOnlyProperty<Any, String> =
ReadOnlyProperty { _, _ -> activity.getString(resId) }

@ -87,7 +87,6 @@ class InterestsListDetailScreenTest {
@Before @Before
fun setup() { fun setup() {
hiltRule.inject() hiltRule.inject()
composeTestRule.activityRule
} }
@Test @Test
@ -109,7 +108,7 @@ class InterestsListDetailScreenTest {
} }
@Test @Test
fun notExpandedWidth_initialState_showsListPane() { fun compactWidth_initialState_showsListPane() {
composeTestRule.apply { composeTestRule.apply {
setContent { setContent {
with(TestDeviceConfig.Compact) { with(TestDeviceConfig.Compact) {
@ -151,7 +150,7 @@ class InterestsListDetailScreenTest {
} }
@Test @Test
fun notExpandedWidth_topicSelected_showsTopicDetailPane() { fun compactWidth_topicSelected_showsTopicDetailPane() {
composeTestRule.apply { composeTestRule.apply {
setContent { setContent {
with(TestDeviceConfig.Compact) { with(TestDeviceConfig.Compact) {
@ -205,7 +204,7 @@ class InterestsListDetailScreenTest {
} }
@Test @Test
fun notExpandedWidth_backPressFromTopicDetail_showsListPane() { fun compactWidth_backPressFromTopicDetail_showsListPane() {
composeTestRule.apply { composeTestRule.apply {
setContent { setContent {
with(TestDeviceConfig.Compact) { with(TestDeviceConfig.Compact) {

Loading…
Cancel
Save