원클릭으로
flutter-golden-testing
Step-by-step workflow for creating, configuring, and updating Flutter golden tests using the Alchemist package.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Step-by-step workflow for creating, configuring, and updating Flutter golden tests using the Alchemist package.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Process for creating mock data sources in the infrastructure layer.
Process for building, exporting, and registering reusable UI components in the packages/app_ui package. References design-to-code.md for design tokens (typography, colors, spacing).
Outlines the process for converting Figma designs into a structured, platform-aware Flutter implementation.
Use when completely removing the web platform from the project. Details how to delete directories/configurations, clean up app_ui web components, remove web-specific feature views (*_view_web.dart), prune conditional imports/logic, and run validation.
Use when asked to add, update, or group routes using GoRouter, or manage redirection guards.
Use when asked to create a new feature or sub-feature following the DDD-lite architecture, or set up state, view, and page layers for a domain.
| name | flutter-golden-testing |
| description | Step-by-step workflow for creating, configuring, and updating Flutter golden tests using the Alchemist package. |
This skill outlines the step-by-step process for implementing and updating golden tests for Flutter widgets.
alchemist is present in the dev_dependencies of pubspec.yaml. If it is missing, install it:
flutter pub add --dev alchemist
goldens/ directory adjacent to your target test file to store the generated .png reference files.Create the test file named [widget_name]_test.dart (or [widget_name]_golden_test.dart).
package:flutter_test/flutter_test.dart and package:alchemist/alchemist.dart).loadAppFonts() (if applicable) before running the tests to prevent text from rendering as the Ahem font.Implement the test using alchemist APIs instead of the standard testWidgets.
goldenTest: Define your test using the goldenTest function.CircularProgressIndicator).mocktail_image_network or network_image_mock).GoldenTestGroup and GoldenTestScenario to lay out all possible widget states (e.g., loading, success, error) and variations (light/dark mode, text scaling) within a single test execution.flutter test --update-goldens
.png files were correctly generated in the goldens/ directory.**/failures/ is in the project's .gitignore so test failure artifacts are not accidentally committed.If you are modifying an existing widget that already has golden tests, run the update command (flutter test --update-goldens) to regenerate the images. Never modify the .png files manually.