asserting-bounds-and-dimensions

Community

Assert Compose layout bounds in dp

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, and assertPositionInRootIsEqualTo instead of pixel math.
  • clipped vs unclipped bounds correctness: Use getUnclippedBoundsInRoot() for layout math (padding/gap/alignment) and getBoundsInRoot() only for what users see after clipping.
  • touch-target verification: Use assertTouchWidthIsEqualTo / assertTouchHeightIsEqualTo to validate tap accessibility rather than visual bounds.
  • alignment line and link bounds support: Read baseline via getAlignmentLinePosition and inspect annotated text ranges with getFirstLinkBounds.

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 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: 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.
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.