[espresso] Adopt code-excerpts for README - #12644
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
f6608a0 to
09d6734
Compare
The excerpt validator only requires code-excerpt management for Dart code blocks, so the README's Java/Groovy/XML/sh snippets are untouched. The one Dart block (the test_driver script) used the deprecated flutter_driver enableFlutterDriverExtension() API, which no longer has a real, compilable counterpart in this repo now that the example app migrated to the integration_test package. Points the excerpt at the example's actual test_driver/integration_test.dart (integrationDriver()) instead, and updates the surrounding prose and gradle command to match. Also drops the package's ci_config.yaml, whose only purpose was opting it out of that validation. Part of flutter/flutter#102679. FPOCTSMP-5
66ab473 to
36c41c5
Compare
There was a problem hiding this comment.
Code Review
This pull request updates the 'espresso' package to adopt 'code-excerpt' for the README's Dart driver snippet, ensuring it is validated against compilable source code. Additionally, the documentation and example are updated to use the 'integration_test' package driver instead of the deprecated 'flutter_driver' extension. Review feedback suggests using '$(pwd)' instead of backticks for command substitution in the README's command line example to improve readability and shell compatibility.
|
|
||
| ```sh | ||
| ./gradlew app:connectedAndroidTest -Ptarget=`pwd`/../test_driver/example.dart | ||
| ./gradlew app:connectedAndroidTest -Ptarget=`pwd`/../test_driver/integration_test.dart |
There was a problem hiding this comment.
For better readability and compatibility across different shells, consider using $(pwd) instead of backticks `pwd` for command substitution.
| ./gradlew app:connectedAndroidTest -Ptarget=`pwd`/../test_driver/integration_test.dart | |
| ./gradlew app:connectedAndroidTest -Ptarget=$(pwd)/../test_driver/integration_test.dart |
The excerpt validator (
readme_validator.dart) only requires<?code-excerpt?>management for Dart code blocks, so the README's Java/Groovy/XML/sh snippets are left untouched. The one Dart block — thetest_driver/script — used the deprecatedflutter_driverenableFlutterDriverExtension()API, which no longer has a real, compilable counterpart in this repo now that the example app migrated to theintegration_testpackage. Points the excerpt at the example's actualtest_driver/integration_test.dart(integrationDriver()) instead, and updates the surrounding prose and the./gradlewcommand to match the real filename. Also drops the package'sci_config.yaml, whose only purpose was opting it out of that validation.Follows the same pattern as #12641 ([pointer_interceptor] Adopt code-excerpts for README) and #12643 ([quick_actions] Adopt code-excerpts for README).
Part of #102679.
Pre-Review Checklist
[shared_preferences]0.4.0+26).///). — not applicable, no public API surface changed.test_driver/integration_test.dartdocregion is validated bydart analyze/dart formatand theupdate-excerptscheck itself; no runtime behavior changed.Test plan
dart run script/tool/bin/flutter_plugin_tools.dart update-excerpts --packages=espresso— no diff after regenerationdart run script/tool/bin/flutter_plugin_tools.dart validate --packages=espresso— no issuesflutter analyzeinexample/— no issuesdart format --output=none --set-exit-if-changedon the updated driver file — no changes neededNote: The Flutter team is currently trialing Gemini Code Assist for GitHub. Comments from
gemini-code-assist[bot]aren't authoritative Flutter-team feedback; I'll wait for a human reviewer's guidance on which automated comments (if any) should be addressed.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