pull/521/head
Don Turner 2 years ago
parent 32bc5c1590
commit 99227b06b5

@ -89,5 +89,5 @@ class NewsResourceCardTest {
.onNodeWithText(followableTopics[1].topic.name)
.assertContentDescriptionEquals("UI is followed")
}
//TODO add a test for not followed - figure out whether to put it here or to make a new test
}
// TODO add a test for not followed - figure out whether to put it here or to make a new test
}

@ -52,6 +52,7 @@ import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import coil.compose.AsyncImage
import com.google.samples.apps.nowinandroid.core.designsystem.R as DesignsystemR
import com.google.samples.apps.nowinandroid.core.designsystem.component.NiaIconToggleButton
import com.google.samples.apps.nowinandroid.core.designsystem.component.NiaTopicTag
import com.google.samples.apps.nowinandroid.core.designsystem.icon.NiaIcons
@ -61,12 +62,11 @@ import com.google.samples.apps.nowinandroid.core.domain.model.UserNewsResource
import com.google.samples.apps.nowinandroid.core.domain.model.previewUserNewsResources
import com.google.samples.apps.nowinandroid.core.model.data.NewsResource
import com.google.samples.apps.nowinandroid.core.model.data.NewsResourceType
import kotlinx.datetime.Instant
import kotlinx.datetime.toJavaInstant
import java.time.ZoneId
import java.time.format.DateTimeFormatter
import java.util.*
import com.google.samples.apps.nowinandroid.core.designsystem.R as DesignsystemR
import java.util.Locale
import kotlinx.datetime.Instant
import kotlinx.datetime.toJavaInstant
/**
* [NewsResource] card used on the following screens: For You, Saved
@ -252,13 +252,15 @@ fun NewsResourceTopics(
onUnfollowClick = { }, // ToDo
onBrowseClick = { }, // ToDo
text = {
Text(text = followableTopic.topic.name.uppercase(Locale.getDefault()),
Text(
text = followableTopic.topic.name.uppercase(Locale.getDefault()),
modifier = Modifier.semantics {
contentDescription = followableTopic.topic.name +
if (followableTopic.isFollowed) " is followed"
else " is not followed"
//make sure this is the right place to add this - remove hardcoded strings
})
// make sure this is the right place to add this - remove hardcoded strings
}
)
}
)
}

Loading…
Cancel
Save