Skip to content

Commit faf774e

Browse files
authored
Updated the skipped tests for cupertino package. (#87289)
1 parent 8322e17 commit faf774e

5 files changed

Lines changed: 27 additions & 26 deletions

File tree

‎packages/flutter/test/cupertino/dialog_test.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ void main() {
917917
// We must explicitly cause an "up" gesture to avoid a crash.
918918
// todo(mattcarroll) remove this call, https://github.com/flutter/flutter/issues/19540
919919
await gesture.up();
920-
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/52960
920+
});
921921

922922
testWidgets('ScaleTransition animation for showCupertinoDialog()', (WidgetTester tester) async {
923923
await tester.pumpWidget(

‎packages/flutter/test/cupertino/text_field_test.dart‎

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,10 @@ void main() {
289289
expect(controller.text, ' blah2blah1');
290290
expect(controller.selection, const TextSelection(baseOffset: 0, extentOffset: 0));
291291
expect(find.byType(CupertinoButton), findsNothing);
292-
}, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.macOS }), skip: kIsWeb);
292+
},
293+
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.macOS }),
294+
skip: kIsWeb, // [intended] the web handles this on its own.
295+
);
293296

294297
testWidgets('Activates the text field when receives semantics focus on Mac', (WidgetTester tester) async {
295298
final SemanticsTester semantics = SemanticsTester(tester);
@@ -454,8 +457,7 @@ void main() {
454457
);
455458
},
456459
// TODO(mdebbar): Strut styles support.
457-
// https://github.com/flutter/flutter/issues/32243
458-
skip: isBrowser,
460+
skip: isBrowser, // https://github.com/flutter/flutter/issues/32243
459461
);
460462

461463
testWidgets(
@@ -485,8 +487,7 @@ void main() {
485487
);
486488
},
487489
// TODO(mdebbar): Strut styles support.
488-
// https://github.com/flutter/flutter/issues/32243
489-
skip: isBrowser,
490+
skip: isBrowser, // https://github.com/flutter/flutter/issues/32243
490491
);
491492

492493
testWidgets(
@@ -1489,7 +1490,7 @@ void main() {
14891490
expect(text.style!.fontSize, 14);
14901491
expect(text.style!.letterSpacing, -0.15);
14911492
expect(text.style!.fontWeight, FontWeight.w400);
1492-
}, skip: isContextMenuProvidedByPlatform);
1493+
}, skip: isContextMenuProvidedByPlatform); // [intended] only applies to platforms where we supply the context menu.
14931494

14941495
testWidgets('text field toolbar options correctly changes options', (WidgetTester tester) async {
14951496
final TextEditingController controller = TextEditingController(
@@ -1532,7 +1533,7 @@ void main() {
15321533
expect(find.text('Copy'), findsOneWidget);
15331534
expect(find.text('Cut'), findsNothing);
15341535
expect(find.text('Select All'), findsNothing);
1535-
}, skip: isContextMenuProvidedByPlatform);
1536+
}, skip: isContextMenuProvidedByPlatform); // [intended] only applies to platforms where we supply the context menu.
15361537

15371538
testWidgets('Read only text field', (WidgetTester tester) async {
15381539
final TextEditingController controller = TextEditingController(text: 'readonly');
@@ -1569,7 +1570,7 @@ void main() {
15691570
expect(find.text('Copy'), findsOneWidget);
15701571
expect(find.text('Paste'), findsNothing);
15711572
expect(find.text('Cut'), findsNothing);
1572-
}, skip: isContextMenuProvidedByPlatform);
1573+
}, skip: isContextMenuProvidedByPlatform); // [intended] only applies to platforms where we supply the context menu.
15731574

15741575
testWidgets('copy paste', (WidgetTester tester) async {
15751576
await tester.pumpWidget(
@@ -1620,7 +1621,7 @@ void main() {
16201621
expect(find.text('field 1'), findsOneWidget);
16211622
expect(find.text("j'aime la poutine"), findsOneWidget);
16221623
expect(find.text('field 2'), findsNothing);
1623-
}, skip: isContextMenuProvidedByPlatform);
1624+
}, exclude: isContextMenuProvidedByPlatform);
16241625

16251626
testWidgets(
16261627
'tap moves cursor to the edge of the word it tapped on',
@@ -2204,7 +2205,7 @@ void main() {
22042205
expect(find.text('Select All'), findsOneWidget);
22052206
expect(find.text('Copy'), findsNothing);
22062207
expect(find.text('Cut'), findsNothing);
2207-
}, skip: isContextMenuProvidedByPlatform);
2208+
}, skip: isContextMenuProvidedByPlatform); // [intended] only applies to platforms where we supply the context menu.
22082209

22092210
testWidgets(
22102211
'long press moves cursor to the exact long press position and shows toolbar',
@@ -3229,7 +3230,7 @@ void main() {
32293230
textFieldTopLeft = tester.getTopLeft(find.byType(CupertinoTextField));
32303231
expect(toolbarTopLeft.dy, lessThan(textFieldTopLeft.dy));
32313232
},
3232-
skip: isContextMenuProvidedByPlatform,
3233+
skip: isContextMenuProvidedByPlatform, // [intended] only applies to platforms where we supply the context menu.
32333234
);
32343235

32353236
testWidgets('text field respects keyboardAppearance from theme', (WidgetTester tester) async {
@@ -3826,7 +3827,7 @@ void main() {
38263827
expect(find.byType(CupertinoTextSelectionToolbar), findsOneWidget);
38273828
expect(tester.takeException(), null);
38283829
});
3829-
}, skip: isContextMenuProvidedByPlatform);
3830+
}, skip: isContextMenuProvidedByPlatform); // [intended] only applies to platforms where we supply the context menu.
38303831

38313832
group('textAlignVertical position', () {
38323833
group('simple case', () {

‎packages/flutter/test/cupertino/text_form_field_row_test.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ void main() {
262262

263263
await tester.pump(const Duration(milliseconds: 200));
264264
expect(renderEditable, paintsExactlyCountTimes(#drawRect, 0));
265-
}, skip: isBrowser); // We do not use Flutter-rendered context menu on the Web
265+
}, skip: isBrowser); // [intended] We do not use Flutter-rendered context menu on the Web.
266266

267267
testWidgets('onTap is called upon tap', (WidgetTester tester) async {
268268
int tapCount = 0;

‎packages/flutter/test/cupertino/text_selection_test.dart‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ void main() {
251251
expect(find.text('Copy'), findsOneWidget);
252252
expect(find.text('Cut'), findsOneWidget);
253253
},
254-
skip: isBrowser, // We do not use Flutter-rendered context menu on the Web
254+
exclude: isBrowser, // We do not use Flutter-rendered context menu on the Web
255255
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.iOS }),
256256
);
257257

@@ -305,7 +305,7 @@ void main() {
305305
expect(find.text('◀'), findsNothing);
306306
expect(find.text('▶'), findsNothing);
307307
},
308-
skip: isBrowser, // We do not use Flutter-rendered context menu on the Web
308+
skip: isBrowser, // [intended] We do not use Flutter-rendered context menu on the Web.
309309
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.iOS }),
310310
);
311311

@@ -376,7 +376,7 @@ void main() {
376376
expect(find.text('▶'), findsOneWidget);
377377
expect(appearsEnabled(tester, '▶'), true);
378378
},
379-
skip: isBrowser, // We do not use Flutter-rendered context menu on the Web
379+
skip: isBrowser, // [intended] We do not use Flutter-rendered context menu on the Web.
380380
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.iOS }),
381381
);
382382

