Skip to content

Add instrumented E2E tests and emulator CI job#1

Open
morozione wants to merge 3 commits into
mainfrom
add-e2e-tests
Open

Add instrumented E2E tests and emulator CI job#1
morozione wants to merge 3 commits into
mainfrom
add-e2e-tests

Conversation

@morozione

Copy link
Copy Markdown
Owner

What

  • Library E2E tests (library/src/androidTest): Compose UI tests for RollingAnimatedText — initial render, digit change settling on the new value, odometer growth (99 -> 100), instant update with animateChanges = false, non-digit replacement, auto-size in a narrow container.
  • Full-activity E2E tests (sample/src/androidTest): launches the real MainActivity with createAndroidComposeRule<MainActivity>(), clicks the actual counter buttons (+1 / +10 / -1) and asserts the rolled result. Assertions are scoped via a new counter test tag since the balance section also renders digits.
  • CI: new e2e job that enables KVM, boots an API 34 emulator (reactivecircus/android-emulator-runner) and runs connectedDebugAndroidTest for both modules. Runs in parallel with the existing build job.
  • Also adds CLAUDE.md (build commands + architecture notes).

Notes

  • Mid-animation, a digit node contains the whole multi-line drum text, so exact-text matchers only match once the animation settles — tests use waitUntil for that.
  • Uses the new androidx.compose.ui.test.junit4.v2 rules (the non-v2 ones are deprecated in this Compose version).

- Library: Compose UI tests for RollingAnimatedText (initial render,
  digit rolling, odometer growth 99->100, animateChanges=false,
  non-digit replacement, auto-size in narrow container)
- Sample: full-activity E2E tests launching MainActivity via
  createAndroidComposeRule, clicking the real counter buttons and
  asserting the rolled result (scoped by a new counter test tag)
- CI: new e2e job enabling KVM and running connectedDebugAndroidTest
  for both modules on an API 34 emulator
48dp cannot fit 10 digit slots even at the 10sp minimum font size, so
the row overflowed and the last digit failed assertIsDisplayed. Use
120dp: still forces auto-size to shrink from 32sp, but the shrunk row
fits and every digit stays visible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant