-
-
Notifications
You must be signed in to change notification settings - Fork 196
chore: adjust implementation #799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adjusts the implementation of Flutter driver commands by removing non-functional commands and updating related tests and documentation. Key changes include:
- Dropping unsupported commands (flutter:tap, flutter:click, flutter:getText, flutter:clear) and updating page back handling.
- Introducing a new driver.back method and updating test examples to call this method.
- Revising helper functions and documentation to reflect the adjusted command APIs.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| package.json | Removed dependency on appium-flutter-finder, cleaning up unused package references. |
| example/ruby/example_sample2.rb | Updated test examples to use the new flutter:assertVisible and flutter:clickElement commands, and standardized the back navigation call. |
| driver/lib/driver.ts | Added a new back() function to delegate back navigation to the platform driver. |
| driver/lib/commands/execute/scroll.ts | Updated the longTap command signature, enforcing an object parameter instead of a union type. |
| driver/lib/commands/execute.ts | Removed deprecated commands and streamlined the command mapping accordingly. |
| driver/lib/commands/assertions.ts | Removed serialization in the finder conversion function to align with new finder usage. |
| README.md | Adjusted documentation to reflect the removal and renaming of commands. |
Comments suppressed due to low confidence (2)
driver/lib/commands/execute.ts:156
- The removal of the 'pageBack' command from the command handlers could break client code that expects to use 'driver.execute("flutter:pageBack")'. Ensure that all clients have migrated to using the new driver.back method.
pageBack: async (driver) =>
driver/lib/commands/assertions.ts:39
- Replacing serializeFinder(byValueKey(input.key)) with a direct call to byValueKey(input.key) may affect downstream consumers expecting a serialized (base64-encoded) string. Ensure that all dependent modules or client code are updated to handle the new finder format.
return byValueKey(input.key);
Removed commands which was not able to use via extention commands such as
@driver.execute_script 'flutter:click', {text: 'Exit this screen'}. The command didn't conver to finder on the server side, so this PR removes unworked actions.Also, I have added
@driver.execute_script 'flutter:assertVisible', {text: 'Tap me!'}, 10000to run tests on CI. This change fixed the conversion error.Summary:
flutter:tap,flutter:click,flutter:getTextandflutter:clearsince the example's usage addressed in feat: New Assertions methods and better usability #797 didn't work as the above error. Maybe they need to run via JSflutter:pageBackwas replaced with standarddriver.backto call it via uia2/xcuitest always