)]}'
{
  "commit": "600904fa2f52a716c094e52af4aa2e57d8dfd6da",
  "tree": "10e610b8c344aee4dd9659add97c759cff82b94f",
  "parents": [
    "bff85832543d77ed310ff303af1b89b8fadd08cb"
  ],
  "author": {
    "name": "Navaron Bracke",
    "email": "brackenavaron@gmail.com",
    "time": "Thu Jan 22 00:11:00 2026 +0100"
  },
  "committer": {
    "name": "dart-internal-monorepo",
    "email": "dart-internal-monorepo@dart-ci-internal.iam.gserviceaccount.com",
    "time": "Wed Jan 21 16:22:24 2026 -0800"
  },
  "message": "fix description for semantics finders (#181214)\n\nFixes https://github.com/flutter/flutter/issues/181196\n\nThis PR fixes the description for the bySemanticsLabel/Identifier\nmatchers, which was missing.\n\nNote: The framework uses `byElementPredicate()` in a bunch of places in\ntests, but not all use the `description` field.\nShould we add descriptions to those?\n\nExample:\n\n```dart\nimport \u0027package:flutter/material.dart\u0027;\nimport \u0027package:flutter_test/flutter_test.dart\u0027;\n\nvoid main() {\n  testWidgets(\u0027bySemanticsLabel\u0027, (tester) async {\n    await tester.pumpWidget(const MaterialApp(home: Text(\u0027hello\u0027)));\n    await tester.pumpAndSettle();\n    expect(find.bySemanticsLabel(\u0027goodbye\u0027), findsOneWidget);\n  });\n\n  testWidgets(\u0027bySemanticsLabel regex\u0027, (tester) async {\n    await tester.pumpWidget(const MaterialApp(home: Text(\u0027hello\u0027)));\n    await tester.pumpAndSettle();\n    expect(find.bySemanticsLabel(RegExp(\u0027^foo\u0027)), findsOneWidget);\n  });\n\n  testWidgets(\u0027bySemanticsIdentifier\u0027, (tester) async {\n    await tester.pumpWidget(const MaterialApp(home: Text(\u0027hello\u0027)));\n    await tester.pumpAndSettle();\n    expect(find.bySemanticsIdentifier(\u0027goodbye\u0027), findsOneWidget);\n  });\n\n  testWidgets(\u0027bySemanticsIdentifier regex\u0027, (tester) async {\n    await tester.pumpWidget(const MaterialApp(home: Text(\u0027hello\u0027)));\n    await tester.pumpAndSettle();\n    expect(find.bySemanticsIdentifier(RegExp(\u0027^foo\u0027)), findsOneWidget);\n  });\n}\n```\n\nnow gives:\n\n```dart\n══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════\nThe following TestFailure was thrown running a test:\nExpected: exactly one matching candidate\n  Actual: _ElementPredicateWidgetFinder:\u003cFound 0 widgets with a semantics label named \"goodbye\": []\u003e\n   Which: means none were found but one was expected\n\nWhen the exception was thrown, this was the stack:\n#4      main.\u003canonymous closure\u003e (file:///Users/navaronbracke/Desktop/matchers_test/test/widget_test.dart:8:5)\n\u003casynchronous suspension\u003e\n#5      testWidgets.\u003canonymous closure\u003e.\u003canonymous closure\u003e (package:flutter_test/src/widget_tester.dart:192:15)\n\u003casynchronous suspension\u003e\n#6      TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1692:5)\n\u003casynchronous suspension\u003e\n\u003casynchronous suspension\u003e\n(elided one frame from package:stack_trace)\n\nThis was caught by the test expectation on the following line:\n  file:///Users/navaronbracke/Desktop/matchers_test/test/widget_test.dart line 8\nThe test description was:\n  bySemanticsLabel\n════════════════════════════════════════════════════════════════════════════════════════════════════\n══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════\nThe following TestFailure was thrown running a test:\nExpected: exactly one matching candidate\n  Actual: _ElementPredicateWidgetFinder:\u003cFound 0 widgets with a semantics label matching the pattern\n\"^foo\": []\u003e\n   Which: means none were found but one was expected\n\nWhen the exception was thrown, this was the stack:\n#4      main.\u003canonymous closure\u003e (file:///Users/navaronbracke/Desktop/matchers_test/test/widget_test.dart:14:5)\n\u003casynchronous suspension\u003e\n#5      testWidgets.\u003canonymous closure\u003e.\u003canonymous closure\u003e (package:flutter_test/src/widget_tester.dart:192:15)\n\u003casynchronous suspension\u003e\n#6      TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1692:5)\n\u003casynchronous suspension\u003e\n\u003casynchronous suspension\u003e\n(elided one frame from package:stack_trace)\n\nThis was caught by the test expectation on the following line:\n  file:///Users/navaronbracke/Desktop/matchers_test/test/widget_test.dart line 14\nThe test description was:\n  bySemanticsLabel regex\n════════════════════════════════════════════════════════════════════════════════════════════════════\n══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════\nThe following TestFailure was thrown running a test:\nExpected: exactly one matching candidate\n  Actual: _ElementPredicateWidgetFinder:\u003cFound 0 widgets with a semantics identifier named\n\"goodbye\": []\u003e\n   Which: means none were found but one was expected\n\nWhen the exception was thrown, this was the stack:\n#4      main.\u003canonymous closure\u003e (file:///Users/navaronbracke/Desktop/matchers_test/test/widget_test.dart:20:5)\n\u003casynchronous suspension\u003e\n#5      testWidgets.\u003canonymous closure\u003e.\u003canonymous closure\u003e (package:flutter_test/src/widget_tester.dart:192:15)\n\u003casynchronous suspension\u003e\n#6      TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1692:5)\n\u003casynchronous suspension\u003e\n\u003casynchronous suspension\u003e\n(elided one frame from package:stack_trace)\n\nThis was caught by the test expectation on the following line:\n  file:///Users/navaronbracke/Desktop/matchers_test/test/widget_test.dart line 20\nThe test description was:\n  bySemanticsIdentifier\n════════════════════════════════════════════════════════════════════════════════════════════════════\n══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════\nThe following TestFailure was thrown running a test:\nExpected: exactly one matching candidate\n  Actual: _ElementPredicateWidgetFinder:\u003cFound 0 widgets with a semantics identifier matching the\npattern \"^foo\": []\u003e\n   Which: means none were found but one was expected\n\nWhen the exception was thrown, this was the stack:\n#4      main.\u003canonymous closure\u003e (file:///Users/navaronbracke/Desktop/matchers_test/test/widget_test.dart:26:5)\n\u003casynchronous suspension\u003e\n#5      testWidgets.\u003canonymous closure\u003e.\u003canonymous closure\u003e (package:flutter_test/src/widget_tester.dart:192:15)\n\u003casynchronous suspension\u003e\n#6      TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1692:5)\n\u003casynchronous suspension\u003e\n\u003casynchronous suspension\u003e\n(elided one frame from package:stack_trace)\n\nThis was caught by the test expectation on the following line:\n  file:///Users/navaronbracke/Desktop/matchers_test/test/widget_test.dart line 26\nThe test description was:\n  bySemanticsIdentifier regex\n════════════════════════════════════════════════════════════════════════════════════════════════════\n\n```\n\n*If you had to change anything in the [flutter/tests] repo, include a\nlink to the migration guide as per the [breaking change policy].*\n\n## Pre-launch Checklist\n\n- [x] I read the [Contributor Guide] and followed the process outlined\nthere for submitting PRs.\n- [x] I read the [Tree Hygiene] wiki page, which explains my\nresponsibilities.\n- [x] I read and followed the [Flutter Style Guide], including [Features\nwe expect every widget to implement].\n- [x] I signed the [CLA].\n- [x] I listed at least one issue that this PR fixes in the description\nabove.\n- [x] I updated/added relevant documentation (doc comments with `///`).\n- [x] I added new tests to check the change I am making, or this PR is\n[test-exempt].\n- [x] I followed the [breaking change policy] and added [Data Driven\nFixes] where supported.\n- [ ] All existing and new tests are passing.\n\nIf you need help, consider asking for advice on the #hackers-new channel\non [Discord].\n\n**Note**: The Flutter team is currently trialing the use of [Gemini Code\nAssist for\nGitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).\nComments from the `gemini-code-assist` bot should not be taken as\nauthoritative feedback from the Flutter team. If you find its comments\nuseful you can update your code accordingly, but if you are unsure or\ndisagree with the feedback, please feel free to wait for a Flutter team\nmember\u0027s review for guidance on which automated comments should be\naddressed.\n\n\u003c!-- Links --\u003e\n[Contributor Guide]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview\n[Tree Hygiene]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md\n[test-exempt]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests\n[Flutter Style Guide]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md\n[Features we expect every widget to implement]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement\n[CLA]: https://cla.developers.google.com/\n[flutter/tests]: https://github.com/flutter/tests\n[breaking change policy]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes\n[Discord]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md\n[Data Driven Fixes]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md\nhttps://dart.googlesource.com/external/github.com/flutter/flutter/+/b4a23495b4ae802e8bc4d08ae6f64d2afd05814b\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9ba2508ab843156263a2e485969d200c4683c0f5",
      "old_mode": 33188,
      "old_path": "DEPS",
      "new_id": "ed718443210866bfbca7db4dfa277812ed15997b",
      "new_mode": 33188,
      "new_path": "DEPS"
    },
    {
      "type": "modify",
      "old_id": "2f7876cd8f0d1e19225c617a466ce8184385caf6",
      "old_mode": 33188,
      "old_path": "commits.json",
      "new_id": "17fa4ceb71e97c66e7b05f69482b80a8aef82aaa",
      "new_mode": 33188,
      "new_path": "commits.json"
    }
  ]
}
