소스 정보
- 저장소
- tomevault-io/skills-registry
- 최근 소스 활동
- 2026년 5월 23일 22:30
- 감지된 SKILL.md 언어
- 영어
- 스타
- 0
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill flutter-adaptive-cards-testing명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
| Use when this capability is needed.
> Use when this capability is needed.
Review architecture and API design for the vfs-s3 project. Use when the user mentions @architect, asks to review an issue's design, discuss module boundaries, API shape, or architectural decisions for vfs-s3. Also trigger when the user wants to create an ADR (Architecture Decision Record) or evaluate a technical approach for the project. Intended for dispatch from Codex automation or Claude routines; GitHub trigger phrase: @vfs-s3-bot please prepare design doc Use when this capability is needed.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | flutter-adaptive-cards-testing |
| description | > Use when this capability is needed. |
All library tests live under:
packages/flutter_adaptive_cards_fs/test/
Tests are run from that package directory, not the monorepo root:
cd packages/flutter_adaptive_cards_fs
fvm flutter test # all tests
fvm flutter test test/golden_sample_test.dart # specific file
fvm flutter test --tags golden # only golden image tests
fvm flutter test --update-goldens # regenerate golden images
To ensure tests are resilient to UI refactoring, always locate widgets via
generateWidgetKey() / generateAdaptiveWidgetKey() rather than hardcoded
ValueKey strings or text/type finders.
import 'package:flutter_adaptive_cards_fs/src/utils/utils.dart';
// Extract the element map from the card body before assertions
final elementMap = map['body'][0] as Map<String, dynamic>;
// [GOOD] Derived from the same map used to build the widget
expect(find.byKey(generateWidgetKey(elementMap)), findsOneWidget);
// [GOOD] Outer StatefulWidget wrapper
expect(find.byKey(generateAdaptiveWidgetKey(elementMap)), findsOneWidget);
// [GOOD] ChoiceSet item (suffix form)
expect(
find.byKey(generateWidgetKey(elementMap, suffix: 'Choice 1')),
findsOneWidget,
);
// [NEVER] Hard-coded string — breaks silently if the id format changes
// find.byKey(const ValueKey('submitButton')) ← do NOT do this
// [AVOID] Brittle and broken by text changes
// find.text('Submit')
// [AVOID] Ambiguous in large cards
// find.byType(ElevatedButton)
[!IMPORTANT] Never write
find.byKey(const ValueKey('someId'))in tests. If the key format ever changes, string literals silently break whereasgenerateWidgetKey()calls continue to match the live implementation.
test/utils/test_utils.dartImport this in every test file:
import 'utils/test_utils.dart';
getTestWidgetFromPath & getTestWidgetFromMap — Primary Test HelpersThese helpers load an Adaptive Card (from a file or a Map) and return a fully-wrapped MaterialApp.
[!IMPORTANT] Mandatory Usage: Always use these helpers instead of
RawAdaptiveCard.fromMaporAdaptiveCardsCanvasdirectly. They ensure that:
- ID Injection: Missing IDs are recursively injected into the JSON map.
- Context: Necessary
ProviderScopeandInheritedAdaptiveCardHandlersare provided.- UI Context: The card is wrapped in a
MaterialApp,Scaffold, andRepaintBoundary.
Architecture Note: These helpers automatically wrap the card in:
key, used to target specific regions for golden images.onSubmit, onExecute, onChange, etc., if provided as arguments.Widget getTestWidgetFromPath({
required String path, // relative to test/samples/
Key? key, // targets the RepaintBoundary for Goldens
// ... handlers
})
Widget getTestWidgetFromMap({
required Map<String, dynamic> map,
required String title,
Key? key,
// ... handlers
})
All widgets use deterministic ValueKeys generated by two functions from
package:flutter_adaptive_cards_fs/src/utils/utils.dart.
| Widget Type | Generator call | Produced key |
|---|---|---|
| Card Wrapper | generateAdaptiveWidgetKey(elementMap) | ValueKey('{id}_adaptive') |
| Input Content | generateWidgetKey(elementMap) | ValueKey('{id}') |
| ChoiceSet Item | generateWidgetKey(elementMap, suffix: 'Choice 1') | ValueKey('{id}_Choice 1') |
| Modal Search | generateWidgetKey(elementMap) | Same id as input field |
import 'package:flutter_adaptive_cards_fs/src/utils/utils.dart';
// 1. Define the card map
final Map<String, dynamic> map = {
'type': 'AdaptiveCard',
'body': [
{'type': 'Input.Text', 'id': 'myField', 'label': 'Name'},
],
};
// 2. Pump the widget
await tester.pumpWidget(getTestWidgetFromMap(map: map, title: 'Test'));
await tester.pumpAndSettle();
// 3. Extract element map — the single source of truth for keys
final fieldMap = map['body'][0] as Map<String, dynamic>;
// 4. Find widgets
expect(find.byKey(generateAdaptiveWidgetKey(fieldMap)), findsOneWidget); // wrapper
expect(find.byKey(generateWidgetKey(fieldMap)), findsOneWidget); // input
// 5. Interact
await tester.enterText(find.byKey(generateWidgetKey(fieldMap)), 'hello');
Reference: See AdaptiveWidget-Key-Generation.md for the full key contract and automatic ID injection rules.
[!WARNING] Golden image pixels are platform-specific. This project organizes golden images into platform-specific subdirectories:
test/gold_files/linux/: Project-wide source of truth (CI generated).test/gold_files/macos/: Local verification images.Updating Goldens: Should primarily be done via CI (for Linux results). Use
getGoldenPath(filename)to dynamically resolve the path.
testWidgets('My Card Golden', (tester) async {
// 1. Fixed viewport
RendererBinding.instance.renderViews.first.configuration =
TestViewConfiguration.fromView(
size: const Size(500, 700),
view: PlatformDispatcher.instance.implicitView!,
);
const key = ValueKey('paint');
// 2. Load and Pump
await tester.pumpWidget(getTestWidgetFromPath(path: 'my_card.json', key: key));
await tester.pumpAndSettle();
// 3. Compare (Note: targets the key, uses dynamic platform path)
await expectLater(
find.byKey(key),
matchesGoldenFile(getGoldenPath('my_card-base.png')),
);
}, tags: ['golden']);
You can generate goldens on your local machine for visual verification purposes, but they will not be used for CI testing and they should not be comitted to the repository.
cd packages/flutter_adaptive_cards_fs
flutter test --update-goldens --tags golden
Warning: Golden image pixels are platform-specific. macOS-generated goldens may not match Linux CI exactly. The project uses
dart_test.yamlto manage this. Checktest/analysis_options.yamlfor any tag restrictions.
The local AI agents should always run the tests with the --exclude-tags golden flag to speed up the test execution and because local execution of golden tests will fail due to the platform aliasing issues.
flutter test --exclude-tags golden
Sample JSON cards live in test/samples/.
Always add a new sample JSON when implementing a feature or fixing a bug to enable regression testing and designer validation.
test/samples/feature_name.json.getTestWidgetFromPath(path: 'feature_name.json').Source: freemansoft/Flutter-AdaptiveCards — distributed by TomeVault.