[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75Q44G1S26W2J3X4VC20J34":3,"skill-same:01M75Q44G1S26W2J3X4VC20J34":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":14,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":6,"updatedAt":33,"install":34,"resources":47},"01M75Q44G1S26W2J3X4VC20J34","flutter-add-integration-test",null,"Configures Flutter Driver for app interaction and converts MCP actions into permanent integration tests. Use when adding integration testing to a project, exploring UI components via MCP, or automating user flows with the integration_test package.","mictlanix\u002Fmbe-ui","mictlanix","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F703184?v=4","01M75Q1XD9477GXRKPM6JVVC11","Mictlanix","01M75Q1XDXKYX3VS9T3CS2XEFR",0,"MIT","https:\u002F\u002Fgithub.com\u002Fmictlanix\u002Fmbe-ui\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fflutter-add-integration-test\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: flutter-add-integration-test\ndescription: Configures Flutter Driver for app interaction and converts MCP actions into permanent integration tests. Use when adding integration testing to a project, exploring UI components via MCP, or automating user flows with the integration_test package.\nmetadata:\n  model: models\u002Fgemini-3.1-pro-preview\n  last_modified: Tue, 21 Apr 2026 18:29:20 GMT\n---\n# Implementing Flutter Integration Tests\n\n## Contents\n- [Project Setup and Dependencies](#project-setup-and-dependencies)\n- [Interactive Exploration via MCP](#interactive-exploration-via-mcp)\n- [Test Authoring Guidelines](#test-authoring-guidelines)\n- [Execution and Profiling](#execution-and-profiling)\n- [Workflow: End-to-End Integration Testing](#workflow-end-to-end-integration-testing)\n- [Examples](#examples)\n\n## Project Setup and Dependencies\n\nConfigure the project to support integration testing and Flutter Driver extensions.\n\n1. Add required development dependencies to `pubspec.yaml`:\n   ```bash\n   flutter pub add 'dev:integration_test:{\"sdk\":\"flutter\"}'\n   flutter pub add 'dev:flutter_test:{\"sdk\":\"flutter\"}'\n   ```\n2. Enable the Flutter Driver extension in your application entry point (typically `lib\u002Fmain.dart` or a dedicated `lib\u002Fmain_test.dart`):\n   - Import `package:flutter_driver\u002Fdriver_extension.dart`.\n   - Call `enableFlutterDriverExtension();` before `runApp()`.\n3. Add `Key` parameters (e.g., `ValueKey('login_button')`) to critical widgets in the application code to ensure reliable targeting during tests.\n\n## Interactive Exploration via MCP\n\nUse the Dart\u002FFlutter MCP server tools to interactively explore and manipulate the application state before writing static tests.\n\n- **Launch**: Execute `launch_app` with `target: \"lib\u002Fmain_test.dart\"` to start the application and acquire the DTD URI.\n- **Inspect**: Execute `get_widget_tree` to discover available `Key`s, `Text` nodes, and widget `Type`s.\n- **Interact**: Execute `tap`, `enter_text`, and `scroll` to simulate user flows.\n- **Wait**: Always execute `waitFor` or verify state with `get_health` when navigating or triggering animations.\n- **Troubleshoot Unmounted Widgets**: If a widget is not found in the tree, it may be lazily loaded in a `SliverList` or `ListView`. Execute `scroll` or `scrollIntoView` to force the widget to mount before interacting with it.\n\n## Test Authoring Guidelines\n\nStructure integration tests using the `flutter_test` API paradigm. \n\n- Create a dedicated `integration_test\u002F` directory at the project root.\n- Name all test files using the `\u003Cname>_test.dart` convention.\n- Initialize the binding by calling `IntegrationTestWidgetsFlutterBinding.ensureInitialized();` at the start of `main()`.\n- Load the application UI using `await tester.pumpWidget(MyApp());`.\n- Trigger frames and wait for animations to complete using `await tester.pumpAndSettle();` after interactions like `tester.tap()`.\n- Assert widget visibility using `expect(find.byKey(ValueKey('foo')), findsOneWidget);` or `findsNothing`.\n- Scroll to specific off-screen widgets using `await tester.scrollUntilVisible(itemFinder, 500.0, scrollable: listFinder);`.\n\n**Conditional Logic for Legacy `flutter_driver`:**\n- If maintaining or migrating legacy `flutter_driver` tests, use `driver.waitFor()`, `driver.waitForAbsent()`, `driver.tap()`, and `driver.scroll()` instead of the `WidgetTester` APIs.\n\n## Execution and Profiling\n\nExecute tests using the `flutter drive` command. Require a host driver script located in `test_driver\u002Fintegration_test.dart` that calls `integrationDriver()`.\n\n**Conditional Execution Targets:**\n- **If testing on Chrome:** Launch `chromedriver --port=4444` in a separate terminal, then run:\n  `flutter drive --driver=test_driver\u002Fintegration_test.dart --target=integration_test\u002Fapp_test.dart -d chrome`\n- **If testing headless web:** Run with `-d web-server`.\n- **If testing on Android (Local):** Run `flutter drive --driver=test_driver\u002Fintegration_test.dart --target=integration_test\u002Fapp_test.dart`.\n- **If testing on Firebase Test Lab (Android):** \n  1. Build debug APK: `flutter build apk --debug`\n  2. Build test APK: `.\u002Fgradlew app:assembleAndroidTest`\n  3. Upload both APKs to the Firebase Test Lab console.\n\n## Workflow: End-to-End Integration Testing\n\nCopy and follow this checklist to implement and verify integration tests.\n\n- [ ] **Task Progress: Setup**\n  - [ ] Add `integration_test` and `flutter_test` to `pubspec.yaml`.\n  - [ ] Inject `enableFlutterDriverExtension()` into the app entry point.\n  - [ ] Assign `ValueKey`s to target widgets.\n- [ ] **Task Progress: Exploration**\n  - [ ] Run `launch_app` via MCP.\n  - [ ] Map the widget tree using `get_widget_tree`.\n  - [ ] Validate interaction paths using MCP tools (`tap`, `enter_text`).\n- [ ] **Task Progress: Authoring**\n  - [ ] Create `integration_test\u002Fapp_test.dart`.\n  - [ ] Write test cases using `WidgetTester` APIs.\n  - [ ] Create `test_driver\u002Fintegration_test.dart` with `integrationDriver()`.\n- [ ] **Task Progress: Execution & Feedback Loop**\n  - [ ] Run `flutter drive --driver=test_driver\u002Fintegration_test.dart --target=integration_test\u002Fapp_test.dart`.\n  - [ ] **Feedback Loop**: Review test output -> If `PumpAndSettleTimedOutException` occurs, check for infinite animations -> If widget not found, add `scrollUntilVisible` -> Re-run test until passing.\n\n## Examples\n\n### Standard Integration Test (`integration_test\u002Fapp_test.dart`)\n\n```dart\nimport 'package:flutter\u002Fmaterial.dart';\nimport 'package:flutter_test\u002Fflutter_test.dart';\nimport 'package:integration_test\u002Fintegration_test.dart';\nimport 'package:my_app\u002Fmain.dart';\n\nvoid main() {\n  IntegrationTestWidgetsFlutterBinding.ensureInitialized();\n\n  group('End-to-end test', () {\n    testWidgets('tap on the floating action button, verify counter', (tester) async {\n      \u002F\u002F Load app widget.\n      await tester.pumpWidget(const MyApp());\n\n      \u002F\u002F Verify the counter starts at 0.\n      expect(find.text('0'), findsOneWidget);\n\n      \u002F\u002F Find the floating action button to tap on.\n      final fab = find.byKey(const ValueKey('increment'));\n\n      \u002F\u002F Emulate a tap on the floating action button.\n      await tester.tap(fab);\n\n      \u002F\u002F Trigger a frame and wait for animations.\n      await tester.pumpAndSettle();\n\n      \u002F\u002F Verify the counter increments by 1.\n      expect(find.text('1'), findsOneWidget);\n    });\n  });\n}\n```\n\n### Host Driver Script (`test_driver\u002Fintegration_test.dart`)\n\n```dart\nimport 'package:integration_test\u002Fintegration_test_driver.dart';\n\nFuture\u003Cvoid> main() => integrationDriver();\n```\n\n### Performance Profiling Driver Script (`test_driver\u002Fperf_driver.dart`)\n\nUse this driver script if you wrap your test actions in `binding.traceAction()` to capture performance metrics.\n\n```dart\nimport 'package:flutter_driver\u002Fflutter_driver.dart' as driver;\nimport 'package:integration_test\u002Fintegration_test_driver.dart';\n\nFuture\u003Cvoid> main() {\n  return integrationDriver(\n    responseDataCallback: (data) async {\n      if (data != null) {\n        final timeline = driver.Timeline.fromJson(\n          data['scrolling_timeline'] as Map\u003CString, dynamic>,\n        );\n\n        final summary = driver.TimelineSummary.summarize(timeline);\n\n        await summary.writeTimelineToFile(\n          'scrolling_timeline',\n          pretty: true,\n          includeSummary: true,\n        );\n      }\n    },\n  );\n}\n```\n","# Implementing Flutter Integration Tests\n\n## Contents\n- [Project Setup and Dependencies](#project-setup-and-dependencies)\n- [Interactive Exploration via MCP](#interactive-exploration-via-mcp)\n- [Test Authoring Guidelines](#test-authoring-guidelines)\n- [Execution and Profiling](#execution-and-profiling)\n- [Workflow: End-to-End Integration Testing](#workflow-end-to-end-integration-testing)\n- [Examples](#examples)\n\n## Project Setup and Dependencies\n\nConfigure the project to support integration testing and Flutter Driver extensions.\n\n1. Add required development dependencies to `pubspec.yaml`:\n   ```bash\n   flutter pub add 'dev:integration_test:{\"sdk\":\"flutter\"}'\n   flutter pub add 'dev:flutter_test:{\"sdk\":\"flutter\"}'\n   ```\n2. Enable the Flutter Driver extension in your application entry point (typically `lib\u002Fmain.dart` or a dedicated `lib\u002Fmain_test.dart`):\n   - Import `package:flutter_driver\u002Fdriver_extension.dart`.\n   - Call `enableFlutterDriverExtension();` before `runApp()`.\n3. Add `Key` parameters (e.g., `ValueKey('login_button')`) to critical widgets in the application code to ensure reliable targeting during tests.\n\n## Interactive Exploration via MCP\n\nUse the Dart\u002FFlutter MCP server tools to interactively explore and manipulate the application state before writing static tests.\n\n- **Launch**: Execute `launch_app` with `target: \"lib\u002Fmain_test.dart\"` to start the application and acquire the DTD URI.\n- **Inspect**: Execute `get_widget_tree` to discover available `Key`s, `Text` nodes, and widget `Type`s.\n- **Interact**: Execute `tap`, `enter_text`, and `scroll` to simulate user flows.\n- **Wait**: Always execute `waitFor` or verify state with `get_health` when navigating or triggering animations.\n- **Troubleshoot Unmounted Widgets**: If a widget is not found in the tree, it may be lazily loaded in a `SliverList` or `ListView`. Execute `scroll` or `scrollIntoView` to force the widget to mount before interacting with it.\n\n## Test Authoring Guidelines\n\nStructure integration tests using the `flutter_test` API paradigm. \n\n- Create a dedicated `integration_test\u002F` directory at the project root.\n- Name all test files using the `\u003Cname>_test.dart` convention.\n- Initialize the binding by calling `IntegrationTestWidgetsFlutterBinding.ensureInitialized();` at the start of `main()`.\n- Load the application UI using `await tester.pumpWidget(MyApp());`.\n- Trigger frames and wait for animations to complete using `await tester.pumpAndSettle();` after interactions like `tester.tap()`.\n- Assert widget visibility using `expect(find.byKey(ValueKey('foo')), findsOneWidget);` or `findsNothing`.\n- Scroll to specific off-screen widgets using `await tester.scrollUntilVisible(itemFinder, 500.0, scrollable: listFinder);`.\n\n**Conditional Logic for Legacy `flutter_driver`:**\n- If maintaining or migrating legacy `flutter_driver` tests, use `driver.waitFor()`, `driver.waitForAbsent()`, `driver.tap()`, and `driver.scroll()` instead of the `WidgetTester` APIs.\n\n## Execution and Profiling\n\nExecute tests using the `flutter drive` command. Require a host driver script located in `test_driver\u002Fintegration_test.dart` that calls `integrationDriver()`.\n\n**Conditional Execution Targets:**\n- **If testing on Chrome:** Launch `chromedriver --port=4444` in a separate terminal, then run:\n  `flutter drive --driver=test_driver\u002Fintegration_test.dart --target=integration_test\u002Fapp_test.dart -d chrome`\n- **If testing headless web:** Run with `-d web-server`.\n- **If testing on Android (Local):** Run `flutter drive --driver=test_driver\u002Fintegration_test.dart --target=integration_test\u002Fapp_test.dart`.\n- **If testing on Firebase Test Lab (Android):** \n  1. Build debug APK: `flutter build apk --debug`\n  2. Build test APK: `.\u002Fgradlew app:assembleAndroidTest`\n  3. Upload both APKs to the Firebase Test Lab console.\n\n## Workflow: End-to-End Integration Testing\n\nCopy and follow this checklist to implement and verify integration tests.\n\n- [ ] **Task Progress: Setup**\n  - [ ] Add `integration_test` and `flutter_test` to `pubspec.yaml`.\n  - [ ] Inject `enableFlutterDriverExtension()` into the app entry point.\n  - [ ] Assign `ValueKey`s to target widgets.\n- [ ] **Task Progress: Exploration**\n  - [ ] Run `launch_app` via MCP.\n  - [ ] Map the widget tree using `get_widget_tree`.\n  - [ ] Validate interaction paths using MCP tools (`tap`, `enter_text`).\n- [ ] **Task Progress: Authoring**\n  - [ ] Create `integration_test\u002Fapp_test.dart`.\n  - [ ] Write test cases using `WidgetTester` APIs.\n  - [ ] Create `test_driver\u002Fintegration_test.dart` with `integrationDriver()`.\n- [ ] **Task Progress: Execution & Feedback Loop**\n  - [ ] Run `flutter drive --driver=test_driver\u002Fintegration_test.dart --target=integration_test\u002Fapp_test.dart`.\n  - [ ] **Feedback Loop**: Review test output -> If `PumpAndSettleTimedOutException` occurs, check for infinite animations -> If widget not found, add `scrollUntilVisible` -> Re-run test until passing.\n\n## Examples\n\n### Standard Integration Test (`integration_test\u002Fapp_test.dart`)\n\n```dart\nimport 'package:flutter\u002Fmaterial.dart';\nimport 'package:flutter_test\u002Fflutter_test.dart';\nimport 'package:integration_test\u002Fintegration_test.dart';\nimport 'package:my_app\u002Fmain.dart';\n\nvoid main() {\n  IntegrationTestWidgetsFlutterBinding.ensureInitialized();\n\n  group('End-to-end test', () {\n    testWidgets('tap on the floating action button, verify counter', (tester) async {\n      \u002F\u002F Load app widget.\n      await tester.pumpWidget(const MyApp());\n\n      \u002F\u002F Verify the counter starts at 0.\n      expect(find.text('0'), findsOneWidget);\n\n      \u002F\u002F Find the floating action button to tap on.\n      final fab = find.byKey(const ValueKey('increment'));\n\n      \u002F\u002F Emulate a tap on the floating action button.\n      await tester.tap(fab);\n\n      \u002F\u002F Trigger a frame and wait for animations.\n      await tester.pumpAndSettle();\n\n      \u002F\u002F Verify the counter increments by 1.\n      expect(find.text('1'), findsOneWidget);\n    });\n  });\n}\n```\n\n### Host Driver Script (`test_driver\u002Fintegration_test.dart`)\n\n```dart\nimport 'package:integration_test\u002Fintegration_test_driver.dart';\n\nFuture\u003Cvoid> main() => integrationDriver();\n```\n\n### Performance Profiling Driver Script (`test_driver\u002Fperf_driver.dart`)\n\nUse this driver script if you wrap your test actions in `binding.traceAction()` to capture performance metrics.\n\n```dart\nimport 'package:flutter_driver\u002Fflutter_driver.dart' as driver;\nimport 'package:integration_test\u002Fintegration_test_driver.dart';\n\nFuture\u003Cvoid> main() {\n  return integrationDriver(\n    responseDataCallback: (data) async {\n      if (data != null) {\n        final timeline = driver.Timeline.fromJson(\n          data['scrolling_timeline'] as Map\u003CString, dynamic>,\n        );\n\n        final summary = driver.TimelineSummary.summarize(timeline);\n\n        await summary.writeTimelineToFile(\n          'scrolling_timeline',\n          pretty: true,\n          includeSummary: true,\n        );\n      }\n    },\n  );\n}\n```\n",{"name":5,"metadata":24,"description":7},{"model":25,"last_modified":26},"models\u002Fgemini-3.1-pro-preview","Tue, 21 Apr 2026 18:29:20 GMT","main","228e23386ed058f8a2456399cd68f63999d63adf",".claude\u002Fskills\u002Fflutter-add-integration-test","https:\u002F\u002Fgithub.com\u002Fmictlanix\u002Fmbe-ui","https:\u002F\u002Fgithub.com\u002Fmictlanix","https:\u002F\u002Fmictlanix.com","2026-11-15 04:02:27",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add mictlanix\u002Fmbe-ui --skill flutter-add-integration-test",{"tool":40,"command":41},"bunx","bunx skills add mictlanix\u002Fmbe-ui --skill flutter-add-integration-test",{"tool":43,"command":44},"pnpm","pnpm dlx skills add mictlanix\u002Fmbe-ui --skill flutter-add-integration-test","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmictlanix\u002Fmbe-ui\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fflutter-add-integration-test\u002FSKILL.md",true,[],[49,56,61,68,75,82],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M75QCZHHB42Q7KJTZHQZXZ77","speckit-wireframes-draft","Draw low-fi wireframes for every screen and state the spec describes","https:\u002F\u002Fgithub.com\u002Fmictlanix\u002Fmbe-ui\u002Fblob\u002Fmain\u002F.specify\u002Fextensions\u002Fwireframes\u002F.specify-dev\u002Fagent-commands\u002Fclaude\u002Fspeckit-wireframes-draft\u002FSKILL.md",[],[],{"skillNo":57,"name":51,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M75QCXRSD7HM7AFZH4HA9E6S","https:\u002F\u002Fgithub.com\u002Fmictlanix\u002Fmbe-ui\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fspeckit-wireframes-draft\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M75QCVS17DXXBTQ8DE2SSXVR","speckit-taskstoissues","Convert existing tasks into actionable, dependency-ordered GitHub issues for the feature based on available design artifacts.","https:\u002F\u002Fgithub.com\u002Fmictlanix\u002Fmbe-ui\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fspeckit-taskstoissues\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M75QCS3M02XD4PW58EXS6458","speckit-tasks","Generate an actionable, dependency-ordered tasks.md for the feature based on available design artifacts.","https:\u002F\u002Fgithub.com\u002Fmictlanix\u002Fmbe-ui\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fspeckit-tasks\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M75QCP9NASXGDNYZF6XYJZBD","speckit-specify","Create or update the feature specification from a natural language feature description.","https:\u002F\u002Fgithub.com\u002Fmictlanix\u002Fmbe-ui\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fspeckit-specify\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M75QCKBPS4K60R4YPRQ8HBJ9","speckit-plan","Execute the implementation planning workflow using the plan template to generate design artifacts.","https:\u002F\u002Fgithub.com\u002Fmictlanix\u002Fmbe-ui\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fspeckit-plan\u002FSKILL.md",[],[]]