testing-lazy-lists

Community

Scroll lazy lists reliably in Compose tests

Authorskydoves
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It solves flaky Compose UI tests for LazyColumn, LazyRow, and LazyVerticalGrid where off-screen items break naive assertions and scrolling by text.

Core Features & Use Cases

  • Semantic-first scrolling: Scroll by index or key using the list’s semantic actions, with test-tag disambiguation when multiple scrollables exist.
  • Correct visibility assertions: Use assertIsDisplayed instead of assertExists to avoid false positives from lazy composed or detached semantics.
  • Ground-truth verification: Read LazyListState.layoutInfo.visibleItemsInfo to confirm what is actually visible, including when animations reorder items.

Quick Start

Use testing-lazy-lists to reliably tag the Lazy container and items, scroll via performScrollToIndex or performScrollToKey, and assert on-screen items with assertIsDisplayed while validating visibility using state.layoutInfo.visibleItemsInfo.

Dependency Matrix

Required Modules

None required

Components

Standard package

đŸ’» Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: testing-lazy-lists
Download link: https://github.com/skydoves/android-testing-skills/archive/main.zip#testing-lazy-lists

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.