asserting-bounds-and-dimensions
CommunityAssert Compose layout bounds in dp
Software Engineering#jetpack-compose#ui-testing#touch-target#tolerance#layout-assertions#dp-bounds#clipped-vs-unclipped
Authorskydoves
Version1.0.0
Installs0
System Documentation
What problem does it solve?
It solves the problem of unreliable Compose UI assertions by helping you verify layout sizes, positions, padding, and touch-target dimensions in dp with the framework’s expected tolerance model.
Core Features & Use Cases
- dp-typed size and position assertions: Use APIs like
assertWidthIsEqualTo,assertHeightIsAtLeast, andassertPositionInRootIsEqualToinstead of pixel math. - clipped vs unclipped bounds correctness: Use
getUnclippedBoundsInRoot()for layout math (padding/gap/alignment) andgetBoundsInRoot()only for what users see after clipping. - touch-target verification: Use
assertTouchWidthIsEqualTo/assertTouchHeightIsEqualToto validate tap accessibility rather than visual bounds. - alignment line and link bounds support: Read baseline via
getAlignmentLinePositionand inspect annotated text ranges withgetFirstLinkBounds.
Quick Start
Use this skill to assert a composable’s width/height and its position in the root using the dp-typed assertions and unclipped bounds for padding math.
Dependency Matrix
Required Modules
None requiredComponents
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: asserting-bounds-and-dimensions Download link: https://github.com/skydoves/android-testing-skills/archive/main.zip#asserting-bounds-and-dimensions Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.