-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)Accessibility, e.g. VoiceOver or TalkBack. (aka a11y)a: multi windowIssues related to multi window supportIssues related to multi window supporta: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamOwned by Framework team
Description
The API to trigger semantics actions from tests right now is not very discoverable:
| tester.binding.pipelineOwner.semanticsOwner!.performAction(detectorId, SemanticsAction.scrollLeft); |
Instead of requiring developers to figure that out, we should provide an easier way. Similarly to WidgetTester.tap [1] and WidgetTester.tapAt [2] we should provide a simple API on WidgetTester itself to trigger semantics actions in tests based on finders. With such an API, people could be writing something like the following in their tests:
await tester.performSemanticsAction(find.text('click me'), SemanticsAction.tap);[1] https://master-api.flutter.dev/flutter/flutter_test/WidgetController/tap.html
[2] https://master-api.flutter.dev/flutter/flutter_test/WidgetController/tapAt.html
Albert221Albert221
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)Accessibility, e.g. VoiceOver or TalkBack. (aka a11y)a: multi windowIssues related to multi window supportIssues related to multi window supporta: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamOwned by Framework team
Type
Projects
Status
Done