@@ -478,7 +478,7 @@ void main() {
478478
expect(find.text('▶'), findsOneWidget);
479479
expect(appearsEnabled(tester, '▶'), true);
480480
},
481-
skip: isBrowser, // We do not use Flutter-rendered context menu on the Web
481+
skip: isBrowser, // [intended] We do not use Flutter-rendered context menu on the Web.
482482
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.iOS }),
483483
);
484484

@@ -596,7 +596,7 @@ void main() {
596596
expect(find.text('▶'), findsOneWidget);
597597
expect(appearsEnabled(tester, '▶'), true);
598598
},
599-
skip: isBrowser, // We do not use Flutter-rendered context menu on the Web
599+
skip: isBrowser, // [intended] We do not use Flutter-rendered context menu on the Web.
600600
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.iOS }),
601601
);
602602
});
@@ -677,7 +677,7 @@ void main() {
677677
expect(handles.first.size.height, 60.5);
678678
expect(handles.last.size.height, 35.5);
679679
},
680-
skip: isBrowser, // We do not use Flutter-rendered context menu on the Web
680+
skip: isBrowser, // [intended] We do not use Flutter-rendered context menu on the Web.
681681
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.iOS }),
682682
);
683683

@@ -761,7 +761,7 @@ void main() {
761761
expect(handles.first.size.height, 110.5);
762762
expect(handles.last.size.height, 110.5);
763763
},
764-
skip: isBrowser, // We do not use Flutter-rendered context menu on the Web
764+
skip: isBrowser, // [intended] We do not use Flutter-rendered context menu on the Web.
765765
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.iOS }),
766766
);
767767

@@ -842,7 +842,7 @@ void main() {
842842
expect(handles.first.size.height, 60.5);
843843
expect(handles.last.size.height, 45.5);
844844
},
845-
skip: isBrowser, // We do not use Flutter-rendered context menu on the Web
845+
skip: isBrowser, // [intended] We do not use Flutter-rendered context menu on the Web.
846846
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.iOS }),
847847
);
848848

@@ -928,7 +928,7 @@ void main() {
928928
expect(handles.first.size.height, 50.5);
929929
expect(handles.last.size.height, 50.5); // This is 60.5 with the previous frame.
930930
},
931-
skip: isBrowser, // We do not use Flutter-rendered context menu on the Web
931+
skip: isBrowser, // [intended] We do not use Flutter-rendered context menu on the Web.
932932
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.iOS }),
933933
);
934934
}

‎packages/flutter/test/cupertino/text_selection_toolbar_test.dart‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ void main() {
180180
expect(find.byType(TestBox), findsNWidgets(7));
181181
expect(_findOverflowNextButton(), findsOneWidget);
182182
expect(_findOverflowBackButton(), findsNothing);
183-
}, skip: kIsWeb);
183+
}, skip: kIsWeb); // [intended] We do not use Flutter-rendered context menu on the Web.
184184

185185
testWidgets('positions itself at anchorAbove if it fits', (WidgetTester tester) async {
186186
late StateSetter setState;
@@ -229,7 +229,7 @@ void main() {
229229
await tester.pump();
230230
toolbarY = tester.getTopLeft(_findToolbar()).dy;
231231
expect(toolbarY, equals(anchorAboveY - height - _kToolbarContentDistance));
232-
}, skip: kIsWeb);
232+
}, skip: kIsWeb); // [intended] We do not use Flutter-rendered context menu on the Web.
233233

234234
testWidgets('can create and use a custom toolbar', (WidgetTester tester) async {
235235
final TextEditingController controller = TextEditingController(
@@ -262,5 +262,5 @@ void main() {
262262
expect(find.text('Copy'), findsNothing);
263263
expect(find.text('Paste'), findsNothing);
264264
expect(find.text('Select all'), findsNothing);
265-
}, skip: kIsWeb);
265+
}, skip: kIsWeb); // [intended] We do not use Flutter-rendered context menu on the Web.
266266
}

0 commit comments

Comments
 (0)