Skip to content

Commit b2017cd

Browse files
authored
test: add an integration test for #2579 (#2616)
1 parent 9e423cd commit b2017cd

File tree

2 files changed

+88
-69
lines changed

2 files changed

+88
-69
lines changed
Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,27 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:flutter_quill/flutter_quill.dart';
13
import 'package:flutter_test/flutter_test.dart';
4+
import 'package:flutter_quill_test/flutter_quill_test.dart';
25
import 'package:integration_test/integration_test.dart';
36

47
void main() {
58
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
69

7-
testWidgets('placeholder test', (tester) async {});
10+
testWidgets('$QuillEditor renders and handles input without crashing',
11+
(tester) async {
12+
// This test ensures that the QuillEditor can be created and accepts input
13+
// without crashing on any platform.
14+
//
15+
// Example fix: https://github.com/singerdmx/flutter-quill/pull/2579
16+
17+
final controller = QuillController.basic();
18+
await tester.pumpWidget(MaterialApp(
19+
home: QuillEditor.basic(controller: controller),
20+
));
21+
22+
// Simulate text input to trigger user interactions.
23+
await tester.quillEnterText(find.byType(QuillEditor), 'sample text\n');
24+
25+
controller.dispose();
26+
});
827
}

0 commit comments

Comments
 (0)