Repository: flutter/flutter
File: packages/flutter/test/cupertino/dialog_test.dart (Dart)

Code before:
      await tester.pumpWidget(
        CupertinoApp(
          home: Directionality(
            textDirection: isLTR ? TextDirection.ltr : TextDirection.rtl,
            child: const CupertinoAlertDialog(
              actions: <CupertinoDialogAction>[
                CupertinoDialogAction(isDefaultAction: true, child: Text('No')),
                CupertinoDialogAction(child: Text('Yes')),
              ],
            ),
          ),
        ),
      );
    }

    await pumpWidget(isLTR: true);
    Offset yesButton = tester.getCenter(find.text('Yes'));
    Offset noButton = tester.getCenter(find.text('No'));
    expect(yesButton.dx > noButton.dx, true);
    await pumpWidget(isLTR: false);
    yesButton = tester.getCenter(find.text('Yes'));
    noButton = tester.getCenter(find.text('No'));
    expect(yesButton.dx > noButton.dx, false);
  });

  testWidgets('CupertinoDialogAction action cursor behavior', (WidgetTester tester) async {
    const SystemMouseCursor customCursor = SystemMouseCursors.grab;

    await tester.pumpWidget(
      CupertinoApp(
        home: Directionality(
          textDirection: TextDirection.ltr,
          child: CupertinoAlertDialog(
            actions: <CupertinoDialogAction>[
              CupertinoDialogAction(
                mouseCursor: customCursor,
                child: const Text('Yes'),
                onPressed: () {},
              ),
            ],
          ),
        ),
      ),
    );

    final TestGesture gesture = await tester.createGesture(
      kind: PointerDeviceKind.mouse,
      pointer: 1,
    );
    await gesture.addPointer(location: const Offset(10, 10));
    await tester.pumpAndSettle();

Review comment (suggestion):
Something more descriptive
```suggestion
  testWidgets('CupertinoDialogAction.mouseCursor can customize the mouse cursor', (WidgetTester tester) async {
```

Code after:
      await tester.pumpWidget(
        CupertinoApp(
          home: Directionality(
            textDirection: isLTR ? TextDirection.ltr : TextDirection.rtl,
            child: const CupertinoAlertDialog(
              actions: <CupertinoDialogAction>[
                CupertinoDialogAction(isDefaultAction: true, child: Text('No')),
                CupertinoDialogAction(child: Text('Yes')),
              ],
            ),
          ),
        ),
      );
    }

    await pumpWidget(isLTR: true);
    Offset yesButton = tester.getCenter(find.text('Yes'));
    Offset noButton = tester.getCenter(find.text('No'));
    expect(yesButton.dx > noButton.dx, true);
    await pumpWidget(isLTR: false);
    yesButton = tester.getCenter(find.text('Yes'));
    noButton = tester.getCenter(find.text('No'));
    expect(yesButton.dx > noButton.dx, false);
  });

  testWidgets('CupertinoDialogAction.mouseCursor can customize the mouse cursor', (
    WidgetTester tester,
  ) async {
    const SystemMouseCursor customCursor = SystemMouseCursors.grab;

    await tester.pumpWidget(
      CupertinoApp(
        home: Directionality(
          textDirection: TextDirection.ltr,
          child: CupertinoAlertDialog(
            actions: <CupertinoDialogAction>[
              CupertinoDialogAction(
                mouseCursor: customCursor,
                child: const Text('Yes'),
                onPressed: () {},
              ),
            ],
          ),
        ),
      ),
    );

    final TestGesture gesture = await tester.createGesture(
      kind: PointerDeviceKind.mouse,
      pointer: 1,
    );