Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions packages/material_ui/test/text_field_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12714,24 +12714,26 @@ void main() {
// Cursor move doesn't trigger a toolbar initially.
_expectNoMaterialToolbar();

await gesture.moveBy(const Offset(100, 0));
// Drag into the middle of 'Bonaventure'.
await gesture.moveTo(textOffsetToPosition(tester, 30));
await tester.pump();

// The selection is now moved with the drag.
expect(controller.selection, const TextSelection(baseOffset: 13, extentOffset: 35));
// Still no toolbar.
_expectNoMaterialToolbar();

// The selection is moved on a backwards drag.
await gesture.moveBy(const Offset(-200, 0));
// The selection is moved on a backwards drag into the middle of 'Peel'.
await gesture.moveTo(textOffsetToPosition(tester, 10));
await tester.pump();

// The selection is now moved with the drag.
expect(controller.selection, const TextSelection(baseOffset: 23, extentOffset: 8));
// Still no toolbar.
_expectNoMaterialToolbar();

await gesture.moveBy(const Offset(-100, 0));
// Drag into the middle of 'Atwater'.
await gesture.moveTo(textOffsetToPosition(tester, 3));
await tester.pump();

// The selection is now moved with the drag.
Expand All @@ -12750,7 +12752,7 @@ void main() {
variant: TargetPlatformVariant.all(
excluding: <TargetPlatform>{TargetPlatform.iOS, TargetPlatform.macOS},
),
skip: isContextMenuProvidedByPlatform, // [intended] only applies to platforms where we supply the context menu.
tags: 'reduced-web-test-set',
);

testWidgets(
Expand Down
Loading