[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BV9EDXMQEBYB8XEE8Z7AVT":3,"skill-same:01M7BV9EDXMQEBYB8XEE8Z7AVT":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":31,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":33,"install":34,"resources":47},"01M7BV9EDXMQEBYB8XEE8Z7AVT","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.","nguyenhungtran18\u002Fskill-and-tool-tracker","nguyenhungtran18","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F297063550?v=4","01M7BV0BFPRRFP84F2ME0FYZ9D","01M7BV0BG83FA5P22NJV0GR0A5",1,"MIT","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fflutter-add-integration-test\u002FSKILL.md",[],[],"2026-11-15 14:19:17",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":23,"description":7},{"model":24,"last_modified":25},"models\u002Fgemini-3.1-pro-preview","Tue, 21 Apr 2026 18:29:20 GMT","main","900ea3c9eb045fd5b0317dc1103777ecf3ea4aeb","skills\u002Fflutter-add-integration-test",0,"https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker","https:\u002F\u002Fnguyenhungtran18.github.io\u002Fskill-and-tool-tracker\u002F","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18","2026-08-31 18:36:09",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add nguyenhungtran18\u002Fskill-and-tool-tracker --skill flutter-add-integration-test",{"tool":40,"command":41},"bunx","bunx skills add nguyenhungtran18\u002Fskill-and-tool-tracker --skill flutter-add-integration-test",{"tool":43,"command":44},"pnpm","pnpm dlx skills add nguyenhungtran18\u002Fskill-and-tool-tracker --skill flutter-add-integration-test","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fflutter-add-integration-test\u002FSKILL.md",true,[],[49,56,63,70,77,84],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":18},"01M7BVP4P83TK60JZ4P8RP9VP7","xcode-project-setup","Safely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fxcode_project_setup\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":18},"01M7BVP01K4CSJJ8G90FT8S2D5","writing-skills","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-skills\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":18},"01M7BVNY22GXD871GYTSH599F1","writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-plans\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":18},"01M7BVNQWF24RNKA8A4KM2HJ3T","workflow-skill-creator","Distills a completed user workflow or interaction into a reusable agent skill. Use when the user asks to turn their workflow, interaction, or multi-step process into a skill, or when they say \"make this a skill\", \"create a skill from what we just did\", \"package this workflow\" or similar. Do not use for creating skills from scratch without an existing workflow (use a generic skill-creator for that).","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow_skill_creator\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":18},"01M7BVNNY67XPCQAQHY3FBKDGC","verify-and-stop","Prove existing work meets acceptance conditions without expanding scope. Use for validation-only tasks, completion checks, focused gate runs, and last-mile proof.","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fverify-and-stop\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":18},"01M7BVNKB4Z7SZT85B73ZZ90Y6","verification-before-completion","Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","https:\u002F\u002Fgithub.com\u002Fnguyenhungtran18\u002Fskill-and-tool-tracker\u002Fblob\u002Fmain\u002Fskills\u002Fverification-before-completion\u002FSKILL.md",[],[]]