Unverified Commit 77d6e960 authored by Valentin Vignal's avatar Valentin Vignal Committed by GitHub

️ Correct test description for a non-draggable item (#94167)

parent 5cb09e77
...@@ -641,7 +641,7 @@ void main() { ...@@ -641,7 +641,7 @@ void main() {
expect(items, orderedEquals(<int>[1, 0, 2, 3, 4])); expect(items, orderedEquals(<int>[1, 0, 2, 3, 4]));
}); });
testWidgets('It should allow the item to be dragged when enabled is true', (WidgetTester tester) async { testWidgets('It should not allow the item to be dragged when enabled is false', (WidgetTester tester) async {
const int itemCount = 5; const int itemCount = 5;
int onReorderCallCount = 0; int onReorderCallCount = 0;
final List<int> items = List<int>.generate(itemCount, (int index) => index); final List<int> items = List<int>.generate(itemCount, (int index) => index);
...@@ -679,7 +679,7 @@ void main() { ...@@ -679,7 +679,7 @@ void main() {
await tester.pump(kLongPressTimeout); await tester.pump(kLongPressTimeout);
// Drag enough to move down the first item // Drag enough to move down the first item
await drag.moveBy(const Offset(0, 150)); await drag.moveBy(const Offset(0, 50));
await tester.pump(); await tester.pump();
await drag.up(); await drag.up();
await tester.pumpAndSettle(); await tester.pumpAndSettle();
...@@ -737,7 +737,7 @@ void main() { ...@@ -737,7 +737,7 @@ void main() {
expect(items, orderedEquals(<int>[1, 0, 2, 3, 4])); expect(items, orderedEquals(<int>[1, 0, 2, 3, 4]));
}); });
testWidgets('It should allow the item to be dragged when enabled is true', (WidgetTester tester) async { testWidgets('It should not allow the item to be dragged when enabled is false', (WidgetTester tester) async {
const int itemCount = 5; const int itemCount = 5;
int onReorderCallCount = 0; int onReorderCallCount = 0;
final List<int> items = List<int>.generate(itemCount, (int index) => index); final List<int> items = List<int>.generate(itemCount, (int index) => index);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment