Closed
Conversation
Implements automated screenshot testing workflow that: - Runs on push to main/github-actions branches and PRs to main - Sets up Android emulator (Pixel 3a, API 28) with AVD caching - Executes connectedDebugAndroidTest for all screenshot tests - Uploads test results and screenshots as artifacts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add chmod +x step to ensure gradlew has execute permissions before running tests, fixing the "./gradlew: not found" error. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Move chmod +x command inside emulator runner and pull screenshots script blocks to ensure permissions are set in the correct context. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Set executable permission bit on gradlew file to fix "./gradlew: not found" error in GitHub Actions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Change multiline script to single line with && to ensure cd and gradlew execution happen in the same shell context. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add working-directory to run gradlew from android directory. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Run ./android/gradlew with -p android flag instead of trying to cd into the directory, avoiding path resolution issues. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Facebook screenshot library 0.15.0 has compatibility issues with API 28. Upgrading to API 30 with google_apis target should resolve the NoSuchMethodException error. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
API 30 had emulator startup issues. API 29 is more stable in GitHub Actions. Also added disable-spellchecker option. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Increase timeout from 30 to 45 minutes - Add Gradle dependency caching to speed up builds - Enable parallel Gradle builds and build caching - Build only x86_64 architecture (emulator arch) instead of all 4 - Increase JVM heap size for faster compilation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Attempt to fix NoSuchMethodException on API 29 by upgrading from 0.15.0 to 0.15.1 which may have better compatibility. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Version 0.15.1 doesn't exist. Reverted to 0.15.0 and downgraded emulator from API 29 to API 26 (Android 8.0) which has better compatibility with the Facebook screenshot library. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add disk space cleanup step to remove unused SDKs - Fix reactNativeArchitectures to properly build only x86_64 - Previous syntax was incorrect and built all 4 architectures 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Configure Facebook screenshot testing plugin with multipleDevices mode enabled and python3 executable. Add Python setup step to GitHub Actions workflow to support screenshot processing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Modified screenshot tests to save complete, single-image screenshots instead of tiled images. Removed Screenshot.snap() calls and updated all test methods to use manual bitmap compression. Screenshots now saved to /sdcard/screenshots/com.testapp.test/full/ for easy access. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Keep EAASE-based workflow from main branch. Screenshot test changes for complete non-tiled images remain from github-actions branch. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added Python 3.x installation step to the GitHub Actions workflow to support the Facebook screenshot testing plugin's image processing requirements. This addresses the TODO comment about needing Python fixes for recordDebugAndroidTestScreenshotTest. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added steps to pull screenshots from emulator and upload them as GitHub Actions artifacts. This allows viewing test screenshots directly from the workflow run without needing to download them manually. Changes: - Pull screenshots from /sdcard/screenshots and app storage - Upload all screenshots and test reports as artifacts - Use if: always() to ensure artifacts are collected even if tests fail Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Changed artifact path to only include XML test results, excluding profiling files that contain colons in filenames which are not allowed in GitHub Actions artifacts. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…chris-workspace into github-actions
Enables screenshot tests to render actual React Native stories instead of manually recreating UI in native Android code. Currently requires Metro bundler running during tests. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Use Screenshot.snap() API instead of manual bitmap saving. Extract React Native load timeout to constant. Simplify StoryRenderer component. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Bundle JavaScript directly into APK by setting debuggableVariants to empty list, allowing tests to run without manually starting Metro. Reduced timeout from 15s to 5s since bundled JS loads faster. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Validates that StoryRenderer infrastructure works for multiple story states. Tests render stories with clickCount=5 and clickCount=42 respectively. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Instead of hardcoding component mappings and state, StoryRenderer now uses Storybook's actual view._idToPrepared to render any story dynamically. Also exports getAllStoryIds() and getAllStories() helpers for automatic test generation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- StorybookRegistry: Native module that receives story list from JS - ScreenshotTestPackage: Registers the native module - StoryRenderer: Updated to register stories with native module on load - StoryManifestBootstrapTest: Generates the story manifest - StoryScreenshotTest: Screenshots all discovered stories automatically This allows screenshot tests to automatically discover and test all Storybook stories without manually writing test methods for each one. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use view._preview.getStoryContext() for proper story context - Render story as React component with spread props - Replace Screenshot.snap() with direct Bitmap capture - Save full-resolution PNGs to stories/ directory Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Delete Button, Header, and Page example stories and components that were generating errors in screenshot tests. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace custom bitmap capture with Screenshot.snap().record() to enable baseline storage and visual regression detection. Note: recordDebugAndroidTestScreenshotTest task fails on Gradle 9 due to deprecated API usage - needs fix in library. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…lity - Downgrade from Gradle 9.0.0 to 8.14.3 (library not yet compatible with Gradle 9) - Change pythonExecutable to 'py' for Windows compatibility - Set architecture to x86 for emulator testing - Add baseline screenshots for all 17 Storybook stories Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update core library to 0.18.0 (matching plugin version) - Add failureDir config (required to avoid NPE in 0.18.0) - Update baseline screenshots for new device config Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Create initial package structure for the reusable library: - JS: StoryRenderer component with configure() API - Android: StorybookRegistry native module - Package.json with peer dependencies - React Native autolinking config - README with setup instructions This is a structural change - the app still uses the original files. Next PR will migrate the app to use this package. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move story rendering and registry logic into the reusable package. App now imports from the package instead of inline implementation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The StorybookRegistry and ScreenshotTestPackage are now provided by the rn-storybook-auto-screenshots package. Remove the duplicate code from the app. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move the StoryRendererActivity logic into the package as a base class. Apps now just need to create a one-line subclass. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use getExternalFilesDir() instead of /sdcard/ paths which don't work on Android 13 (API 33+) due to scoped storage restrictions. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Skip Screenshotbot verify step temporarily while debugging the adb disconnection issue with eaase. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add reusable base classes for screenshot testing: - BaseScreenshotTestRunner: Base test runner for screenshot tests - BaseStoryManifestTest: Base test for generating story manifest - BaseStoryScreenshotTest: Base test for auto-discovery and screenshotting App test files now extend these base classes, reducing boilerplate significantly (197 lines removed from app). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change test infrastructure dependencies from api to compileOnly so they don't get bundled into consuming apps. Apps using the base test classes must add these dependencies to their own androidTestImplementation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Document all base classes, required dependencies, and step-by-step setup guide for new React Native apps. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- react: >=18.0.0 - react-native: >=0.72.0 - @storybook/react-native: >=8.0.0 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Collaborator
Author
|
Superseded by newer work |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated peer dependencies.