@@ -24,57 +24,7 @@ import 'widget_test.mocks.dart';
24
24
25
25
@GenerateMocks ([PlatformService ])
26
26
void main () {
27
- testWidgets ('Normal setup' , (WidgetTester tester) async {
28
- final platformServiceMock = MockPlatformService ();
29
- // Platform is mobile
30
- when (platformServiceMock.isWebPlatform ()).thenAnswer ((_) => false );
31
-
32
- // Build our app and trigger a frame.
33
- await tester.pumpWidget (
34
- App (
35
- platformService: platformServiceMock,
36
- ),
37
- );
38
- await tester.pumpAndSettle ();
39
-
40
- // Expect to find the normal page setup
41
- expect (find.text ('Flutter Quill' ), findsOneWidget);
42
-
43
- // Enter 'hi' into Quill Editor.
44
- await tester.tap (find.byType (QuillEditor ));
45
- await tester.quillEnterText (find.byType (QuillEditor ), 'hi\n ' );
46
- await tester.pumpAndSettle ();
47
- });
48
-
49
- testWidgets ('Select image' , (WidgetTester tester) async {
50
- final platformServiceMock = MockPlatformService ();
51
-
52
- // Platform is mobile
53
- when (platformServiceMock.isWebPlatform ()).thenAnswer ((_) => false );
54
-
55
- // Build our app and trigger a frame.
56
- await tester.pumpWidget (
57
- App (
58
- platformService: platformServiceMock,
59
- ),
60
- );
61
- await tester.pumpAndSettle ();
62
-
63
- // Expect to find the normal page setup
64
- expect (find.text ('Flutter Quill' ), findsOneWidget);
65
-
66
- // Enter 'hi' into Quill Editor.
67
- await tester.tap (find.byType (QuillEditor ));
68
- await tester.quillEnterText (find.byType (QuillEditor ), 'hi\n ' );
69
- await tester.pumpAndSettle ();
70
-
71
- final imageButton = find.byType (ImageButton );
72
- await tester.tap (imageButton);
73
- await tester.pumpAndSettle ();
74
-
75
- //TODO add image picker
76
- //https://github.com/dwyl/flutter-image-upload-demo/blob/main/test/widget_test.dart
77
- });
27
+ IntegrationTestWidgetsFlutterBinding .ensureInitialized ();
78
28
79
29
testWidgets ('Normal setup (web version)' , (WidgetTester tester) async {
80
30
tester.view.physicalSize = const Size (400 , 600 );
0 commit comments