SuperEditorRobot extension
Extensions on WidgetTester for interacting with a SuperEditor the way a user would.
- on
Methods
-
doubleTapAtDocumentPosition(
DocumentPosition position, [Finder? superEditorFinder]) → Future< void> -
Double-taps at the center of the content at the given
position
within a SuperEditor. -
doubleTapDownInParagraph(
String nodeId, int offset, {TextAffinity affinity = TextAffinity.downstream, Finder? superEditorFinder}) → Future< TestGesture> -
doubleTapInParagraph(
String nodeId, int offset, {TextAffinity affinity = TextAffinity.downstream, Finder? superEditorFinder}) → Future< void> -
Simulates a double tap at the given
offset
within the paragraph with the givennodeId
. -
dragSelectDocumentFromPositionByOffset(
{required DocumentPosition from, required Offset delta, PointerDeviceKind? pointerDeviceKind, Finder? superEditorFinder}) → Future< void> -
Simulates a user drag that begins at the
from
DocumentPosition and drags adelta
amount from that point. -
endDocumentDragGesture(
TestGesture gesture) → Future< void> -
Ends a drag gesture that's simulated with the given
gesture
. -
longPressDownInParagraph(
String nodeId, int offset, {TextAffinity affinity = TextAffinity.downstream, Finder? superEditorFinder}) → Future< TestGesture> -
Simulates a long-press down at the given text
offset
within the paragraph with the givennodeId
, and returns the TestGesture so that a test can decide to drag it, or release. -
longPressInParagraph(
String nodeId, int offset, {TextAffinity affinity = TextAffinity.downstream, Finder? superEditorFinder}) → Future< void> -
Simulates a long-press at the given text
offset
within the paragraph with the givennodeId
. -
placeCaretInParagraph(
String nodeId, int offset, {TextAffinity affinity = TextAffinity.downstream, Finder? superEditorFinder}) → Future< void> -
Place the caret at the given
offset
in a paragraph with the givennodeId
, by simulating a user gesture. -
pressDownOnCollapsedMobileHandle(
) → Future< TestGesture> -
pressDownOnDownstreamMobileHandle(
) → Future< TestGesture> -
pressDownOnUpstreamMobileHandle(
) → Future< TestGesture> -
startDocumentDragFromPosition(
{required DocumentPosition from, Alignment startAlignmentWithinPosition = Alignment.center, Finder? superEditorFinder, PointerDeviceKind deviceKind = PointerDeviceKind.mouse}) → Future< TestGesture> -
Simulates a user drag that begins at the
from
DocumentPosition and returns the simulated gesture for further control. -
startFloatingCursorGesture(
) → Future< void> - Simulates the user holding the spacebar and starting the floating cursor gesture.
-
stopFloatingCursorGesture(
) → Future< void> - Simulates the user releasing the spacebar and stopping the floating cursor gesture.
-
tapAtDocumentPosition(
DocumentPosition position, [Finder? superEditorFinder]) → Future< void> -
Taps at the center of the content at the given
position
within a SuperEditor. -
tapDownInParagraph(
String nodeId, int offset, {TextAffinity affinity = TextAffinity.downstream, Finder? superEditorFinder}) → Future< TestGesture> -
tapInParagraph(
String nodeId, int offset, {TextAffinity affinity = TextAffinity.downstream, Finder? superEditorFinder}) → Future< void> -
Simulates a tap at the given
offset
within the paragraph with the givennodeId
. -
tapOnCollapsedMobileHandle(
) → Future< void> -
tripleTapAtDocumentPosition(
DocumentPosition position, [Finder? superEditorFinder]) → Future< void> -
Triple-taps at the center of the content at the given
position
within a SuperEditor. -
tripleTapInParagraph(
String nodeId, int offset, {TextAffinity affinity = TextAffinity.downstream, Finder? superEditorFinder}) → Future< void> -
Simulates a triple tap at the given
offset
within the paragraph with the givennodeId
. -
typeImeText(
String text, [Finder? imeOwnerFinder]) → Future< void> -
Types the given
text
into a SuperEditor by simulating IME text deltas from the platform. -
typeTextAdaptive(
String text, [Finder? imeOwnerFinder]) → Future< void> -
Simulates typing
text
, either as keyboard keys, or as insertion deltas of a software keyboard. -
updateFloatingCursorGesture(
Offset offset) → Future< void> -
Simulates the user swiping the spacebar by
offset
.