Skip to content

Commit

Permalink
Update selectable_region_test.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
polina-c committed Apr 2, 2024
1 parent 91be988 commit ee83384
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions packages/flutter/test/widgets/selectable_region_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -890,10 +890,13 @@ void main() {
'This will be the start of a new line. When triple clicking this block '
'of text all of it should be selected.';

final FocusNode focusNode = FocusNode();
addTearDown(focusNode.dispose);

await tester.pumpWidget(
MaterialApp(
home: SelectableRegion(
focusNode: FocusNode(),
focusNode: focusNode,
selectionControls: materialTextSelectionControls,
child: const Center(
child: Text(longText),
Expand Down Expand Up @@ -962,10 +965,13 @@ void main() {
}, skip: kIsWeb); // https://github.com/flutter/flutter/issues/125582.

testWidgets('mouse can select multiple widgets on triple click drag when selecting inside a WidgetSpan', (WidgetTester tester) async {
final FocusNode focusNode = FocusNode();
addTearDown(focusNode.dispose);

await tester.pumpWidget(
MaterialApp(
home: SelectableRegion(
focusNode: FocusNode(),
focusNode: focusNode,
selectionControls: materialTextSelectionControls,
child: const Text.rich(
WidgetSpan(
Expand Down Expand Up @@ -1015,10 +1021,13 @@ void main() {
}, skip: kIsWeb); // https://github.com/flutter/flutter/issues/125582.

testWidgets('mouse can select multiple widgets on triple click drag', (WidgetTester tester) async {
final FocusNode focusNode = FocusNode();
addTearDown(focusNode.dispose);

await tester.pumpWidget(
MaterialApp(
home: SelectableRegion(
focusNode: FocusNode(),
focusNode: focusNode,
selectionControls: materialTextSelectionControls,
child: const Column(
children: <Widget>[
Expand Down Expand Up @@ -1078,10 +1087,13 @@ void main() {
}, skip: kIsWeb); // https://github.com/flutter/flutter/issues/125582.

testWidgets('mouse can select multiple widgets on triple click drag and return to origin paragraph', (WidgetTester tester) async {
final FocusNode focusNode = FocusNode();
addTearDown(focusNode.dispose);

await tester.pumpWidget(
MaterialApp(
home: SelectableRegion(
focusNode: FocusNode(),
focusNode: focusNode,
selectionControls: materialTextSelectionControls,
child: const Column(
children: <Widget>[
Expand Down Expand Up @@ -1151,10 +1163,13 @@ void main() {
}, skip: kIsWeb); // https://github.com/flutter/flutter/issues/125582.

testWidgets('mouse can reverse selection across multiple widgets on triple click drag', (WidgetTester tester) async {
final FocusNode focusNode = FocusNode();
addTearDown(focusNode.dispose);

await tester.pumpWidget(
MaterialApp(
home: SelectableRegion(
focusNode: FocusNode(),
focusNode: focusNode,
selectionControls: materialTextSelectionControls,
child: const Column(
children: <Widget>[
Expand Down

0 comments on commit ee83384

Please sign in to comment.