timo-drick/compose_edge_to_edge_preview/integrate-edge-to-edge-test-lib
Claude Code and agent skill by timo-drick/compose_edge_to_edge_preview
- community
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install timo-drick/compose_edge_to_edge_preview/integrate-edge-to-edge-test-libSKILL.md
Skill: Integrate edge_to_edge_test_lib
Use this skill when an AI agent must add automated window-insets overlap checks to an Android Compose test setup by integrating:
- Module:
edge_to_edge_test_lib - Maven artifact:
de.drick.compose:edge-to-edge-test
This skill covers both Android instrumented tests (androidTest) and local Robolectric tests (test).
Goal
After applying this skill, the target project should be able to assert that UI nodes do not overlap with selected WindowInsets types by using assertWindowInsets(...) in Compose tests.
Prerequisites
- The target project already uses Compose UI tests (
createComposeRuleor equivalent). - The agent can edit Gradle files and at least one test file.
- For Robolectric flow, the module already has Robolectric test infrastructure.
Step 1: Detect test mode and target source set
Classify where checks will run before editing:
- Instrumented/device tests
- Source set:
src/androidTest - Dependency scope:
androidTestImplementation
- Robolectric/local JVM tests
- Source set:
src/test - Dependency scope:
testImplementation
If both are required, configure both paths.
Step 2: Add dependencies
2A. Instrumented tests (androidTest)
Add:
2B. Robolectric tests (test)
Add:
Why both in Robolectric:
edge-to-edge-testperforms overlap assertions.edge-to-edge-previewcan simulate deterministic inset configurations (for example withEdgeToEdgeTemplate) in local tests.
If the project uses a version catalog, prefer aliases over hardcoded coordinates.
Step 3: Prepare test content correctly
In the composable test content:
- Ensure edge-to-edge is enabled when needed (especially with
createComposeRuleactivity-backed setup). - Add
SemanticsWindowInsetsAnchor()in the hierarchy.
Minimal setup pattern:
Important:
- If
SemanticsWindowInsetsAnchor()is missing, assertions fail with an anchor-not-found error. - If insets are empty, assertions can fail with a message indicating edge-to-edge is likely not enabled.
Step 4: Add overlap assertions
Use assertWindowInsets(...) on one node or a node collection.
Typical checks:
Useful options:
excludeVerticalScrollSides(defaulttrue) for scroll-aware checks.complainAboutNoWindowInsets(collection overload) when debugging empty-insets environments.onOverlapcallback for custom diagnostics.
Step 5: Optional diagnostics screenshots (instrumented)
For instrumented tests, you can capture overlap screenshots in onOverlap:
This helps triage failures by persisting highlighted overlap images in test outputs.
Step 6: Robolectric-specific setup guidance
In Robolectric tests, use deterministic inset simulation in setContent, typically via EdgeToEdgeTemplate, then run the same assertWindowInsets(...) checks.
Common pattern:
- Wrap UI in
EdgeToEdgeTemplate(...). - Include
SemanticsWindowInsetsAnchor(). - Optionally set Robolectric SDK explicitly when needed (for example
@Config(sdk = [34])).
Step 7: Verify integration
Minimum verification checklist:
- Gradle sync succeeds.
- Tests compile with imports:
SemanticsWindowInsetsAnchorassertWindowInsetsWindowInsetsCompat.Type
- At least one test runs and exercises overlap assertions.
- At least one assertion checks
systemBars+displayCutoutortappableElement.
Common pitfalls and fixes
- `SemanticsWindowInsetsAnchor` not found error
- Add
SemanticsWindowInsetsAnchor()insidesetContentbefore assertions execute.
- Detected window insets are empty
- Ensure edge-to-edge is enabled in the host activity/test environment.
- Robolectric does not reflect expected insets
- Simulate insets using
EdgeToEdgeTemplate(...)and ensure proper SDK config.
- Wrong dependency scope
- Use
androidTestImplementationfor instrumented tests andtestImplementationfor local tests.
Done criteria
Mark integration complete only when all are true:
- Correct dependency scope(s) are configured for intended test mode(s).
- Test content includes
SemanticsWindowInsetsAnchor(). - At least one meaningful
assertWindowInsets(...)check is present. - Target test task(s) compile and run successfully.
Reference
- `reference/integration-checklist.md`
- Compact handoff checklist for fast agent-to-agent transfer.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingai_skills/integrate-edge-to-edge-test-lib/SKILL.md
Popularity
- Repository stars
- 57
- Repository forks
- 1
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 May 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/timo-drick/compose_edge_to_edge_preview/integrate-edge-to-edge-test-lib)