0.2.54
This commit is contained in:
@@ -11,14 +11,14 @@ class JourneyAnalyticsTest {
|
||||
val analytics = JourneyAnalytics(userId = "user-1", now = { 1_700_000_000_000L }, journeyId = "journey-1")
|
||||
analytics.track(
|
||||
category = "content", action = "open", screen = "home screen",
|
||||
feature = "latest_movies", itemId = "item/unsafe", itemType = "Movie",
|
||||
feature = "latest_movies", itemName = "Whale Rider", itemType = "Movie",
|
||||
)
|
||||
val events = analytics.drain()
|
||||
|
||||
assertEquals(listOf(0, 1), events.map { it.sequence })
|
||||
assertEquals("user-1", events.last().userId)
|
||||
assertEquals("homescreen", events.last().screen)
|
||||
assertEquals("itemunsafe", events.last().itemId)
|
||||
assertEquals("Whale Rider", events.last().itemName)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -21,7 +21,7 @@ import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.asImageBitmap
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.test.junit4.createComposeRule
|
||||
import androidx.compose.ui.test.onNodeWithText
|
||||
import androidx.compose.ui.test.onAllNodesWithText
|
||||
import androidx.compose.ui.test.onRoot
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
@@ -31,6 +31,7 @@ import com.github.takahirom.roborazzi.captureRoboImage
|
||||
import com.ponzischeme89.memby.ServiceLocator
|
||||
import com.ponzischeme89.memby.data.model.BaseItem
|
||||
import org.junit.Before
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
@@ -57,8 +58,8 @@ class HomeMovieHeroScreenshotTest {
|
||||
|
||||
/**
|
||||
* The case the audit reproduced: with a title long enough to wrap, the card's content
|
||||
* column overflowed its fixed height and the green Play chip — the last thing in the
|
||||
* column — was clipped away entirely. It has to survive here.
|
||||
* column used to overflow its fixed height around the individual Play chip. The hero
|
||||
* now opens the listing page as one clear card, including for a wrapping title.
|
||||
*/
|
||||
@Test
|
||||
fun `home hero with a wrapping title`() {
|
||||
@@ -81,7 +82,7 @@ class HomeMovieHeroScreenshotTest {
|
||||
|
||||
/**
|
||||
* The hero the gateway composes. Two things are only checkable by looking: the reason
|
||||
* takes the synopsis's place rather than adding a line above the Play chip, and a
|
||||
* takes the synopsis's place without crowding the facts beneath it, and a
|
||||
* series premiere leading the launcher has to read as deliberate rather than as a TV
|
||||
* show that wandered into the movie hero.
|
||||
*/
|
||||
@@ -211,7 +212,7 @@ class HomeMovieHeroScreenshotTest {
|
||||
}
|
||||
}
|
||||
|
||||
compose.onNodeWithText("Play").fetchSemanticsNode()
|
||||
assertTrue(compose.onAllNodesWithText("Play").fetchSemanticsNodes().isEmpty())
|
||||
compose.onRoot().captureRoboImage("build/screenshots/home-movie-hero/$name.png")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user